[FFmpeg-cvslog] Merge commit '1920382aa9f21d7ed1a3c2214990da8d2b067a92'

Clément Bœsch git at videolan.org
Sat May 20 17:54:39 EEST 2017


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Sat May 20 16:52:10 2017 +0200| [e815111367cba1ec168ae080a6503e5b3eb326bf] | committer: Clément Bœsch

Merge commit '1920382aa9f21d7ed1a3c2214990da8d2b067a92'

* commit '1920382aa9f21d7ed1a3c2214990da8d2b067a92':
  dashenc: add option to provide UTC timing source

Also use E instead of AV_OPT_FLAG_ENCODING_PARAM to be consistent with
the other AVOption.

Merged-by: Clément Bœsch <u at pkh.me>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e815111367cba1ec168ae080a6503e5b3eb326bf
---

 libavformat/dashenc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 40430f8b6b..5b27941852 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -98,6 +98,7 @@ typedef struct DASHContext {
     const char *media_seg_name;
     AVRational min_frame_rate, max_frame_rate;
     int ambiguous_frame_rate;
+    const char *utc_timing_url;
 } DASHContext;
 
 static int dash_write(void *opaque, uint8_t *buf, int buf_size)
@@ -500,6 +501,9 @@ static int write_manifest(AVFormatContext *s, int final)
         av_free(escaped);
     }
     avio_printf(out, "\t</ProgramInformation>\n");
+    if (c->utc_timing_url)
+        avio_printf(out, "\t<UTCTiming schemeIdUri=\"urn:mpeg:dash:utc:http-xsdate:2014\" value=\"%s\"/>\n", c->utc_timing_url);
+
     if (c->window_size && s->nb_streams > 0 && c->streams[0].nb_segments > 0 && !c->use_template) {
         OutputStream *os = &c->streams[0];
         int start_index = FFMAX(os->nb_segments - c->window_size, 0);
@@ -1063,6 +1067,7 @@ static const AVOption options[] = {
     { "single_file_name", "DASH-templated name to be used for baseURL. Implies storing all segments in one file, accessed using byte ranges", OFFSET(single_file_name), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, E },
     { "init_seg_name", "DASH-templated name to used for the initialization segment", OFFSET(init_seg_name), AV_OPT_TYPE_STRING, {.str = "init-stream$RepresentationID$.m4s"}, 0, 0, E },
     { "media_seg_name", "DASH-templated name to used for the media segments", OFFSET(media_seg_name), AV_OPT_TYPE_STRING, {.str = "chunk-stream$RepresentationID$-$Number%05d$.m4s"}, 0, 0, E },
+    { "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, E },
     { NULL },
 };
 


======================================================================

diff --cc libavformat/dashenc.c
index 40430f8b6b,198932caa4..5b27941852
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@@ -96,8 -94,7 +96,9 @@@ typedef struct DASHContext 
      const char *single_file_name;
      const char *init_seg_name;
      const char *media_seg_name;
 +    AVRational min_frame_rate, max_frame_rate;
 +    int ambiguous_frame_rate;
+     const char *utc_timing_url;
  } DASHContext;
  
  static int dash_write(void *opaque, uint8_t *buf, int buf_size)
@@@ -1063,6 -985,7 +1067,7 @@@ static const AVOption options[] = 
      { "single_file_name", "DASH-templated name to be used for baseURL. Implies storing all segments in one file, accessed using byte ranges", OFFSET(single_file_name), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, E },
      { "init_seg_name", "DASH-templated name to used for the initialization segment", OFFSET(init_seg_name), AV_OPT_TYPE_STRING, {.str = "init-stream$RepresentationID$.m4s"}, 0, 0, E },
      { "media_seg_name", "DASH-templated name to used for the media segments", OFFSET(media_seg_name), AV_OPT_TYPE_STRING, {.str = "chunk-stream$RepresentationID$-$Number%05d$.m4s"}, 0, 0, E },
 -    { "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 },
++    { "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, E },
      { NULL },
  };
  



More information about the ffmpeg-cvslog mailing list