From patchwork Mon Sep 26 22:10:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 741 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.66 with SMTP id o63csp2153270vsd; Mon, 26 Sep 2016 15:27:32 -0700 (PDT) X-Received: by 10.28.72.10 with SMTP id v10mr195951wma.52.1474928852875; Mon, 26 Sep 2016 15:27:32 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id p81si10604724wmf.29.2016.09.26.15.27.31; Mon, 26 Sep 2016 15:27:32 -0700 (PDT) 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=@gmail.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; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 21BD8689E64; Tue, 27 Sep 2016 01:27:12 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 70E996898D7 for ; Tue, 27 Sep 2016 01:27:05 +0300 (EEST) Received: by mail-lf0-f67.google.com with SMTP id b71so10450329lfg.1 for ; Mon, 26 Sep 2016 15:27:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=TdQI24DI+IWfJWLOrm2gBjsiYTwkOlydqthY/FGJ/cM=; b=CXu9xFZGoLvVv3w2vDex2/2okHSRLJbw8qhguJM7ALTxdfSOxzsO3KP2MgBK83eTMJ 9+6Pd+uKDODfdUc5Kw8I/8va9RUMEL//DsBqwld8690Zdvuw/C5zTK9mvRM8PZdvWjQy E74ItUZ9MbVzdMlbDtEV+Xi+Fk8EEuNsKiDMh8ph6tShKhzLBzOXvw+Ut7lvHYeel9kC hjsQoT2u4x0TjcT3z6o3e+bM0Dga8YIhIi6qmmon1BPAanMuEHl8aWaNQswq13AVAFe6 V7W6n80rNo2n2P0Xr8R4RHiZxDcIrKLmoRhgh2NqoYi/J0o/dQI7dJTMgoYfnch/zzpZ eMmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TdQI24DI+IWfJWLOrm2gBjsiYTwkOlydqthY/FGJ/cM=; b=jftfQGT06gwHiA2Ns98Y6iKoz/X9bFYlu7Dc81st7PvkIDV4zTB2OFH3jFgapqYAWF wns0ZIajxtznyMkRGbpufYuEs+ph0PGBMFrfVIuqMupJ9EvrS0YWU2AP9t8jTMnGwFK8 KeWyHE+6Afah4TpC0GKKgSr8i7vRwLK/1n8520oB9KnMiWHsW8WZvHTTO21q7DoXqSXS AaT9B4TCLrjzMv05/LESpaX/nAPkIzTt9Z5brwM9Mh/4L87JjYZ6PPpoGYU4ssbDJ9HL TpT5u+wdiLArCUym9nEugQGXS/1YhYg1tprR+iarAyXiFTCSE+3vOFru2M8T1tDhoMtz n21w== X-Gm-Message-State: AA6/9Rm5tAjAFgNULz4KxWch0lMlZa7qE8z4BGv03o4NCXhTKYuUCvt7ToUE4G1fpeZCJA== X-Received: by 10.28.111.194 with SMTP id c63mr153401wmi.94.1474927826869; Mon, 26 Sep 2016 15:10:26 -0700 (PDT) Received: from saten.lan (dsl-hkibrasgw4-50df5e-23.dhcp.inet.fi. [80.223.94.23]) by smtp.gmail.com with ESMTPSA id gg10sm24493796wjd.4.2016.09.26.15.10.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Sep 2016 15:10:26 -0700 (PDT) From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Tue, 27 Sep 2016 01:10:22 +0300 Message-Id: <1474927822-6802-3-git-send-email-jeebjp@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474927822-6802-1-git-send-email-jeebjp@gmail.com> References: <1474927822-6802-1-git-send-email-jeebjp@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] movenc: Add support for writing language codes into ISML manifests 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Streaming servers appear to ignore all other language metadata. Signed-off-by: Jan Ekström --- libavformat/movenc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index d5ed1dd..28edb18 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -3611,6 +3611,9 @@ static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov, AVFormat const char *type; int track_id = track->track_id; + AVStream *st = track->st; + AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL,0); + if (track->par->codec_type == AVMEDIA_TYPE_VIDEO) { type = "video"; } else if (track->par->codec_type == AVMEDIA_TYPE_AUDIO) { @@ -3630,6 +3633,7 @@ static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov, AVFormat (int64_t)manifest_bit_rate); param_write_int(pb, "systemBitrate", manifest_bit_rate); param_write_int(pb, "trackID", track_id); + param_write_string(pb, "systemLanguage", lang ? lang->value : "und"); if (track->par->codec_type == AVMEDIA_TYPE_VIDEO) { if (track->par->codec_id == AV_CODEC_ID_H264) { uint8_t *ptr;