74 if (!duration || atof(duration->
value) < 0)
continue;
75 if (atof(duration->
value) > max) max = atof(duration->
value);
82 double min_buffer_time = 1.0;
83 avio_printf(s->
pb,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
85 avio_printf(s->
pb,
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n");
86 avio_printf(s->
pb,
" xmlns=\"urn:mpeg:DASH:schema:MPD:2011\"\n");
87 avio_printf(s->
pb,
" xsi:schemaLocation=\"urn:mpeg:DASH:schema:MPD:2011\"\n");
93 avio_printf(s->
pb,
" profiles=\"urn:webm:dash:profile:webm-on-demand:2012\"");
110 if (!ts || strncmp(gold->
value, ts->
value, strlen(gold->
value)))
return 0;
120 if (!gold_track_num)
return 0;
126 strncmp(gold_track_num->
value, track_num->
value, strlen(gold_track_num->
value)) ||
141 int output_width,
int output_height,
142 int output_sample_rate) {
148 if (!irange || cues_start ==
NULL || cues_end ==
NULL || filename ==
NULL ||
201 int first_sample_rate, i;
220 static const char boolean[2][6] = {
"false",
"true" };
221 int subsegmentStartsWithSAP = 1;
226 int width_in_as = 1, height_in_as = 1, sample_rate_in_as = 1;
257 if (!kf || !strncmp(kf->
value,
"0", 1)) subsegmentStartsWithSAP = 0;
259 avio_printf(s->
pb,
" subsegmentStartsWithSAP=\"%d\"", subsegmentStartsWithSAP);
264 !width_in_as, !height_in_as, !sample_rate_in_as);
286 enum { new_set, parsed_id, parsing_streams }
state;
292 else if (
state == new_set && !strncmp(p,
"id=", 3)) {
294 if (w->
as ==
NULL)
return -1;
299 while (*p !=
',') *q++ = *p++;
303 }
else if (
state == parsed_id && !strncmp(p,
"streams=", 8)) {
305 state = parsing_streams;
306 }
else if (
state == parsing_streams) {
309 while (*q !=
'\0' && *q !=
',' && *q !=
' ') q++;
314 if (*q ==
'\0')
break;
315 if (*q ==
' ')
state = new_set;
336 for (i = 0; i < w->
nb_as; i++) {
354 for (i = 0; i < w->
nb_as; i++) {
361 #define OFFSET(x) offsetof(WebMDashMuxContext, x)
363 {
"adaptation_sets",
"Adaptation sets. Syntax: id=0,streams=0,1,2 id=1,streams=3,4 and so on",
OFFSET(adaptation_sets),
AV_OPT_TYPE_STRING, { 0 }, 0, 0,
AV_OPT_FLAG_ENCODING_PARAM },
367 #if CONFIG_WEBM_DASH_MANIFEST_MUXER
368 static const AVClass webm_dash_class = {
376 .
name =
"webm_dash_manifest",
378 .mime_type =
"application/xml",
384 .priv_class = &webm_dash_class,