splitmuxsink: Enhancement for timecode based split
authorSeungha Yang <seungha@centricular.com>
Fri, 10 Apr 2020 14:52:45 +0000 (23:52 +0900)
committerSeungha Yang <seungha@centricular.com>
Mon, 20 Apr 2020 12:39:49 +0000 (21:39 +0900)
commitca48f5265eb749a4a18b8df33de122e81ee66427
tree61b0d74ce490d11322b23bc9989eac2f488bedbb
parentfe73c3b0f32e9f1b67f82d60d5c26856d2b41876
splitmuxsink: Enhancement for timecode based split

The calculated threshold for timecode might be varying depending on
"max-size-timecode" and framerate.
For instance, with framerate 29.97 (30000/1001) and
"max-size-timecode=00:02:00;02", every fragment will have identical
number of frames 3598. However, when "max-size-timecode=00:02:00;00",
calculated next keyframe via gst_video_time_code_add_interval()
can be different per fragment, but this is the nature of timecode.
To compensate such timecode drift, we should keep track of expected
timecode of next fragment based on observed timecode.
gst/multifile/gstsplitmuxsink.c
gst/multifile/gstsplitmuxsink.h