sets the MPEG-DASH profile identifier in the header (for example for specifying on-demand vs default live profile)
Signed-off-by: Sol Bekic <sol.be...@rise.tech> --- libavformat/dashenc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 18c39c5..0c06474 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -96,6 +96,7 @@ typedef struct DASHContext { const char *single_file_name; const char *init_seg_name; const char *media_seg_name; + const char *profile_identifier; AVRational min_frame_rate, max_frame_rate; int ambiguous_frame_rate; } DASHContext; @@ -457,8 +458,8 @@ static int write_manifest(AVFormatContext *s, int final) "\txmlns=\"urn:mpeg:dash:schema:mpd:2011\"\n" "\txmlns:xlink=\"http://www.w3.org/1999/xlink\"\n" "\txsi:schemaLocation=\"urn:mpeg:DASH:schema:MPD:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd\"\n" - "\tprofiles=\"urn:mpeg:dash:profile:isoff-live:2011\"\n" - "\ttype=\"%s\"\n", final ? "static" : "dynamic"); + "\tprofiles=\"%s\"\n", c->profile_identifier); + avio_printf(out, "\ttype=\"%s\"\n", final ? "static" : "dynamic"); if (final) { avio_printf(out, "\tmediaPresentationDuration=\""); write_time(out, c->total_duration); @@ -1028,6 +1029,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 }, + { "profile_identifier", "DASH profile identifier", OFFSET(profile_identifier), AV_OPT_TYPE_STRING, {.str = "urn:mpeg:dash:profile:isoff-live:2011"}, 0, 0, E }, { NULL }, }; -- 2.9.3 (Apple Git-75) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel