* [FFmpeg-devel] [PATCH] [MXF] - Add "footer_with_hmd" option
@ 2024-02-09 10:58 Cédric Le Barz
2024-02-19 10:39 ` Tomas Härdin
0 siblings, 1 reply; 5+ messages in thread
From: Cédric Le Barz @ 2024-02-09 10:58 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1: Type: text/plain, Size: 124 bytes --]
Add "footer_with_hmd" option: this option activates the writing of the
header metadata in the footer partition.
Cédric
[-- Attachment #2: 0001-Add-footer_with_hmd-option.eml --]
[-- Type: message/rfc822, Size: 2057 bytes --]
From: Cedric Le Barz <clebarz@ektacom.com>
To: ffmpeg-devel@ffmpeg.org
Subject: [PATCH] Add footer_with_hmd option.
Date: Fri, 26 Jan 2024 18:55:28 +0100
Signed-off-by: Cedric Le Barz <clebarz@ektacom.com>
---
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
[-- Attachment #3: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [PATCH] [MXF] - Add "footer_with_hmd" option
2024-02-09 10:58 [FFmpeg-devel] [PATCH] [MXF] - Add "footer_with_hmd" option Cédric Le Barz
@ 2024-02-19 10:39 ` Tomas Härdin
2024-02-21 7:47 ` Cédric Le Barz
0 siblings, 1 reply; 5+ messages in thread
From: Tomas Härdin @ 2024-02-19 10:39 UTC (permalink / raw)
To: FFmpeg development discussions and patches
fre 2024-02-09 klockan 11:58 +0100 skrev Cédric Le Barz:
> Add "footer_with_hmd" option: this option activates the writing of
> the
> header metadata in the footer partition.
Sounds useful for writing MXF to a stream.
Could use a test.
/Tomas
_______________________________________________
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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [PATCH] [MXF] - Add "footer_with_hmd" option
2024-02-19 10:39 ` Tomas Härdin
@ 2024-02-21 7:47 ` Cédric Le Barz
2024-02-21 13:14 ` Tomas Härdin
0 siblings, 1 reply; 5+ messages in thread
From: Cédric Le Barz @ 2024-02-21 7:47 UTC (permalink / raw)
To: 'FFmpeg development discussions and patches'
-----Message d'origine-----
De : ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> De la part de Tomas Härdin
Envoyé : lundi 19 février 2024 11:40
À : FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Objet : Re: [FFmpeg-devel] [PATCH] [MXF] - Add "footer_with_hmd" option
fre 2024-02-09 klockan 11:58 +0100 skrev Cédric Le Barz:
> Add "footer_with_hmd" option: this option activates the writing of the
> header metadata in the footer partition.
Sounds useful for writing MXF to a stream.
Could use a test.
/Tomas
_______________________________________________
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".
Hi Tomas,
What do you mean by "Could you a test.".
Thanks,
Cédric
_______________________________________________
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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [PATCH] [MXF] - Add "footer_with_hmd" option
2024-02-21 7:47 ` Cédric Le Barz
@ 2024-02-21 13:14 ` Tomas Härdin
0 siblings, 0 replies; 5+ messages in thread
From: Tomas Härdin @ 2024-02-21 13:14 UTC (permalink / raw)
To: FFmpeg development discussions and patches
ons 2024-02-21 klockan 08:47 +0100 skrev Cédric Le Barz:
>
>
> -----Message d'origine-----
> De : ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> De la part de
> Tomas Härdin
> Envoyé : lundi 19 février 2024 11:40
> À : FFmpeg development discussions and patches
> <ffmpeg-devel@ffmpeg.org>
> Objet : Re: [FFmpeg-devel] [PATCH] [MXF] - Add "footer_with_hmd"
> option
>
> fre 2024-02-09 klockan 11:58 +0100 skrev Cédric Le Barz:
> > Add "footer_with_hmd" option: this option activates the writing of
> > the
> > header metadata in the footer partition.
>
> Sounds useful for writing MXF to a stream.
>
> Could use a test.
>
> /Tomas
> _______________________________________________
> 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".
>
>
>
>
> Hi Tomas,
>
> What do you mean by "Could you a test.".
> Thanks,
I mean a test that uses the option and then we check the hash of the
output so that we don't have regressions in the future.
/Tomas
_______________________________________________
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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* [FFmpeg-devel] [PATCH] [MXF] - Add "footer_with_hmd" option
@ 2024-01-26 18:04 Cédric Le Barz
0 siblings, 0 replies; 5+ messages in thread
From: Cédric Le Barz @ 2024-01-26 18:04 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1: Type: text/plain, Size: 113 bytes --]
Add "footer_with_hmd" option: this option activates the writing of the
header metadata in the footer partition.
[-- Attachment #2: 0001-Add-footer_with_hmd-option.eml --]
[-- Type: message/rfc822, Size: 2057 bytes --]
From: Cedric Le Barz <clebarz@ektacom.com>
To: ffmpeg-devel@ffmpeg.org
Subject: [PATCH] Add footer_with_hmd option.
Date: Fri, 26 Jan 2024 18:55:28 +0100
Signed-off-by: Cedric Le Barz <clebarz@ektacom.com>
---
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
[-- Attachment #3: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-02-21 13:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-09 10:58 [FFmpeg-devel] [PATCH] [MXF] - Add "footer_with_hmd" option Cédric Le Barz
2024-02-19 10:39 ` Tomas Härdin
2024-02-21 7:47 ` Cédric Le Barz
2024-02-21 13:14 ` Tomas Härdin
-- strict thread matches above, loose matches on Subject: below --
2024-01-26 18:04 Cédric Le Barz
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git