Similarities and differences VideoToolBox treatment of iOS and Android in MediaCodec of the PTS

     Video source, whether it is collected from the collecting device, or itself a good document compression which the data stream is stored in the encoding order of. Example 1 2 3 4 5,5 field video data, encoded as an I frame 234 is encoded into a B-frame, P-frame encoded into 5.

The encoding process:

1 1. encoded as an I frame;

2. Preparation 2,3,4 encoded as a B-frame, the first cached, recorded as the PTS time point;

5 3. The re-encoding, as P frames, the DTS 5 relative 2,3,4 front, by the PTS with respect to the 2,3,4;

4. 2,3,4 encoding, encoded as a B-frame;

Stored Procedures:

Memory consistent with the sequence coding sequence, the encoded sequence is (DTS order): 15234

 

A, iOS VideoToolBox

What PTS input, the output is what PTS

VTB itself does not decoded image reorder buffer so that developers need several data frames, and then into the rendering module after reordering

 

二、Android MediaCodec

Guess you like

Origin www.cnblogs.com/jiayayao/p/12078164.html