Patent ID: 8489758

Claim:
A method comprising: receiving data at a first node; encoding a first portion of said data at a first bit rate to generate a first encoded data stream; monitoring an indication of a capacity of a channel of a communication network; adding padding blocks to the first encoded data stream based on the indication of the capacity of the channel to generate a padded data stream, each padding block comprising an even number of bytes; adding a tailing block to the first encoded data stream that indicates the number of padding blocks added to the first encoded data stream, the tailing block comprising an odd number of bytes; transmitting, to a second node, the padded data stream via said channel; determining if transmitting said padded data stream exceeds the capacity of the channel; encoding a second portion of said data at a higher bit rate than the first bit rate to generate a second encoded data stream responsive to determining that transmitting the padded data stream does not exceed the capacity of the channel; and transmitting the second encoded data stream to the second node via said channel the adding padding blocks to the first encoded data stream further comprising incrementally increasing a number of padding bits added to the first encoded data stream responsive to determining that the capacity of the channel is not exceeded, and the incrementally increasing comprising making a plurality of incremental increases to the padding bits before the second portion is encoded at the higher bit rate, said determining being performed after each incremental increase, and each successive incremental increase being made based on a respective determination that the capacity of the channel is not exceeded.