aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2021-02-02 07:17:44 +0800
committerLimin Wang <lance.lmwang@gmail.com>2021-02-05 09:27:06 +0800
commit9605307e7854ac4941ae4e7400b997612fa6712c (patch)
treebac41f41044026f1ede65e83e86c949b477b1d11
parent3f8db7eea0bc22148f0e27906d85975708b842ea (diff)
downloadffmpeg-9605307e7854ac4941ae4e7400b997612fa6712c.tar.gz
avformat/mxf: add platform local tag
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>
-rwxr-xr-xconfigure1
-rw-r--r--libavformat/mxfenc.c4
-rw-r--r--tests/ref/fate/copy-trac49142
-rw-r--r--tests/ref/fate/mxf-d10-user-comments2
-rw-r--r--tests/ref/fate/mxf-opatom-user-comments2
-rw-r--r--tests/ref/fate/mxf-reel_name2
-rw-r--r--tests/ref/fate/mxf-user-comments2
-rw-r--r--tests/ref/fate/time_base2
-rw-r--r--tests/ref/lavf/mxf6
-rw-r--r--tests/ref/lavf/mxf_d102
-rw-r--r--tests/ref/lavf/mxf_dv252
-rw-r--r--tests/ref/lavf/mxf_dvcpro502
-rw-r--r--tests/ref/lavf/mxf_opatom2
-rw-r--r--tests/ref/lavf/mxf_opatom_audio2
14 files changed, 19 insertions, 14 deletions
diff --git a/configure b/configure
index df298b4b9b..a092a6b457 100755
--- 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}
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index b0cfa87824..39ab443a04 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -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);
diff --git a/tests/ref/fate/copy-trac4914 b/tests/ref/fate/copy-trac4914
index e8f8afb467..743dc8c055 100644
--- a/tests/ref/fate/copy-trac4914
+++ b/tests/ref/fate/copy-trac4914
@@ -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
diff --git a/tests/ref/fate/mxf-d10-user-comments b/tests/ref/fate/mxf-d10-user-comments
index 3b9d9d2142..c35add0279 100644
--- a/tests/ref/fate/mxf-d10-user-comments
+++ b/tests/ref/fate/mxf-d10-user-comments
@@ -1 +1 @@
-fe9b43f5b6e7737fe2670b660fd3d860
+7bb9f39e8e05724525154de17f0235d8
diff --git a/tests/ref/fate/mxf-opatom-user-comments b/tests/ref/fate/mxf-opatom-user-comments
index be57eb4e19..ec4fdff425 100644
--- a/tests/ref/fate/mxf-opatom-user-comments
+++ b/tests/ref/fate/mxf-opatom-user-comments
@@ -1 +1 @@
-9b3d7201c37c5783702774e46e0da141
+8475bebf3448a972ae89ba59309fd7d6
diff --git a/tests/ref/fate/mxf-reel_name b/tests/ref/fate/mxf-reel_name
index acda8fe43a..d50f0f6990 100644
--- a/tests/ref/fate/mxf-reel_name
+++ b/tests/ref/fate/mxf-reel_name
@@ -1 +1 @@
-422d6ed4821e7bbecbcdecc553abc6e4
+ce49a0361d3f79106e1952d387eace51
diff --git a/tests/ref/fate/mxf-user-comments b/tests/ref/fate/mxf-user-comments
index 3b77db9118..5fcdc5806a 100644
--- a/tests/ref/fate/mxf-user-comments
+++ b/tests/ref/fate/mxf-user-comments
@@ -1 +1 @@
-c77b632dbcdacd6466e1ec794917556e
+956f653cd75e1a319569caec9df81b4f
diff --git a/tests/ref/fate/time_base b/tests/ref/fate/time_base
index d3c97956d6..28815d0828 100644
--- a/tests/ref/fate/time_base
+++ b/tests/ref/fate/time_base
@@ -1 +1 @@
-e5c9da6972b6f6e7b15bcbbf20a9dbd1
+78ac0348027b75d73acb8bea14e67a59
diff --git a/tests/ref/lavf/mxf b/tests/ref/lavf/mxf
index 1b1fe1a734..21bf2be513 100644
--- a/tests/ref/lavf/mxf
+++ b/tests/ref/lavf/mxf
@@ -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
diff --git a/tests/ref/lavf/mxf_d10 b/tests/ref/lavf/mxf_d10
index 19e6f20b51..47ef244cb1 100644
--- a/tests/ref/lavf/mxf_d10
+++ b/tests/ref/lavf/mxf_d10
@@ -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
diff --git a/tests/ref/lavf/mxf_dv25 b/tests/ref/lavf/mxf_dv25
index 2951538cae..92509cf1f4 100644
--- a/tests/ref/lavf/mxf_dv25
+++ b/tests/ref/lavf/mxf_dv25
@@ -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
diff --git a/tests/ref/lavf/mxf_dvcpro50 b/tests/ref/lavf/mxf_dvcpro50
index 9df2fc925d..2d569b0553 100644
--- a/tests/ref/lavf/mxf_dvcpro50
+++ b/tests/ref/lavf/mxf_dvcpro50
@@ -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
diff --git a/tests/ref/lavf/mxf_opatom b/tests/ref/lavf/mxf_opatom
index bff36e02be..61e755550b 100644
--- a/tests/ref/lavf/mxf_opatom
+++ b/tests/ref/lavf/mxf_opatom
@@ -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
diff --git a/tests/ref/lavf/mxf_opatom_audio b/tests/ref/lavf/mxf_opatom_audio
index 5c65a373e2..97362e7aa4 100644
--- a/tests/ref/lavf/mxf_opatom_audio
+++ b/tests/ref/lavf/mxf_opatom_audio
@@ -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