From 6cf55b9da2b41d5c2b8a0b6e4405dd84858cae35 Mon Sep 17 00:00:00 2001 From: Steven Liu Date: Thu, 18 Nov 2021 14:58:55 +0800 Subject: 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 --- libavformat/hlsenc.c | 4 +++- libavformat/version.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'libavformat') 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) -- cgit v1.2.3