Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Marton Balint <cus@passwd.hu>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 1/2] avformat/mxfenc: allow more bits for variable part in uuid generation
Date: Mon, 14 Mar 2022 20:57:09 +0100 (CET)
Message-ID: <c064fbb0-28f6-3a98-5b24-ac5e3ddcb5ee@passwd.hu> (raw)
In-Reply-To: <64715bd8a8e1363c81e10be79ac36623cf86becb.camel@acc.umu.se>



On Mon, 14 Mar 2022, Tomas Härdin wrote:

> mån 2022-03-14 klockan 19:49 +0100 skrev Marton Balint:
>> Also make sure we do not change the product UID.
>> 
>> Signed-off-by: Marton Balint <cus@passwd.hu>
>> ---
>>  libavformat/mxfenc.c                    | 9 +++++----
>>  tests/ref/fate/copy-trac4914            | 2 +-
>>  tests/ref/fate/mxf-d10-user-comments    | 6 +++---
>>  tests/ref/fate/mxf-opatom-user-comments | 2 +-
>>  tests/ref/fate/mxf-reel_name            | 2 +-
>>  tests/ref/fate/mxf-user-comments        | 2 +-
>>  tests/ref/fate/time_base                | 2 +-
>>  tests/ref/lavf/mxf                      | 6 +++---
>>  tests/ref/lavf/mxf_d10                  | 2 +-
>>  tests/ref/lavf/mxf_dv25                 | 2 +-
>>  tests/ref/lavf/mxf_dvcpro50             | 2 +-
>>  tests/ref/lavf/mxf_opatom               | 2 +-
>>  tests/ref/lavf/mxf_opatom_audio         | 2 +-
>>  13 files changed, 21 insertions(+), 20 deletions(-)
>> 
>> diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
>> index 1e87dc6111..ba8e7babfb 100644
>> --- a/libavformat/mxfenc.c
>> +++ b/libavformat/mxfenc.c
>> @@ -227,7 +227,8 @@ static const UID mxf_d10_container_uls[] = {
>>      {
>> 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x01
>> ,0x06,0x01 }, // D-10 525/50 NTSC 30mb/s
>>  };
>>  
>> -static const uint8_t uuid_base[]            = {
>> 0xAD,0xAB,0x44,0x24,0x2f,0x25,0x4d,0xc7,0x92,0xff,0x29,0xbd };
>> +static const uint8_t product_uid[]          = {
>> 0xAD,0xAB,0x44,0x24,0x2f,0x25,0x4d,0xc7,0x92,0xff,0x29,0xbd,0x00,0x0c
>> ,0x00,0x02};
>
> Maybe use Identification instead of 0x0C.

Actually I'd rather keep it 0x0C, Identification value might change (if 
MXFMetadataSetType enum is reordered in mxf.h), and we don't want 
ProductUID to change even then...

Thanks,
Marton

>
>> +static const uint8_t uuid_base[]            = {
>> 0xAD,0xAB,0x44,0x24,0x2f,0x25,0x4d,0xc7,0x92,0xff };
>>  static const uint8_t umid_ul[]              = {
>> 0x06,0x0A,0x2B,0x34,0x01,0x01,0x01,0x05,0x01,0x01,0x0D,0x00,0x13 };
>>  
>>  /**
>> @@ -424,9 +425,9 @@ typedef struct MXFContext {
>>  
>>  static void mxf_write_uuid(AVIOContext *pb, enum MXFMetadataSetType
>> type, int value)
>>  {
>> -    avio_write(pb, uuid_base, 12);
>> +    avio_write(pb, uuid_base, 10);
>>      avio_wb16(pb, type);
>> -    avio_wb16(pb, value);
>> +    avio_wb32(pb, value);
>>  }
>>  
>>  static void mxf_write_umid(AVFormatContext *s, int type)
>> @@ -797,7 +798,7 @@ static void
>> mxf_write_identification(AVFormatContext *s)
>>  
>>      // write product uid
>>      mxf_write_local_tag(s, 16, 0x3C05);
>> -    mxf_write_uuid(pb, Identification, 2);
>> +    avio_write(pb, product_uid, 16);
>
> For those wondering, the purpose of this not using mxf_write_uuid() is
> likely to keep ProductUID the same after this patch. This is of course
> good if a bit ugly since the calls with 0 and 1 are still there. Oh
> well.
>
> /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".
_______________________________________________
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".

  reply	other threads:[~2022-03-14 19:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14 18:49 Marton Balint
2022-03-14 18:49 ` [FFmpeg-devel] [PATCH 2/2] avformat/mxfenc: do not write index tables with the same InstanceUID Marton Balint
2022-03-14 19:40   ` Tomas Härdin
2022-03-14 19:54     ` Marton Balint
2022-03-14 20:24       ` Tomas Härdin
2022-03-14 20:44         ` Marton Balint
2022-03-16 19:20           ` Tomas Härdin
2022-03-16 19:38             ` Marton Balint
2022-03-16 20:06               ` Tomas Härdin
2022-03-16 21:17                 ` Marton Balint
2022-03-14 19:35 ` [FFmpeg-devel] [PATCH 1/2] avformat/mxfenc: allow more bits for variable part in uuid generation Tomas Härdin
2022-03-14 19:57   ` Marton Balint [this message]
2022-03-14 20:21     ` Tomas Härdin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c064fbb0-28f6-3a98-5b24-ac5e3ddcb5ee@passwd.hu \
    --to=cus@passwd.hu \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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