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>
pull/371/head
Limin Wang 4 years ago
parent 3f8db7eea0
commit 9605307e78
  1. 1
      configure
  2. 4
      libavformat/mxfenc.c
  3. 2
      tests/ref/fate/copy-trac4914
  4. 2
      tests/ref/fate/mxf-d10-user-comments
  5. 2
      tests/ref/fate/mxf-opatom-user-comments
  6. 2
      tests/ref/fate/mxf-reel_name
  7. 2
      tests/ref/fate/mxf-user-comments
  8. 2
      tests/ref/fate/time_base
  9. 6
      tests/ref/lavf/mxf
  10. 2
      tests/ref/lavf/mxf_d10
  11. 2
      tests/ref/lavf/mxf_dv25
  12. 2
      tests/ref/lavf/mxf_dvcpro50
  13. 2
      tests/ref/lavf/mxf_opatom
  14. 2
      tests/ref/lavf/mxf_opatom_audio

1
configure vendored

@ -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}

@ -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);

@ -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

@ -1 +1 @@
fe9b43f5b6e7737fe2670b660fd3d860
7bb9f39e8e05724525154de17f0235d8

@ -1 +1 @@
9b3d7201c37c5783702774e46e0da141
8475bebf3448a972ae89ba59309fd7d6

@ -1 +1 @@
422d6ed4821e7bbecbcdecc553abc6e4
ce49a0361d3f79106e1952d387eace51

@ -1 +1 @@
c77b632dbcdacd6466e1ec794917556e
956f653cd75e1a319569caec9df81b4f

@ -1 +1 @@
e5c9da6972b6f6e7b15bcbbf20a9dbd1
78ac0348027b75d73acb8bea14e67a59

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

Loading…
Cancel
Save