mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/hlsenc: Remove deprecated wrap option
Deprecated in d96ebc5ef8
.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
dc8e15ef15
commit
41181bc4a0
@ -801,15 +801,6 @@ Set output format options using a :-separated list of key=value
|
||||
parameters. Values containing @code{:} special characters must be
|
||||
escaped.
|
||||
|
||||
@item hls_wrap @var{wrap}
|
||||
This is a deprecated option, you can use @code{hls_list_size}
|
||||
and @code{hls_flags delete_segments} instead it
|
||||
|
||||
This option is useful to avoid to fill the disk with many segment
|
||||
files, and limits the maximum number of segment files written to disk
|
||||
to @var{wrap}.
|
||||
|
||||
|
||||
@item hls_start_number_source
|
||||
Start the playlist sequence number (@code{#EXT-X-MEDIA-SEQUENCE}) according to the specified source.
|
||||
Unless @code{hls_flags single_file} is set, it also specifies source of starting sequence numbers of
|
||||
|
@ -200,9 +200,6 @@ typedef struct HLSContext {
|
||||
int64_t init_time; // Set by a private option.
|
||||
int max_nb_segments; // Set by a private option.
|
||||
int hls_delete_threshold; // Set by a private option.
|
||||
#if FF_API_HLS_WRAP
|
||||
int wrap; // Set by a private option.
|
||||
#endif
|
||||
uint32_t flags; // enum HLSFlags
|
||||
uint32_t pl_type; // enum PlaylistType
|
||||
char *segment_filename;
|
||||
@ -1063,11 +1060,7 @@ static int sls_flag_use_localtime_filename(AVFormatContext *oc, HLSContext *c, V
|
||||
if (c->flags & HLS_SECOND_LEVEL_SEGMENT_INDEX) {
|
||||
char *filename = NULL;
|
||||
if (replace_int_data_in_filename(&filename,
|
||||
#if FF_API_HLS_WRAP
|
||||
oc->url, 'd', c->wrap ? vs->sequence % c->wrap : vs->sequence) < 1) {
|
||||
#else
|
||||
oc->url, 'd', vs->sequence) < 1) {
|
||||
#endif
|
||||
av_log(c, AV_LOG_ERROR, "Invalid second level segment filename template '%s', "
|
||||
"you can try to remove second_level_segment_index flag\n",
|
||||
oc->url);
|
||||
@ -1177,11 +1170,7 @@ static int hls_append_segment(struct AVFormatContext *s, HLSContext *hls,
|
||||
vs->initial_prog_date_time += en->duration;
|
||||
vs->segments = en->next;
|
||||
if (en && hls->flags & HLS_DELETE_SEGMENTS &&
|
||||
#if FF_API_HLS_WRAP
|
||||
!(hls->flags & HLS_SINGLE_FILE || hls->wrap)) {
|
||||
#else
|
||||
!(hls->flags & HLS_SINGLE_FILE)) {
|
||||
#endif
|
||||
en->next = vs->old_segments;
|
||||
vs->old_segments = en;
|
||||
if ((ret = hls_delete_old_segments(s, hls, vs)) < 0)
|
||||
@ -1702,11 +1691,7 @@ static int hls_start(AVFormatContext *s, VariantStream *vs)
|
||||
} else if (c->max_seg_size > 0) {
|
||||
char *filename = NULL;
|
||||
if (replace_int_data_in_filename(&filename,
|
||||
#if FF_API_HLS_WRAP
|
||||
vs->basename, 'd', c->wrap ? vs->sequence % c->wrap : vs->sequence) < 1) {
|
||||
#else
|
||||
vs->basename, 'd', vs->sequence) < 1) {
|
||||
#endif
|
||||
av_freep(&filename);
|
||||
av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s', you can try to use -strftime 1 with it\n", vs->basename);
|
||||
return AVERROR(EINVAL);
|
||||
@ -1745,11 +1730,7 @@ static int hls_start(AVFormatContext *s, VariantStream *vs)
|
||||
} else {
|
||||
char *filename = NULL;
|
||||
if (replace_int_data_in_filename(&filename,
|
||||
#if FF_API_HLS_WRAP
|
||||
vs->basename, 'd', c->wrap ? vs->sequence % c->wrap : vs->sequence) < 1) {
|
||||
#else
|
||||
vs->basename, 'd', vs->sequence) < 1) {
|
||||
#endif
|
||||
av_freep(&filename);
|
||||
av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s' you can try to use -strftime 1 with it\n", vs->basename);
|
||||
return AVERROR(EINVAL);
|
||||
@ -1759,11 +1740,7 @@ static int hls_start(AVFormatContext *s, VariantStream *vs)
|
||||
if (vs->vtt_basename) {
|
||||
char *filename = NULL;
|
||||
if (replace_int_data_in_filename(&filename,
|
||||
#if FF_API_HLS_WRAP
|
||||
vs->vtt_basename, 'd', c->wrap ? vs->sequence % c->wrap : vs->sequence) < 1) {
|
||||
#else
|
||||
vs->vtt_basename, 'd', vs->sequence) < 1) {
|
||||
#endif
|
||||
av_freep(&filename);
|
||||
av_log(vtt_oc, AV_LOG_ERROR, "Invalid segment filename template '%s'\n", vs->vtt_basename);
|
||||
return AVERROR(EINVAL);
|
||||
@ -3120,9 +3097,6 @@ static const AVOption options[] = {
|
||||
{"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},
|
||||
{"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},
|
||||
#if FF_API_HLS_WRAP
|
||||
{"hls_wrap", "set number after which the index wraps (will be deprecated)", OFFSET(wrap), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, E},
|
||||
#endif
|
||||
{"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},
|
||||
{"hls_segment_filename", "filename template for segment files", OFFSET(segment_filename), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E},
|
||||
|
@ -58,9 +58,6 @@
|
||||
#ifndef FF_API_LAVF_AVCTX
|
||||
#define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
#ifndef FF_API_HLS_WRAP
|
||||
#define FF_API_HLS_WRAP (LIBAVFORMAT_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
#ifndef FF_API_HLS_USE_LOCALTIME
|
||||
#define FF_API_HLS_USE_LOCALTIME (LIBAVFORMAT_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user