From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 2BFF741254 for ; Thu, 23 Feb 2023 01:15:41 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 73ED568C08C; Thu, 23 Feb 2023 03:15:37 +0200 (EET) Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8795A68C073 for ; Thu, 23 Feb 2023 03:15:31 +0200 (EET) Received: by mail-qt1-f174.google.com with SMTP id d7so9535535qtr.12 for ; Wed, 22 Feb 2023 17:15:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=davyandbeth-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:content-language:to:subject:from :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=MWf/0cF8pwv9ZzKDBMrfiaF4Y0uqMkVLDH5K97UDpEI=; b=gz7VluDG6Cz5owfzrmU0VnclRfl9gE0WRsf3cSp/6Uy3OP3dkmrcvBUtoKTJezUngd ttS5pHoLBb19W9N6OGrpe+P3T0L3LKwxiyteNMFfPEm426XoYOYcAknvV4z+cXq/Qsip L2/O3PH7At4JR0AVj1PiWT+liXrz1XkV3neT4oy3WwHERq/L4cTI8vwnDTyFDcFVt8LP cGRkCs90cHLRyPcNZLmH2v54olUWcLJGKQf4YQYxqWijuQ7ovP01RNKvMgdNOCALukck v0Z6vEHE1CL15GIcIJWx/X5sVUTkiWyF5Xm5kv67P8+ehjgWP8xKb2JahrPEWS4PTu+W kH3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:to:subject:from :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=MWf/0cF8pwv9ZzKDBMrfiaF4Y0uqMkVLDH5K97UDpEI=; b=XTF23zRJZXyFhTJYd6LvxJHwm5G6dfk9jnr6R3j9QPZ5cM9+xYWvsi4u3UOfnNo2Gv j5tSvVrqCCRPZagNwLB8KTMw9+VMvoe6zoH3HioHfZQGbK5+Nl96MznXXIHVGONdwCoz GUDCv5xxWXxFG6BLU132kAo0upPxvqMGwKPQq/ms9I8z5rY7h5C5BmYtb+h+C4e1f9ma s/hQhKzfY56uucHikgW3it2KrgPxCcNx3k5gpDDXGF6hkXfa2eibtrApl11U3CRCgcV6 g7l74ed9uWrJ/Xtoez0dgDzlLePeGMD5NThO4hu9RwTBtM4U3PlElWAN047cspTXJ7mA jTAg== X-Gm-Message-State: AO0yUKXDOQx5OQH/HxhqXlE4Tmz3lQdNgjI1Q6RAjhR5ODpDW7TLsV3g igySSrLfhIi8nx/q27x29Ass+cqlpte2mnp6UzjfcA== X-Google-Smtp-Source: AK7set+cZ9+XvkzgS/N6B4J6ISM1J+0qSNKSayTLGJ4+/5dm1D/gWYdjlABAez88mLMQTHJccXvYiw== X-Received: by 2002:a05:622a:612:b0:3b0:11a1:3140 with SMTP id z18-20020a05622a061200b003b011a13140mr1977720qta.43.1677114929378; Wed, 22 Feb 2023 17:15:29 -0800 (PST) Received: from [192.168.1.92] ([68.249.219.17]) by smtp.googlemail.com with ESMTPSA id 13-20020a05620a040d00b0073b575f3603sm5535807qkp.101.2023.02.22.17.15.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Feb 2023 17:15:28 -0800 (PST) Message-ID: <7c1044ba-4ec9-ac5b-8bbb-28a28941f7c8@davyandbeth.com> Date: Wed, 22 Feb 2023 19:15:28 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 From: Davy Durham To: ffmpeg-devel@ffmpeg.org Content-Language: en-US Subject: [FFmpeg-devel] [PATCH] dash metadata: Added other supported fields besides title only X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Now metadata fields for source, copyright, lang and moreInformationURL are supported too. Evidence for the need of such support: https://docs.rs/dash-mpd/0.6.3/dash_mpd/struct.ProgramInformation.html and https://github.com/DroidFreak32/myjio_unrestrict/blob/805a8b48d02c5618608bf6fb2bfc2b450f1f057a/smali_classes2/com/google/android/exoplayer2/source/dash/manifest/ProgramInformation.smali#L19 Signed-off-by: Davy Durham --- libavformat/dashenc.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 295b01e225..e45eca3468 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -1141,6 +1141,10 @@ static int write_manifest(AVFormatContext *s, int final) int use_rename = proto && !strcmp(proto, "file"); static unsigned int warned_non_file = 0; AVDictionaryEntry *title = av_dict_get(s->metadata, "title", NULL, 0); + AVDictionaryEntry *source = av_dict_get(s->metadata, "source", NULL, 0); + AVDictionaryEntry *copyright = av_dict_get(s->metadata, "copyright", NULL, 0); + AVDictionaryEntry *lang = av_dict_get(s->metadata, "lang", NULL, 0); + AVDictionaryEntry *moreInformationURL = av_dict_get(s->metadata, "moreInformationURL", NULL, 0); AVDictionary *opts = NULL; if (!use_rename && !warned_non_file++) @@ -1203,6 +1207,26 @@ static int write_manifest(AVFormatContext *s, int final) avio_printf(out, "\t\t%s\n", escaped); av_free(escaped); } + if (source) { + char *escaped = xmlescape(source->value); + avio_printf(out, "\t\t%s\n", escaped); + av_free(escaped); + } + if (copyright) { + char *escaped = xmlescape(copyright->value); + avio_printf(out, "\t\t%s\n", escaped); + av_free(escaped); + } + if (lang) { + char *escaped = xmlescape(lang->value); + avio_printf(out, "\t\t%s\n", escaped); + av_free(escaped); + } + if (moreInformationURL) { + char *escaped = xmlescape(moreInformationURL->value); + avio_printf(out, "\t\t%s\n", escaped); + av_free(escaped); + } avio_printf(out, "\t\n"); avio_printf(out, "\t\n"); -- 2.25.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".