Patent ID: 8526752

Claim:
A method of generating a data stream of encoded image frames using an image encoder in an electronic device, wherein each of the encoded image frames has a given predetermined file size and wherein the encoded image frames are transmitted in the data stream at a given predetermined frame rate, the method comprising: with the image encoder and for a given image frame in the data stream, inserting into the data stream a first block of encoded image data during a first time period and inserting into the data stream a second block of encoded image data during a second time period that is after the first time period; after the beginning of the first time period and prior to the beginning of the second time period, determining if the image encoder is on track to encode the given image frame at the given predetermined file size; and with the image encoder, for the given image frame, and between the first time period and the second period, inserting a given block of padding data into the data stream, wherein the given block of padding data has a size that is varied in response to the determination of if the image encoder is on track to encode the given image frame at the given predetermined file size.