]> git.sesse.net Git - ffmpeg/commitdiff
avformat/mxf: add platform local tag
authorLimin Wang <lance.lmwang@gmail.com>
Mon, 1 Feb 2021 23:17:44 +0000 (07:17 +0800)
committerLimin Wang <lance.lmwang@gmail.com>
Fri, 5 Feb 2021 01:27:06 +0000 (09:27 +0800)
Please check the string of platform with below command:
./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy out.mxf
./ffmpeg -i out.mxf
....
application_platform: Lavf (linux)

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
14 files changed:
configure
libavformat/mxfenc.c
tests/ref/fate/copy-trac4914
tests/ref/fate/mxf-d10-user-comments
tests/ref/fate/mxf-opatom-user-comments
tests/ref/fate/mxf-reel_name
tests/ref/fate/mxf-user-comments
tests/ref/fate/time_base
tests/ref/lavf/mxf
tests/ref/lavf/mxf_d10
tests/ref/lavf/mxf_dv25
tests/ref/lavf/mxf_dvcpro50
tests/ref/lavf/mxf_opatom
tests/ref/lavf/mxf_opatom_audio

index df298b4b9ba914a1343265709bc0e6aa38ae6f22..a092a6b457a9eb1b269eab4685eb4923ef4685d1 100755 (executable)
--- a/configure
+++ b/configure
@@ -7579,6 +7579,7 @@ cat > $TMPH <<EOF
 #define FFMPEG_DATADIR "$(eval c_escape $datadir)"
 #define AVCONV_DATADIR "$(eval c_escape $datadir)"
 #define CC_IDENT "$(c_escape ${cc_ident:-Unknown compiler})"
+#define OS_NAME $target_os
 #define av_restrict $restrict_keyword
 #define EXTERN_PREFIX "${extern_prefix}"
 #define EXTERN_ASM ${extern_prefix}
index b0cfa878246675aeb2574a0473dfffbd400276f8..39ab443a04627644b54311286e2509ed1dfeb4bd 100644 (file)
@@ -752,12 +752,14 @@ static void store_version(AVFormatContext *s){
     avio_wb16(pb, 0); // release
 }
 
