diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-04-06 21:44:23 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-05-08 23:02:58 +0200 |
commit | 530ac1e50bd7f99e5cedca40a7a94ac7f49d9902 (patch) | |
tree | ae67b12733731db63cfa8e986607ddc0c07fc8f1 | |
parent | 1246754c80a4967e41a4d38c0d5363f87331de47 (diff) | |
download | ffmpeg-530ac1e50bd7f99e5cedca40a7a94ac7f49d9902.tar.gz |
avformat/mxfenc: Write Audio Ref Level for D10
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/mxfenc.c | 8 | ||||
-rw-r--r-- | tests/ref/fate/copy-trac4914 | 2 | ||||
-rw-r--r-- | tests/ref/fate/mxf-reel_name | 2 | ||||
-rw-r--r-- | tests/ref/fate/time_base | 2 | ||||
-rw-r--r-- | tests/ref/lavf/mxf | 6 | ||||
-rw-r--r-- | tests/ref/lavf/mxf_d10 | 2 | ||||
-rw-r--r-- | tests/ref/lavf/mxf_dv25 | 2 | ||||
-rw-r--r-- | tests/ref/lavf/mxf_dvcpro50 | 2 | ||||
-rw-r--r-- | tests/ref/lavf/mxf_opatom | 2 | ||||
-rw-r--r-- | tests/ref/lavf/mxf_opatom_audio | 2 |
10 files changed, 19 insertions, 11 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 80c3f933c9..f3122cbc8b 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -500,6 +500,7 @@ static const MXFLocalTagPair mxf_local_tag_batch[] = { // Generic Sound Essence Descriptor { 0x3D02, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x04,0x04,0x02,0x03,0x01,0x04,0x00,0x00,0x00}}, /* Locked/Unlocked */ { 0x3D03, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x02,0x03,0x01,0x01,0x01,0x00,0x00}}, /* Audio sampling rate */ + { 0x3D04, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x02,0x01,0x01,0x03,0x00,0x00,0x00}}, /* Audio Ref Level */ { 0x3D07, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x02,0x01,0x01,0x04,0x00,0x00,0x00}}, /* ChannelCount */ { 0x3D01, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x04,0x04,0x02,0x03,0x03,0x04,0x00,0x00,0x00}}, /* Quantization bits */ { 0x3D06, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x02,0x04,0x02,0x00,0x00,0x00,0x00}}, /* Sound Essence Compression */ @@ -1298,6 +1299,8 @@ static void mxf_write_generic_sound_common(AVFormatContext *s, AVStream *st, con if (s->oformat == &ff_mxf_opatom_muxer) duration_size = 12; + if (s->oformat == &ff_mxf_d10_muxer) + size += 5; mxf_write_generic_desc(s, st, key, size+duration_size+5+12+8+8); @@ -1315,6 +1318,11 @@ static void mxf_write_generic_sound_common(AVFormatContext *s, AVStream *st, con avio_wb32(pb, st->codecpar->sample_rate); avio_wb32(pb, 1); + if (s->oformat == &ff_mxf_d10_muxer) { + mxf_write_local_tag(pb, 1, 0x3D04); + avio_w8(pb, 0); + } + mxf_write_local_tag(pb, 4, 0x3D07); if (mxf->channel_count == -1) { if (show_warnings && (s->oformat == &ff_mxf_d10_muxer) && (st->codecpar->channels != 4) && (st->codecpar->channels != 8)) diff --git a/tests/ref/fate/copy-trac4914 b/tests/ref/fate/copy-trac4914 index e9fafdc2b4..6bc8f1c4e3 100644 --- a/tests/ref/fate/copy-trac4914 +++ b/tests/ref/fate/copy-trac4914 @@ -1,4 +1,4 @@ -d44bf57681071b6b45bb8bab782895af *tests/data/fate/copy-trac4914.mxf +631ee839b737fa56b4af1d57b588696c *tests/data/fate/copy-trac4914.mxf 561721 tests/data/fate/copy-trac4914.mxf #tb 0: 1001/30000 #media_type 0: video diff --git a/tests/ref/fate/mxf-reel_name b/tests/ref/fate/mxf-reel_name index 41570dad88..76c1c3c8df 100644 --- a/tests/ref/fate/mxf-reel_name +++ b/tests/ref/fate/mxf-reel_name @@ -1 +1 @@ -a5fdbd2155093f6eac0eaa2392cdb792 +d0a2d75af1c4ba8c96651ec366a50e49 diff --git a/tests/ref/fate/time_base b/tests/ref/fate/time_base index 369d73ccd1..488d17ef87 100644 --- a/tests/ref/fate/time_base +++ b/tests/ref/fate/time_base @@ -1 +1 @@ -90067b01fef77a4c5cad419bca2462b2 +7a9d8ea19bf2f14f1af680c050c88d0d diff --git a/tests/ref/lavf/mxf b/tests/ref/lavf/mxf index 098a3c25be..6f1b99ad99 100644 --- a/tests/ref/lavf/mxf +++ b/tests/ref/lavf/mxf @@ -1,9 +1,9 @@ -a530ecfc5521150f72ee3e735815d964 *./tests/data/lavf/lavf.mxf +27bbd27662f99181fbaa8c6b7b32aee2 *./tests/data/lavf/lavf.mxf 526393 ./tests/data/lavf/lavf.mxf ./tests/data/lavf/lavf.mxf CRC=0x8dddfaab -49a27701521b717dd501041f1e5a4476 *./tests/data/lavf/lavf.mxf +69ad89b94977f29fa54446680c17c43c *./tests/data/lavf/lavf.mxf 561721 ./tests/data/lavf/lavf.mxf ./tests/data/lavf/lavf.mxf CRC=0xf21b1b48 -1a03fa10b8774749304af4cbedd8c4bd *./tests/data/lavf/lavf.mxf +375b804000535385db5f7ed748599fba *./tests/data/lavf/lavf.mxf 526393 ./tests/data/lavf/lavf.mxf ./tests/data/lavf/lavf.mxf CRC=0x8dddfaab diff --git a/tests/ref/lavf/mxf_d10 b/tests/ref/lavf/mxf_d10 index 87214a89a8..bfed6a3198 100644 --- a/tests/ref/lavf/mxf_d10 +++ b/tests/ref/lavf/mxf_d10 @@ -1,3 +1,3 @@ -cec3289b3a7a92b36a6d7f30a0251d91 *./tests/data/lavf/lavf.mxf_d10 +0bf4c7b8cc8d00290b151991ff8a675e *./tests/data/lavf/lavf.mxf_d10 5332013 ./tests/data/lavf/lavf.mxf_d10 ./tests/data/lavf/lavf.mxf_d10 CRC=0x6c74d488 diff --git a/tests/ref/lavf/mxf_dv25 b/tests/ref/lavf/mxf_dv25 index 1bba6897df..05ac619356 100644 --- a/tests/ref/lavf/mxf_dv25 +++ b/tests/ref/lavf/mxf_dv25 @@ -1,3 +1,3 @@ -2e525e922e2809914983922e6a2f41f4 *./tests/data/lavf/lavf.mxf_dv25 +20a759ba52bbdc614f3ea448bab1eb90 *./tests/data/lavf/lavf.mxf_dv25 3834413 ./tests/data/lavf/lavf.mxf_dv25 ./tests/data/lavf/lavf.mxf_dv25 CRC=0xbdaf7f52 diff --git a/tests/ref/lavf/mxf_dvcpro50 b/tests/ref/lavf/mxf_dvcpro50 index d44ed37399..e9c73d6c71 100644 --- a/tests/ref/lavf/mxf_dvcpro50 +++ b/tests/ref/lavf/mxf_dvcpro50 @@ -1,3 +1,3 @@ -a3d99dfeec77a06c9033f147b3d2d1f8 *./tests/data/lavf/lavf.mxf_dvcpro50 +8b68190fc95b97e21c260d2b134bf003 *./tests/data/lavf/lavf.mxf_dvcpro50 7431213 ./tests/data/lavf/lavf.mxf_dvcpro50 ./tests/data/lavf/lavf.mxf_dvcpro50 CRC=0xe3bbe4b4 diff --git a/tests/ref/lavf/mxf_opatom b/tests/ref/lavf/mxf_opatom index 81dec6931c..99c57260df 100644 --- a/tests/ref/lavf/mxf_opatom +++ b/tests/ref/lavf/mxf_opatom @@ -1,3 +1,3 @@ -9a34611080ea36a627fbbaebebcef930 *./tests/data/lavf/lavf.mxf_opatom +9e3d53baab0f805e6642500ea469682b *./tests/data/lavf/lavf.mxf_opatom 4717625 ./tests/data/lavf/lavf.mxf_opatom ./tests/data/lavf/lavf.mxf_opatom CRC=0xf55aa22a diff --git a/tests/ref/lavf/mxf_opatom_audio b/tests/ref/lavf/mxf_opatom_audio index 9694f73cc0..9c61bedb70 100644 --- a/tests/ref/lavf/mxf_opatom_audio +++ b/tests/ref/lavf/mxf_opatom_audio @@ -1,3 +1,3 @@ -5b74d1bcf272f26023a375bf778fae5e *./tests/data/lavf/lavf.mxf_opatom_audio +8e1351b9aac6292d69df2d4af42e7040 *./tests/data/lavf/lavf.mxf_opatom_audio 102969 ./tests/data/lavf/lavf.mxf_opatom_audio ./tests/data/lavf/lavf.mxf_opatom_audio CRC=0xd155c6ff |