avformat/flvenc: add add_keyframe_index option
authorSteven Liu <lq@chinaffmpeg.org>
Tue, 8 Nov 2016 11:27:21 +0000 (19:27 +0800)
committerSteven Liu <lq@chinaffmpeg.org>
Thu, 10 Nov 2016 02:30:48 +0000 (10:30 +0800)
commit863ebe6f83de6e884a4b1870231678c9259f3c90
treeecc0bf3447831ca61f3c83c9ec4aa44a4779ffbd
parent2bc66d9e432005c71c17565c28496be5308e023b
avformat/flvenc: add add_keyframe_index option

Add keyframe index metadata
Used to facilitate seeking; particularly for HTTP pseudo streaming.
 1. read live streaming or file by sequence
 2. if use add_keyframe_index option, add a mark flag at the position,
    use to insert new context at the last step.
 3. add the keyframes *offset* and *timestamp* into a list
 4. if use add_keyframe_index option, shift the metadata data from
    mark flag offset
 5. insert the keyframes *offset* and *timestamp* from the list by
    sequence
 6. free the list
 7. end.

Add FATE test case;

Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Steven Liu <liuqi@gosun.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
doc/muxers.texi
libavformat/flvenc.c
tests/Makefile
tests/fate-run.sh
tests/fate/flvenc.mak [new file with mode: 0644]
tests/ref/fate/flv-add_keyframe_index [new file with mode: 0644]