[FFmpeg-devel] [PATCH] avformat/hlsenc: deprecate hls_wrap option
Michael Niedermayer
michael at niedermayer.cc
Thu Feb 9 03:51:55 EET 2017
On Wed, Feb 08, 2017 at 10:54:06AM +0800, Steven Liu wrote:
> When user use the hls_wrap, there have many problem:
> 1. some platform refersh the old but usefull segment
> 2. CDN(Content Delivery Network) Deliver HLS not friendly
>
> The hls_wrap is used to wrap segments for use little space,
> now user can use hls_list_size and hls_flags delete_segments
> instead it.
>
> Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
> ---
> doc/muxers.texi | 5 ++---
> libavformat/hlsenc.c | 24 ++++++++++++++++++++++++
> libavformat/version.h | 4 ++++
> 3 files changed, 30 insertions(+), 3 deletions(-)
>
> diff --git a/doc/muxers.texi b/doc/muxers.texi
> index cb875a4..c00e296 100644
> --- a/doc/muxers.texi
> +++ b/doc/muxers.texi
> @@ -441,9 +441,8 @@ parameters. Values containing @code{:} special characters must be
> escaped.
>
> @item hls_wrap @var{wrap}
> -Set the number after which the segment filename number (the number
> -specified in each segment file) wraps. If set to 0 the number will be
> -never wrapped. Default value is 0.
> +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
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index 17d4fe4..736c949 100644
> --- a/libavformat/hlsenc.c
> +++ b/libavformat/hlsenc.c
> @@ -101,7 +101,9 @@ typedef struct HLSContext {
> float time; // Set by a private option.
> float init_time; // Set by a private option.
> int max_nb_segments; // Set by a private option.
> +#ifdef FF_API_HLS_WRAP
should all be #if not #ifdef
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170209/0df695e6/attachment.sig>
More information about the ffmpeg-devel
mailing list