From c0be32c6416e3789ae24e56a95b2069e1cf264eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Martinez?= Date: Thu, 7 Nov 2024 15:56:16 +0100 Subject: [PATCH] + MXF: better support of frame wrapped IAB --- Source/MediaInfo/Audio/File_Iab.cpp | 14 +++++++++++++- Source/MediaInfo/Audio/File_Iab.h | 3 +++ Source/MediaInfo/Multiple/File_Mxf.cpp | 4 +++- Source/MediaInfo/Multiple/File_Mxf_Automated.h | 4 +++- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/Source/MediaInfo/Audio/File_Iab.cpp b/Source/MediaInfo/Audio/File_Iab.cpp index 2cd4679b0..febb9c675 100644 --- a/Source/MediaInfo/Audio/File_Iab.cpp +++ b/Source/MediaInfo/Audio/File_Iab.cpp @@ -476,6 +476,18 @@ void File_Iab::Streams_Fill() Fill(Stream_Audio, 0, Audio_FrameRate, Iab_FrameRate[FrameRate]); } + +//*************************************************************************** +// Buffer - Global +//*************************************************************************** + +//--------------------------------------------------------------------------- +void File_Iab::Read_Buffer_Continue() +{ + if (Frame_Count) + Skip_XX(Element_Size, "Data"); // TODO: management of frame wrapped IAB +} + //*************************************************************************** // Buffer - Per element //*************************************************************************** @@ -719,7 +731,7 @@ void File_Iab::ObjectDefinition() Skip_XX(Pos-Element_Offset, "AudioDescriptionText"); } Skip_B1( "SubElementCount"); - Element_ThisIsAList(); + //Element_ThisIsAList(); // TODO: handle SubElements here } //--------------------------------------------------------------------------- diff --git a/Source/MediaInfo/Audio/File_Iab.h b/Source/MediaInfo/Audio/File_Iab.h index 052a6da2c..4c832ff00 100644 --- a/Source/MediaInfo/Audio/File_Iab.h +++ b/Source/MediaInfo/Audio/File_Iab.h @@ -37,6 +37,9 @@ private : //Streams management void Streams_Fill(); + //Buffer - Global + void Read_Buffer_Continue(); + //Buffer - Per element void Header_Parse(); void Data_Parse(); diff --git a/Source/MediaInfo/Multiple/File_Mxf.cpp b/Source/MediaInfo/Multiple/File_Mxf.cpp index 1f3d62172..ef0901d90 100644 --- a/Source/MediaInfo/Multiple/File_Mxf.cpp +++ b/Source/MediaInfo/Multiple/File_Mxf.cpp @@ -465,6 +465,7 @@ static const char* Mxf_EssenceContainer_Mapping(int64u Code_lo) case Labels::MXFGCImmersiveAudio: switch ((int16u)Code_lo) { case 0x0101: return "Clip"; + case 0x0102: return "Frame"; } break; case Labels::MXFGCJPEGXSPictures: @@ -14498,7 +14499,8 @@ void File_Mxf::ChooseParser__FromEssence(const essences::iterator &Essence, cons case Essences::ALaw_Clip: case Essences::ALaw_Custom: ChooseParser_Alaw(Essence, Descriptor); break; case Essences::IAB_Temp: - case Essences::IAB: ChooseParser_Iab(Essence, Descriptor); break; + case Essences::IAB_Clip: + case Essences::IAB_Frame: ChooseParser_Iab(Essence, Descriptor); break; case Essences::MGA_Frame: case Essences::MGA_Clip: ChooseParser_Mga(Essence, Descriptor); break; case Essences::VBI_Frame: ChooseParser_Vbi(Essence, Descriptor); break; diff --git a/Source/MediaInfo/Multiple/File_Mxf_Automated.h b/Source/MediaInfo/Multiple/File_Mxf_Automated.h index a83540029..4211cc94d 100644 --- a/Source/MediaInfo/Multiple/File_Mxf_Automated.h +++ b/Source/MediaInfo/Multiple/File_Mxf_Automated.h @@ -3833,6 +3833,7 @@ C(0D01030116000A00, "A-law") C(0D01030116000D00, "IAB") C(0D01030116000E00, "MGA") C(0D01030116000F00, "MGA") +C(0D01030116001000, "IAB") C(0D010301167F107F, "IAB") C(0D01030117000000, "GC Data") C(0D01030117000100, "VBI") @@ -9077,9 +9078,10 @@ U(0D01030116000700, MPEGA_Custom) U(0D01030116000800, ALaw_Frame) U(0D01030116000900, ALaw_Clip) U(0D01030116000A00, ALaw_Custom) -U(0D01030116000D00, IAB) +U(0D01030116000D00, IAB_Clip) U(0D01030116000E00, MGA_Frame) U(0D01030116000F00, MGA_Clip) +U(0D01030116001000, IAB_Frame) U(0D010301167F107F, IAB_Temp) // 17 - GC Data U(0D01030117000100, VBI_Frame)