]> git.sesse.net Git - ffmpeg/commit
avformat/hlsenc: hls_start_number_source and start_number
authorBodecs Bela <bodecsb@vivanet.hu>
Thu, 12 Jan 2017 12:43:10 +0000 (20:43 +0800)
committerSteven Liu <lq@chinaffmpeg.org>
Thu, 12 Jan 2017 12:43:10 +0000 (20:43 +0800)
commit8811d6d9a07f9d1b8d22397c0e009d075d67fda0
treec2e63311e7365a4a711c1dc9ae8253a70fd0b843
parente1f49712099d3b68c35cf8ebb95cc7f34b06ee55
avformat/hlsenc: hls_start_number_source and start_number

start_number option starts the playlist sequence number
(#EXT-X-MEDIA-SEQUENCE) from the specified number. Unless hls_flags
single_file is set, it also specifies starting sequence numbers of
segment and subtitle filenames. Sometimes it is usefull to have unique
starting numbers at each run, but currently it is only achiveable by
setting this parameter manually.
This patch enables to specify start_number source parameter by
introducing hls_start_number_source with 3 possible values:
generic/epoch/datetime. This ensures to set start sequence number
automatically for practically unique numbers. Generic option is the
default and this is the curent behaviour: start_number option value
specifies the start sequence number. (start_number default value is 0)
If hls_start_number_source is set to epoch, then the start number will
be the seconds since epoch (1970-01-01 00:00:00). If set to datetime,
then the start sequence number will be based on the current date/time
value as YYYYmmddHHMMSS. e.g. 20161231235659.
Hls speficication allows 64 bit integers as sequence numbers. This patch
also changes some code where only 32 bit integer values were handled
correctly.

Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
doc/muxers.texi
libavformat/hlsenc.c