lavc/h264: create AVFrame side data from H.264 timecodes

Create SMPTE ST 12-1 timecodes based on H.264 SEI picture timing
info.

For framerates > 30 FPS, the field flag is used in conjunction with
pairs of frames which contain the same frame timestamp in S12M.
Ensure the field is properly set per the spec.
This commit is contained in:
Devin Heitmueller
2018-06-29 14:57:13 -04:00
committed by Kieran Kunhya
parent 92c25963e8
commit 4241e44a3c
5 changed files with 76 additions and 17 deletions

View File

@@ -158,6 +158,14 @@ enum AVFrameSideDataType {
*/
AV_FRAME_DATA_QP_TABLE_DATA,
#endif
/**
* Timecode which conforms to SMPTE ST 12-1. The data is an array of 4 uint32_t
* where the first uint32_t describes how many (1-3) of the other timecodes are used.
* The timecode format is described in the av_timecode_get_smpte_from_framenum()
* function in libavutil/timecode.c.
*/
AV_FRAME_DATA_S12M_TIMECODE,
};
enum AVActiveFormatDescription {