+#define PLATFROM_IDENT "Lavf " AV_STRINGIFY((OS_NAME))
 static void mxf_write_identification(AVFormatContext *s)
 {
     MXFContext *mxf = s->priv_data;
     AVIOContext *pb = s->pb;
     const char *company = "FFmpeg";
     const char *product = s->oformat != &ff_mxf_opatom_muxer ? "OP1a Muxer" : "OPAtom Muxer";
+    const char *platform = s->flags & AVFMT_FLAG_BITEXACT ? "Lavf" : PLATFROM_IDENT;
     const char *version;
     int length;
 
@@ -768,6 +770,7 @@ static void mxf_write_identification(AVFormatContext *s)
         "0.0.0" : AV_STRINGIFY(LIBAVFORMAT_VERSION);
     length = 100 +mxf_utf16_local_tag_length(company) +
                   mxf_utf16_local_tag_length(product) +
+                  mxf_utf16_local_tag_length(platform) +
                   mxf_utf16_local_tag_length(version);
     klv_encode_ber_length(pb, length);
 
@@ -786,6 +789,7 @@ static void mxf_write_identification(AVFormatContext *s)
     store_version(s);
 
     mxf_write_local_tag_utf16(s, 0x3C04, version); // Version String
+    mxf_write_local_tag_utf16(s, 0x3C08, platform); // Platform
 
     // write product uid
     mxf_write_local_tag(s, 16, 0x3C05);
index e8f8afb4671c8d8f59b42520e5b5f00e2aee9cfc..743dc8c055df4ce2002ddd1e0626783d5122ae6f 100644 (file)
@@ -1,4 +1,4 @@
-5d58a32f21b78169d925845f783054e6 *tests/data/fate/copy-trac4914.mxf
+f5150fb82c1bb5a90906fce93dcc3f76 *tests/data/fate/copy-trac4914.mxf
 561721 tests/data/fate/copy-trac4914.mxf
 #tb 0: 1001/30000
 #media_type 0: video
index 3b9d9d2142a87d761a6d579a283f0724549c3819..c35add02797ab20c0c58192565e953e948fe8b6c 100644 (file)
@@ -1 +1 @@
-fe9b43f5b6e7737fe2670b660fd3d860
+7bb9f39e8e05724525154de17f0235d8
index be57eb4e19079e573f8432bb2a7a673fcdeaa3ee..ec4fdff425dd5e71f78cd7c22879892994ce4594 100644 (file)
@@ -1 +1 @@
-9b3d7201c37c5783702774e46e0da141
+8475bebf3448a972ae89ba59309fd7d6
index acda8fe43a6eb605fe4d6d743d81459a93339e6d..d50f0f699028d6efcd7a118b90cee7e7c0571bbf 100644 (file)
@@ -1 +1 @@
-422d6ed4821e7bbecbcdecc553abc6e4
+ce49a0361d3f79106e1952d387eace51
index 3b77db9118a61a264e3a9118fdf38c985c2d9408..5fcdc5806a2655d4216a4e423686c114c8490177 100644 (file)
@@ -1 +1 @@
-c77b632dbcdacd6466e1ec794917556e
+956f653cd75e1a319569caec9df81b4f
index d3c97956d63cda94bea8017f73c295e87824108f..28815d08284011872d9d082f582bce64319c3ab8 100644 (file)
@@ -1 +1 @@
-e5c9da6972b6f6e7b15bcbbf20a9dbd1
+78ac0348027b75d73acb8bea14e67a59
index 1b1fe1a734593e9ee26868178ccc988a8c3639cd..21bf2be51372c2835fcb73a7194b51dd61d55af1 100644 (file)
@@ -1,9 +1,9 @@
-1703da2e9f0ca49a5f0bcbcc6944c9c0 *tests/data/lavf/lavf.mxf
+8938d5c4a396ff1b24d10d4f917ae1c9 *tests/data/lavf/lavf.mxf
 526393 tests/data/lavf/lavf.mxf
 tests/data/lavf/lavf.mxf CRC=0x8dddfaab
-b44c4f138f1a87256211c3112dd52c87 *tests/data/lavf/lavf.mxf
+93ea2cfdf5dda7fffdc0d2fdcfb6a9a4 *tests/data/lavf/lavf.mxf
 561721 tests/data/lavf/lavf.mxf
 tests/data/lavf/lavf.mxf CRC=0x96ff1b48
-9ede3c95054c30eb815fbe598a1f097b *tests/data/lavf/lavf.mxf
+87bdf844ae34bcc758e44419e80177a0 *tests/data/lavf/lavf.mxf
 526393 tests/data/lavf/lavf.mxf
 tests/data/lavf/lavf.mxf CRC=0x8dddfaab
index 19e6f20b5100726f49bfe6208e2dc723a3434f9a..47ef244cb1f85e0ae41f7d21962feb0022225cbc 100644 (file)
@@ -1,3 +1,3 @@
-c72f1f3d6ce555f96946c421f705f880 *tests/data/lavf/lavf.mxf_d10
+7f16902e28718c2a92bc082400a1c6ee *tests/data/lavf/lavf.mxf_d10
 5332013 tests/data/lavf/lavf.mxf_d10
 tests/data/lavf/lavf.mxf_d10 CRC=0x6c74d488
index 2951538caefa40c7e8b91e10c447dacae0fff17d..92509cf1f4fd7634445c40358f260fc739791e93 100644 (file)
@@ -1,3 +1,3 @@
-5048796729fba47e9614a177c370e850 *tests/data/lavf/lavf.mxf_dv25
+106e33eb1634595623f0334e92204b65 *tests/data/lavf/lavf.mxf_dv25
 3834413 tests/data/lavf/lavf.mxf_dv25
 tests/data/lavf/lavf.mxf_dv25 CRC=0xbdaf7f52
index 9df2fc925d53f523112f07a54a184c5dc2fea8df..2d569b05535e6e25caa3a9eeccbc1061a6273e5d 100644 (file)
@@ -1,3 +1,3 @@
-7023122fc4bcd5c12de6a33cc78ce9b8 *tests/data/lavf/lavf.mxf_dvcpro50
+3d5a303c22666996700f0e8f6e4cb938 *tests/data/lavf/lavf.mxf_dvcpro50
 7431213 tests/data/lavf/lavf.mxf_dvcpro50
 tests/data/lavf/lavf.mxf_dvcpro50 CRC=0xe3bbe4b4
index bff36e02bedbf09ebfb620b36637582b05b5b090..61e755550be6867844b553cf915e7665f8444d73 100644 (file)
@@ -1,3 +1,3 @@
-8a4c5680b0955d4e2abecfb1c37a56d4 *tests/data/lavf/lavf.mxf_opatom
+5d235c127ace64b1f4fe6c79a7ca8be6 *tests/data/lavf/lavf.mxf_opatom
 4717625 tests/data/lavf/lavf.mxf_opatom
 tests/data/lavf/lavf.mxf_opatom CRC=0xf55aa22a
index 5c65a373e27ad758bc241da80896cccfb1728a92..97362e7aa40b2dcdc3f0f3774c53e0ec1812921b 100644 (file)
@@ -1,3 +1,3 @@
-697f4eb4a472909945222d7750145f80 *tests/data/lavf/lavf.mxf_opatom_audio
+c356a3fdd49a1e015961678e837c12bb *tests/data/lavf/lavf.mxf_opatom_audio
 102969 tests/data/lavf/lavf.mxf_opatom_audio
 tests/data/lavf/lavf.mxf_opatom_audio CRC=0xd155c6ff