diff options
author | Vignesh Venkatasubramanian <vigneshv@google.com> | 2015-04-21 17:35:29 -0700 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-22 11:41:03 +0200 |
commit | f82ce6aa882b6ccb5727c4357e4862ad11acd229 (patch) | |
tree | 17e7436044b91200d0da7eb5a4a14c96b6fdae93 /libavformat | |
parent | ba625dd8a12b8f440af7f50c833e5c1005d67c85 (diff) | |
download | ffmpeg-f82ce6aa882b6ccb5727c4357e4862ad11acd229.tar.gz |
webmdashenc: parameter'ize minimumUpdatePeriod
Some players do not support setting minimumUpdatePeriod to zero.
This patch adds a new parameter that will let the users set any
value to this field. Also updates the test and the documentation.
Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/webmdashenc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/webmdashenc.c b/libavformat/webmdashenc.c index e627a15f9a..1c63a5b0a4 100644 --- a/libavformat/webmdashenc.c +++ b/libavformat/webmdashenc.c @@ -56,6 +56,7 @@ typedef struct WebMDashMuxContext { int chunk_duration; char *utc_timing_url; double time_shift_buffer_depth; + int minimum_update_period; int debug_mode; } WebMDashMuxContext; @@ -116,7 +117,7 @@ static void write_header(AVFormatContext *s) } avio_printf(s->pb, " availabilityStartTime=\"%s\"\n", gmt_iso); avio_printf(s->pb, " timeShiftBufferDepth=\"PT%gS\"\n", w->time_shift_buffer_depth); - avio_printf(s->pb, " minimumUpdatePeriod=\"0\""); + avio_printf(s->pb, " minimumUpdatePeriod=\"PT%dS\"", w->minimum_update_period); avio_printf(s->pb, ">\n"); avio_printf(s->pb, "<UTCTiming\n"); avio_printf(s->pb, " schemeIdUri=\"%s\"\n", @@ -517,6 +518,7 @@ static const AVOption options[] = { { "chunk_duration_ms", "duration of each chunk (in milliseconds)", OFFSET(chunk_duration), AV_OPT_TYPE_INT, {.i64 = 1000}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, { "utc_timing_url", "URL of the page that will return the UTC timestamp in ISO format", OFFSET(utc_timing_url), AV_OPT_TYPE_STRING, { 0 }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM }, { "time_shift_buffer_depth", "Smallest time (in seconds) shifting buffer for which any Representation is guaranteed to be available.", OFFSET(time_shift_buffer_depth), AV_OPT_TYPE_DOUBLE, { .dbl = 60.0 }, 1.0, DBL_MAX, AV_OPT_FLAG_ENCODING_PARAM }, + { "minimum_update_period", "Minimum Update Period (in seconds) of the manifest.", OFFSET(minimum_update_period), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, { NULL }, }; |