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 3687348D9F for ; Fri, 26 Jan 2024 18:04:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2142168D157; Fri, 26 Jan 2024 20:04:42 +0200 (EET) Received: from gandalf.ektacom.com (gandalf.ektacom.com [62.23.45.26]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1E53E68CBD3 for ; Fri, 26 Jan 2024 20:04:36 +0200 (EET) Received: from ektacom.com (mail.ektacom.com [82.64.203.93]) by gandalf.ektacom.com (Postfix) with ESMTP id C0FF545A266 for ; Fri, 26 Jan 2024 19:04:35 +0100 (CET) Content-Type: multipart/mixed; boundary="------------Y0UdOM8q5JLLDYAhAR0V3prP" Message-ID: <437d32e7-19a2-48c1-978c-84e8f195b1a3@ektacom.com> Date: Fri, 26 Jan 2024 19:04:30 +0100 MIME-Version: 1.0 Content-Language: en-US To: FFmpeg development discussions and patches From: =?UTF-8?Q?C=C3=A9dric_Le_Barz?= X-MailScanner-ID: E111F1F7C1DB.A8241 X-MailScanner: Found to be clean X-MailScanner-From: clebarz@ektacom.com X-Spam-Status: No Subject: [FFmpeg-devel] [PATCH] [MXF] - Add "footer_with_hmd" option 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: This is a multi-part message in MIME format. --------------Y0UdOM8q5JLLDYAhAR0V3prP Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Add "footer_with_hmd" option: this option activates the writing of the header metadata in the footer partition. --------------Y0UdOM8q5JLLDYAhAR0V3prP Content-Type: message/rfc822; name="0001-Add-footer_with_hmd-option.eml" Content-Disposition: attachment; filename="0001-Add-footer_with_hmd-option.eml" Content-Transfer-Encoding: 7bit From: Cedric Le Barz Date: Fri, 26 Jan 2024 18:55:28 +0100 Subject: [PATCH] Add footer_with_hmd option. X-Unsent: 1 To: ffmpeg-devel@ffmpeg.org Signed-off-by: Cedric Le Barz --- ffmpeg/libavformat/mxfenc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ffmpeg/libavformat/mxfenc.c b/ffmpeg/libavformat/mxfenc.c index 0f13068..79c92e1 100644 --- a/ffmpeg/libavformat/mxfenc.c +++ b/ffmpeg/libavformat/mxfenc.c @@ -480,6 +480,7 @@ typedef struct MXFContext { int cbr_index; ///< use a constant bitrate index uint8_t unused_tags[MXF_NUM_TAGS]; ///< local tags that we know will not be used MXFStreamContext timecode_track_priv; + int footer_with_hmd; // Flag to activate header metadata writing in footer partition } MXFContext; static void mxf_write_uuid(AVIOContext *pb, enum MXFMetadataSetType type, int value) @@ -3420,10 +3421,10 @@ static int mxf_write_footer(AVFormatContext *s) mxf_write_klv_fill(s); mxf->footer_partition_offset = avio_tell(pb); if (mxf->edit_unit_byte_count && !IS_OPATOM(s)) { // no need to repeat index - if ((err = mxf_write_partition(s, 0, 0, footer_partition_key, 0)) < 0) + if ((err = mxf_write_partition(s, 0, 0, footer_partition_key, mxf->footer_with_hmd)) < 0) return err; } else { - if ((err = mxf_write_partition(s, 0, 2, footer_partition_key, 0)) < 0) + if ((err = mxf_write_partition(s, 0, 2, footer_partition_key, mxf->footer_with_hmd)) < 0) return err; mxf_write_klv_fill(s); mxf_write_index_table_segment(s); @@ -3567,6 +3568,8 @@ static const AVOption mxf_options[] = { MXF_COMMON_OPTIONS { "store_user_comments", "", offsetof(MXFContext, store_user_comments), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM}, + { "footer_with_hmd", "", + offsetof(MXFContext, footer_with_hmd), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM}, { NULL }, }; -- 2.34.1 --------------Y0UdOM8q5JLLDYAhAR0V3prP Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --------------Y0UdOM8q5JLLDYAhAR0V3prP--