diff options
author | Steven Liu <lq@chinaffmpeg.org> | 2021-11-18 14:58:55 +0800 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2021-12-13 18:45:37 +0800 |
commit | 6cf55b9da2b41d5c2b8a0b6e4405dd84858cae35 (patch) | |
tree | 3d79e7364f3fe0bc36e8e4d1e50fe7311f8ec5aa | |
parent | 38fbe6a34cfe48c91156e26806aeb81e0dd09f77 (diff) | |
download | ffmpeg-6cf55b9da2b41d5c2b8a0b6e4405dd84858cae35.tar.gz |
avformat/hlsenc: deprecate hls_ts_options option
Because the hls_ts_options will be misunderstand by user,
and then user can use hls_segment_options instead of hls_ts_options.
Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
-rw-r--r-- | doc/muxers.texi | 1 | ||||
-rw-r--r-- | libavformat/hlsenc.c | 4 | ||||
-rw-r--r-- | libavformat/version.h | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/doc/muxers.texi b/doc/muxers.texi index 287ea569fd..1ea98a69a3 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -799,6 +799,7 @@ were recently referenced in the playlist. Default value is 1, meaning segments o Set output format options using a :-separated list of key=value parameters. Values containing @code{:} special characters must be escaped. +@code{hls_ts_options} is deprecated, use hls_segment_options instead of it.. @item hls_start_number_source Start the playlist sequence number (@code{#EXT-X-MEDIA-SEQUENCE}) according to the specified source. diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index b75c1cc746..459129818a 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -3101,7 +3101,9 @@ static const AVOption options[] = { {"hls_init_time", "set segment length at init list", OFFSET(init_time), AV_OPT_TYPE_DURATION, {.i64 = 0}, 0, INT64_MAX, E}, {"hls_list_size", "set maximum number of playlist entries", OFFSET(max_nb_segments), AV_OPT_TYPE_INT, {.i64 = 5}, 0, INT_MAX, E}, {"hls_delete_threshold", "set number of unreferenced segments to keep before deleting", OFFSET(hls_delete_threshold), AV_OPT_TYPE_INT, {.i64 = 1}, 1, INT_MAX, E}, - {"hls_ts_options","set hls mpegts list of options for the container format used for hls", OFFSET(format_options), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0, E}, +#if FF_HLS_TS_OPTIONS + {"hls_ts_options","set hls mpegts list of options for the container format used for hls (deprecated, use hls_segment_options instead of it.)", OFFSET(format_options), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0, E | AV_OPT_FLAG_DEPRECATED}, +#endif {"hls_vtt_options","set hls vtt list of options for the container format used for hls", OFFSET(vtt_format_options_str), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E}, {"hls_allow_cache", "explicitly set whether the client MAY (1) or MUST NOT (0) cache media segments", OFFSET(allowcache), AV_OPT_TYPE_INT, {.i64 = -1}, INT_MIN, INT_MAX, E}, {"hls_base_url", "url to prepend to each playlist entry", OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E}, diff --git a/libavformat/version.h b/libavformat/version.h index 1623835a78..379a68cc7c 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -58,6 +58,7 @@ #define FF_API_LAVF_PRIV_OPT (LIBAVFORMAT_VERSION_MAJOR < 60) #define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 60) #define FF_API_AVIOCONTEXT_WRITTEN (LIBAVFORMAT_VERSION_MAJOR < 60) +#define FF_HLS_TS_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 60) #define FF_API_AVSTREAM_CLASS (LIBAVFORMAT_VERSION_MAJOR > 59) |