From patchwork Thu Feb 9 16:05:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: s-ol X-Patchwork-Id: 2463 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp54836vsb; Thu, 9 Feb 2017 08:06:03 -0800 (PST) X-Received: by 10.28.111.155 with SMTP id c27mr22184693wmi.18.1486656363469; Thu, 09 Feb 2017 08:06:03 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g200si6580289wmd.121.2017.02.09.08.06.01; Thu, 09 Feb 2017 08:06:03 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@rise-tech.20150623.gappssmtp.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 75D32689D34; Thu, 9 Feb 2017 18:05:55 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr0-f174.google.com (mail-wr0-f174.google.com [209.85.128.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7502F680784 for ; Thu, 9 Feb 2017 18:05:49 +0200 (EET) Received: by mail-wr0-f174.google.com with SMTP id o16so86996277wra.1 for ; Thu, 09 Feb 2017 08:05:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rise-tech.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=aPUmln5eBcDwPeNN/nmdIhui60I/tnmuBEqJqhhW+s4=; b=giogf8rYsaMk+onAYdrC3qYN+xLBHkrnWbg3UzgtWnEGUH3gAz83JvxKPJ8vm+nluU 3bbON8FSmmqEuIv1Imgu1kniskijE2j6CSfbaXy7eWS7YnbknDL4CWnbLguzChuuGE9T h2hrwEGK+RKVqoEFOdGudPRhdEowucqAGzrTuNhBN8tAXpiOuzcPDhM3SoTFQh5697Nt asw8l+xvOME6b0oeDnB1PdiyunuslhwRSQMfLLcZYaxaHhu4H9oeBq+myxo21xe9HBCk yOc5Ol5ID0Fp4Dlvlx7m+ZLAbVGDr4IQVdL91VCKD4g5DAX8sT3M2gdYxAzjhQ92ti1l SNHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aPUmln5eBcDwPeNN/nmdIhui60I/tnmuBEqJqhhW+s4=; b=bANvzUeZYC4iDodMZDUDUfxPxFwkgu2Opo2waLwLp4TzUF6CKRsmM4AEa9D28puQhB nicCM2zUpfpiRqvaKZmJxQoyGTgcuSDefG1gm+AEQpTdf64k616u+GNmymI0zVJygn9i kBhC73od6RNDUg05kncEkByIIlO5Z+eIbXaKVmKQMYBQ5UZbe28JuROCFd3GTQtnyiod Pka/ME1peVDMV03ip37TEZdME1Egv+Uxm3a/ljzGASQecZFQt4YH/6rCiiT9X1snUKDm umn+PX51L6MUH36BTg7dKerLOezVn6LWCKzk2GYAQursjFfN3IH9ePWaSmpmJp+lx81f kJdw== X-Gm-Message-State: AMke39kdJ/2TLPBV5uHwkPle9nZ1tAzSa2nch/v2e85UQAiOtaevId6IjVhSZ5TTknWvAw== X-Received: by 10.223.178.146 with SMTP id g18mr3676032wrd.124.1486656352468; Thu, 09 Feb 2017 08:05:52 -0800 (PST) Received: from angie.fritz.box.fritz.box (static-212-117-93-126.netcologne.de. [212.117.93.126]) by smtp.googlemail.com with ESMTPSA id v128sm9530638wmv.2.2017.02.09.08.05.51 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 09 Feb 2017 08:05:51 -0800 (PST) From: s-ol To: ffmpeg-devel@ffmpeg.org Date: Thu, 9 Feb 2017 17:05:47 +0100 Message-Id: <20170209160547.71865-2-sol.bekic@rise.tech> X-Mailer: git-send-email 2.9.3 (Apple Git-75) In-Reply-To: <20170209160547.71865-1-sol.bekic@rise.tech> References: <20170209160547.71865-1-sol.bekic@rise.tech> Subject: [FFmpeg-devel] [PATCH 2/2] dashenc: add profile_identifier option X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: s-ol MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" sets the MPEG-DASH profile identifier in the header (for example for specifying on-demand vs default live profile) Signed-off-by: Sol Bekic --- 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 }, };