diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-08-16 18:13:17 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-09-04 11:27:55 +0200 |
commit | ebd703f0a0222270f421d0a0b3abebd51dc986b3 (patch) | |
tree | 951e31ac687af2567cdc1a600552a064fb864b34 /libavformat/segment.c | |
parent | d81576354853ece2280f8476c4672f741b68a366 (diff) | |
download | ffmpeg-ebd703f0a0222270f421d0a0b3abebd51dc986b3.tar.gz |
lavf/segment: deprecate "ext" format in favor of "csv"
The new option name is more descriptive.
Diffstat (limited to 'libavformat/segment.c')
-rw-r--r-- | libavformat/segment.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c index ecd4ae8694..fe4adddd7f 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -39,11 +39,13 @@ typedef enum { LIST_TYPE_UNDEFINED = -1, LIST_TYPE_FLAT = 0, - LIST_TYPE_EXT, + LIST_TYPE_CSV, LIST_TYPE_M3U8, LIST_TYPE_NB, } ListType; +#define LIST_TYPE_EXT LIST_TYPE_CSV + typedef struct { const AVClass *class; /**< Class for private options. */ int segment_idx; ///< index of the segment file to write, starting from 0 @@ -310,13 +312,16 @@ static int seg_write_header(AVFormatContext *s) if (seg->list) { if (seg->list_type == LIST_TYPE_UNDEFINED) { - if (av_match_ext(seg->list, "ext" )) seg->list_type = LIST_TYPE_EXT; + if (av_match_ext(seg->list, "csv" )) seg->list_type = LIST_TYPE_CSV; + else if (av_match_ext(seg->list, "ext" )) seg->list_type = LIST_TYPE_EXT; else if (av_match_ext(seg->list, "m3u8")) seg->list_type = LIST_TYPE_M3U8; else seg->list_type = LIST_TYPE_FLAT; } if ((ret = segment_list_open(s)) < 0) goto fail; } + if (seg->list_type == LIST_TYPE_EXT) + av_log(s, AV_LOG_WARNING, "'ext' list type option is deprecated in favor of 'csv'\n"); for (i = 0; i< s->nb_streams; i++) seg->has_video += @@ -445,6 +450,7 @@ static const AVOption options[] = { { "segment_list_size", "set the maximum number of playlist entries", OFFSET(list_size), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, E }, { "segment_list_type", "set the segment list type", OFFSET(list_type), AV_OPT_TYPE_INT, {.dbl = LIST_TYPE_UNDEFINED}, -1, LIST_TYPE_NB-1, E, "list_type" }, { "flat", "flat format", 0, AV_OPT_TYPE_CONST, {.dbl=LIST_TYPE_FLAT }, INT_MIN, INT_MAX, 0, "list_type" }, + { "csv", "csv format", 0, AV_OPT_TYPE_CONST, {.dbl=LIST_TYPE_CSV }, INT_MIN, INT_MAX, 0, "list_type" }, { "ext", "extended format", 0, AV_OPT_TYPE_CONST, {.dbl=LIST_TYPE_EXT }, INT_MIN, INT_MAX, 0, "list_type" }, { "m3u8", "M3U8 format", 0, AV_OPT_TYPE_CONST, {.dbl=LIST_TYPE_M3U8 }, INT_MIN, INT_MAX, 0, "list_type" }, { "segment_time", "set segment duration", OFFSET(time_str),AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E }, |