[FFmpeg-devel] [PATCH] avformat/mxfdec: export operational pattern UL as file metadata
Marton Balint
cus at passwd.hu
Thu Apr 11 23:20:38 EEST 2019
On Thu, 11 Apr 2019, Marton Balint wrote:
>
>
> On Mon, 8 Apr 2019, Tomas Härdin wrote:
>
>> On 2019-04-03 21:35, Marton Balint wrote:
>>> Can be useful for API users as ffmpeg/libavformat can't properly support
>> some
>>> operational patterns.
>>>
>>> Signed-off-by: Marton Balint <cus at passwd.hu>
>>> ---
>>> libavformat/mxfdec.c | 7 +++++++
>>> tests/ref/fate/mxf-probe-d10 | 1 +
>>> tests/ref/fate/mxf-probe-dnxhd | 1 +
>>> tests/ref/fate/mxf-probe-dv25 | 1 +
>>> 4 files changed, 10 insertions(+)
>>>
>>> diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
>>> index 1ba8ecd4a6..8c65a2bbcf 100644
>>> --- a/libavformat/mxfdec.c
>>> +++ b/libavformat/mxfdec.c
>>> @@ -718,6 +719,12 @@ static int mxf_read_partition_pack(void *arg,
>> AVIOContext *pb, int tag, int size
>>> }
>>> nb_essence_containers = avio_rb32(pb);
>>>
>>> + if (partition->type == Header) {
>>> + char str[36];
>>> + snprintf(str, sizeof(str), "%08x.%08x.%08x.%08x",
> AV_RB32(&op[0]),
>> AV_RB32(&op[4]), AV_RB32(&op[8]), AV_RB32(&op[12]));
>>
>> I was unsure wheter this was the official format for UL, so I went and
>> checked. SMPTE uses the same in their XML registry:
>> https://registry.smpte-ra.org/view/published/Labels.xml
>>
>> Example: urn:smpte:ul:060e2b34.04010101.01010100.00000000
>>
>> In other words: looks OK to me
>
> Thanks, applied.
The metadata tag name became "operational_pattern", I wonder if it might
make more sense to use "operational_pattern_ul" instead, it feels a little
more consistent with the other custom mxf metadata entries.
It is not too late to change, what do you think?
Thanks,
Marton
More information about the ffmpeg-devel
mailing list