summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2006-03-11 01:43:02 +0000
committerjhurst <>2006-03-11 01:43:02 +0000
commit9bfe9676115531eb76649e1ebd5e14b904b53ae2 (patch)
treedf29b4a9f7d1bbb00821560ac3bca69ec7982683 /src
parente73ef2046cf4f6beb730be071022aaedb3b44bba (diff)
metadata reformed...
Diffstat (limited to 'src')
-rwxr-xr-xsrc/AS_DCP.h12
-rwxr-xr-xsrc/AS_DCP_JP2K.cpp256
-rwxr-xr-xsrc/AS_DCP_MPEG2.cpp49
-rwxr-xr-xsrc/AS_DCP_MXF.cpp79
-rwxr-xr-xsrc/AS_DCP_PCM.cpp40
-rwxr-xr-xsrc/AS_DCP_internal.h48
-rwxr-xr-xsrc/Dict.cpp103
-rwxr-xr-xsrc/Index.cpp110
-rwxr-xr-xsrc/KLV.cpp2
-rwxr-xr-xsrc/KLV.h53
-rw-r--r--src/MDD.cpp1081
-rwxr-xr-xsrc/MDD.h1506
-rwxr-xr-xsrc/MPEG2_Parser.cpp8
-rwxr-xr-xsrc/MXF.cpp604
-rwxr-xr-xsrc/MXF.h122
-rwxr-xr-xsrc/MXFTypes.cpp381
-rwxr-xr-xsrc/MXFTypes.h178
-rwxr-xr-xsrc/Metadata.cpp793
-rwxr-xr-xsrc/Metadata.h165
-rwxr-xr-xsrc/asdcp-test.cpp27
-rwxr-xr-xsrc/h__Reader.cpp14
-rwxr-xr-xsrc/h__Writer.cpp516
-rwxr-xr-xsrc/klvwalk.cpp18
23 files changed, 3692 insertions, 2473 deletions
diff --git a/src/AS_DCP.h b/src/AS_DCP.h
index d76c702..b7dc94a 100755
--- a/src/AS_DCP.h
+++ b/src/AS_DCP.h
@@ -152,8 +152,9 @@ namespace ASDCP {
// Encryption keys are passed around as strings of KeyLen bytes
const ui32_t KeyLen = 16;
- // Encryption key IDs are passed around as strings of KeyIDlen bytes
- const ui32_t KeyIDlen = 16;
+ // Key IDs are really UUIDs, so it makes no sense to have this value
+ // // Encryption key IDs are passed around as strings of KeyIDlen bytes
+ // const ui32_t KeyIDlen = 16;
//---------------------------------------------------------------------------------
@@ -256,8 +257,9 @@ namespace ASDCP {
// A simple container for rational numbers.
- struct Rational
+ class Rational
{
+ public:
i32_t Numerator;
i32_t Denominator;
@@ -413,7 +415,7 @@ namespace ASDCP {
byte_t ProductUUID[UUIDlen];
byte_t AssetUUID[UUIDlen];
byte_t ContextID[UUIDlen];
- byte_t CryptographicKeyID[KeyIDlen];
+ byte_t CryptographicKeyID[UUIDlen];
bool EncryptedEssence; // true if essence data is (or is to be) encrypted
bool UsesHMAC; // true if HMAC exists or is to be calculated
std::string ProductVersion;
@@ -427,7 +429,7 @@ namespace ASDCP {
memcpy(ProductUUID, default_ProductUUID_Data, UUIDlen);
memset(AssetUUID, 0, UUIDlen);
memset(ContextID, 0, UUIDlen);
- memset(CryptographicKeyID, 0, KeyIDlen);
+ memset(CryptographicKeyID, 0, UUIDlen);
ProductVersion = "Unreleased ";
ProductVersion += Version();
diff --git a/src/AS_DCP_JP2K.cpp b/src/AS_DCP_JP2K.cpp
index 033e4ef..6558a06 100755
--- a/src/AS_DCP_JP2K.cpp
+++ b/src/AS_DCP_JP2K.cpp
@@ -30,8 +30,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "AS_DCP_internal.h"
-#include "MDD.h"
-#include <assert.h>
//------------------------------------------------------------------------------------------
@@ -41,116 +39,9 @@ const byte_t JP2KEssenceCompressionLabel[klv_key_size] =
{
0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x09,
0x04, 0x01, 0x02, 0x02, 0x03, 0x01, 0x01, 0x01 };
-#if 0
-//
-ASDCP::Result_t
-ASDCP::JP2K_PDesc_to_MD(JP2K::PictureDescriptor& PDesc, MDObject& PDescObj)
-{
- char text_buf[32];
-
- PDescObj.SetValue("Codec", DataChunk(klv_key_size, JP2KEssenceCompressionLabel));
-
- snprintf(text_buf, 32, "%ld/%ld", PDesc.EditRate.Numerator, PDesc.EditRate.Denominator);
- PDescObj.SetString("SampleRate", text_buf);
-
- snprintf(text_buf, 32, "%ld/%ld", PDesc.AspectRatio.Numerator, PDesc.AspectRatio.Denominator);
- PDescObj.SetString("AspectRatio", text_buf);
-
- PDescObj.SetUint("FrameLayout", 0);
- PDescObj.SetUint("StoredWidth", PDesc.StoredWidth);
- PDescObj.SetUint("StoredHeight", PDesc.StoredHeight);
- PDescObj.SetUint("ContainerDuration", PDesc.ContainerDuration);
-
- MDObject* PSubDescObj = GetMDObjectByType(PDescObj, "JPEG2000PictureSubDescriptor");
- if ( PSubDescObj == 0 )
- {
- DefaultLogSink().Error("Unable to locate JPEG2000PictureSubDescriptor");
- return RESULT_FALSE;
- }
-
- PSubDescObj->SetUint("Rsize", PDesc.Rsize);
- PSubDescObj->SetUint("Xsize", PDesc.Xsize);
- PSubDescObj->SetUint("Ysize", PDesc.Ysize);
- PSubDescObj->SetUint("XOsize", PDesc.XOsize);
- PSubDescObj->SetUint("YOsize", PDesc.YOsize);
- PSubDescObj->SetUint("XTsize", PDesc.XTsize);
- PSubDescObj->SetUint("YTsize", PDesc.YTsize);
- PSubDescObj->SetUint("XTOsize", PDesc.XTOsize);
- PSubDescObj->SetUint("YTOsize", PDesc.YTOsize);
- PSubDescObj->SetUint("Csize", PDesc.Csize);
-
- const ui32_t tmp_buffer_len = 64;
- byte_t tmp_buffer[tmp_buffer_len];
-
- *(ui32_t*)tmp_buffer = ASDCP_i32_BE(3L); // three components
- *(ui32_t*)(tmp_buffer+4) = ASDCP_i32_BE(3L);
- memcpy(tmp_buffer + 8, &PDesc.ImageComponents, sizeof(ASDCP::JP2K::ImageComponent) * 3L);
-
- PSubDescObj->SetValue("PictureComponentSizing", DataChunk(17, tmp_buffer));
- PSubDescObj->SetValue("CodingStyleDefault", DataChunk(PDesc.CodingStyleLength, PDesc.CodingStyle));
- PSubDescObj->SetValue("QuantizationDefault", DataChunk(PDesc.QuantDefaultLength, PDesc.QuantDefault));
-
- return RESULT_OK;
-}
-#endif
//
-ASDCP::Result_t
-ASDCP::MD_to_JP2K_PDesc(MXF::RGBAEssenceDescriptor* PDescObj, JP2K::PictureDescriptor& PDesc)
-{
- ASDCP_TEST_NULL(PDescObj);
- memset(&PDesc, 0, sizeof(PDesc));
-
- PDesc.EditRate = PDescObj->SampleRate;
- PDesc.ContainerDuration = PDescObj->ContainerDuration;
- PDesc.StoredWidth = PDescObj->StoredWidth;
- PDesc.StoredHeight = PDescObj->StoredHeight;
- PDesc.AspectRatio = PDescObj->AspectRatio;
-
-#if 0
- MDObject* PSubDescObj = GetMDObjectByType(PDescObj, "JPEG2000PictureSubDescriptor");
-
- if ( PSubDescObj == 0 )
- {
- DefaultLogSink().Error("Unable to locate JPEG2000PictureSubDescriptor");
- return RESULT_FALSE;
- }
-
- PDesc.Rsize = PSubDescObj->Rsize;
- PDesc.Xsize = PSubDescObj->Xsize;
- PDesc.Ysize = PSubDescObj->Ysize;
- PDesc.XOsize = PSubDescObj->XOsize;
- PDesc.YOsize = PSubDescObj->YOsize;
- PDesc.XTsize = PSubDescObj->XTsize;
- PDesc.YTsize = PSubDescObj->YTsize;
- PDesc.XTOsize = PSubDescObj->XTOsize;
- PDesc.YTOsize = PSubDescObj->YTOsize;
- PDesc.Csize = PSubDescObj->Csize;
- // PictureComponentSizing
-
- if ( DC3.Size == 17 ) // ( 2* sizeof(ui32_t) ) + 3 components * 3 byte each
- {
- memcpy(&PDesc.ImageComponents, DC3.Data + 8, DC3.Size - 8);
- }
- else
- {
- DefaultLogSink().Error("Unexpected PictureComponentSizing size: %lu, should be 17\n", DC3.Size);
- }
-#endif
-
- // CodingStyleDefault
- // PDesc.CodingStyleLength = DC1.Size;
- // memcpy(PDesc.CodingStyle, DC1.Data, DC1.Size);
-
- // QuantizationDefault
- // PDesc.QuantDefaultLength = DC2.Size;
- // memcpy(PDesc.QuantDefault, DC2.Data, DC2.Size);
-
- return RESULT_OK;
-}
-
-
void
ASDCP::JP2K::PictureDescriptorDump(const PictureDescriptor& PDesc, FILE* stream)
{
@@ -232,8 +123,68 @@ public:
Result_t OpenRead(const char*);
Result_t ReadFrame(ui32_t, FrameBuffer&, AESDecContext*, HMACContext*);
Result_t ReadFrameGOPStart(ui32_t, FrameBuffer&, AESDecContext*, HMACContext*);
+ Result_t MD_to_JP2K_PDesc(MXF::RGBAEssenceDescriptor* PDescObj, JP2K::PictureDescriptor& PDesc);
};
+//
+ASDCP::Result_t
+ASDCP::JP2K::MXFReader::h__Reader::MD_to_JP2K_PDesc(MXF::RGBAEssenceDescriptor* PDescObj, JP2K::PictureDescriptor& PDesc)
+{
+ ASDCP_TEST_NULL(PDescObj);
+ memset(&PDesc, 0, sizeof(PDesc));
+
+ PDesc.EditRate = PDescObj->SampleRate;
+ PDesc.ContainerDuration = PDescObj->ContainerDuration;
+ PDesc.StoredWidth = PDescObj->StoredWidth;
+ PDesc.StoredHeight = PDescObj->StoredHeight;
+ PDesc.AspectRatio = PDescObj->AspectRatio;
+
+ InterchangeObject* MDObject;
+ if ( ASDCP_SUCCESS(m_HeaderPart.GetMDObjectByType(OBJ_TYPE_ARGS(JPEG2000PictureSubDescriptor), &MDObject)) )
+ {
+ if ( MDObject == 0 )
+ {
+ DefaultLogSink().Error("Unable to locate JPEG2000PictureSubDescriptor");
+ return RESULT_FALSE;
+ }
+
+ JPEG2000PictureSubDescriptor* PSubDescObj = (JPEG2000PictureSubDescriptor*)MDObject;
+
+ PDesc.Rsize = PSubDescObj->Rsize;
+ PDesc.Xsize = PSubDescObj->Xsize;
+ PDesc.Ysize = PSubDescObj->Ysize;
+ PDesc.XOsize = PSubDescObj->XOsize;
+ PDesc.YOsize = PSubDescObj->YOsize;
+ PDesc.XTsize = PSubDescObj->XTsize;
+ PDesc.YTsize = PSubDescObj->YTsize;
+ PDesc.XTOsize = PSubDescObj->XTOsize;
+ PDesc.YTOsize = PSubDescObj->YTOsize;
+ PDesc.Csize = PSubDescObj->Csize;
+ }
+
+#if 0
+ // PictureComponentSizing
+
+ if ( DC3.Size == 17 ) // ( 2* sizeof(ui32_t) ) + 3 components * 3 byte each
+ {
+ memcpy(&PDesc.ImageComponents, DC3.Data + 8, DC3.Size - 8);
+ }
+ else
+ {
+ DefaultLogSink().Error("Unexpected PictureComponentSizing size: %lu, should be 17\n", DC3.Size);
+ }
+#endif
+
+ // CodingStyleDefault
+ // PDesc.CodingStyleLength = DC1.Size;
+ // memcpy(PDesc.CodingStyle, DC1.Data, DC1.Size);
+
+ // QuantizationDefault
+ // PDesc.QuantDefaultLength = DC2.Size;
+ // memcpy(PDesc.QuantDefault, DC2.Data, DC2.Size);
+
+ return RESULT_OK;
+}
//
//
@@ -374,7 +325,7 @@ ASDCP::JP2K::MXFReader::DumpIndex(FILE* stream) const
//------------------------------------------------------------------------------------------
-#if 0
+
//
class ASDCP::JP2K::MXFWriter::h__Writer : public ASDCP::h__Writer
{
@@ -391,9 +342,56 @@ public:
Result_t SetSourceStream(const PictureDescriptor&);
Result_t WriteFrame(const FrameBuffer&, AESEncContext* = 0, HMACContext* = 0);
Result_t Finalize();
+ Result_t JP2K_PDesc_to_MD(JP2K::PictureDescriptor& PDesc, MXF::RGBAEssenceDescriptor* PDescObj);
};
+//
+ASDCP::Result_t
+ASDCP::JP2K::MXFWriter::h__Writer::JP2K_PDesc_to_MD(JP2K::PictureDescriptor& PDesc, MXF::RGBAEssenceDescriptor* PDescObj)
+{
+ // Codec
+ PDescObj->SampleRate = PDesc.EditRate;
+ PDescObj->ContainerDuration = PDesc.ContainerDuration;
+ PDescObj->StoredWidth = PDesc.StoredWidth;
+ PDescObj->StoredHeight = PDesc.StoredHeight;
+ PDescObj->AspectRatio = PDesc.AspectRatio;
+ PDescObj->FrameLayout = 0;
+
+ InterchangeObject* MDObject;
+ if ( ASDCP_SUCCESS(m_HeaderPart.GetMDObjectByType(OBJ_TYPE_ARGS(JPEG2000PictureSubDescriptor), &MDObject)) )
+ {
+ assert(MDObject);
+ JPEG2000PictureSubDescriptor* PSubDescObj = (JPEG2000PictureSubDescriptor*)MDObject;
+
+ PSubDescObj->Rsize = PDesc.Rsize;
+ PSubDescObj->Xsize = PDesc.Xsize;
+ PSubDescObj->Ysize = PDesc.Ysize;
+ PSubDescObj->XOsize = PDesc.XOsize;
+ PSubDescObj->YOsize = PDesc.YOsize;
+ PSubDescObj->XTsize = PDesc.XTsize;
+ PSubDescObj->YTsize = PDesc.YTsize;
+ PSubDescObj->XTOsize = PDesc.XTOsize;
+ PSubDescObj->YTOsize = PDesc.YTOsize;
+ PSubDescObj->Csize = PDesc.Csize;
+ }
+#if 0
+ const ui32_t tmp_buffer_len = 64;
+ byte_t tmp_buffer[tmp_buffer_len];
+
+ *(ui32_t*)tmp_buffer = ASDCP_i32_BE(3L); // three components
+ *(ui32_t*)(tmp_buffer+4) = ASDCP_i32_BE(3L);
+ memcpy(tmp_buffer + 8, &PDesc.ImageComponents, sizeof(ASDCP::JP2K::ImageComponent) * 3L);
+
+ PSubDescObj->SetValue("PictureComponentSizing", DataChunk(17, tmp_buffer));
+ PSubDescObj->SetValue("CodingStyleDefault", DataChunk(PDesc.CodingStyleLength, PDesc.CodingStyle));
+ PSubDescObj->SetValue("QuantizationDefault", DataChunk(PDesc.QuantDefaultLength, PDesc.QuantDefault));
+#endif
+
+ return RESULT_OK;
+}
+
+
// Open the file for writing. The file must not exist. Returns error if
// the operation cannot be completed.
ASDCP::Result_t
@@ -402,26 +400,17 @@ ASDCP::JP2K::MXFWriter::h__Writer::OpenWrite(const char* filename, ui32_t Header
if ( ! m_State.Test_BEGIN() )
return RESULT_STATE;
- m_File = new MXFFile;
-
Result_t result = m_File.OpenWrite(filename);
if ( ASDCP_SUCCESS(result) )
{
- m_EssenceDescriptor = new MDObject("RGBAEssenceDescriptor");
- MDObject* jp2kDesc = new MDObject("JPEG2000PictureSubDescriptor");
- MDObject* md01 = m_EssenceDescriptor->AddChild("SubDescriptors");
-
- if ( md01 == 0 )
- {
- DefaultLogSink().Error("Unable to locate JPEG2000PictureSubDescriptor, incomplete dictionary?\n");
- return RESULT_FAIL;
- }
+ RGBAEssenceDescriptor* rgbDesc = new RGBAEssenceDescriptor;
- MDObject* md02 = md01->AddChild("SubDescriptor");
- assert(md02);
- md02->MakeLink(*jp2kDesc);
+ JPEG2000PictureSubDescriptor* jp2kSubDesc = new JPEG2000PictureSubDescriptor;
+ m_HeaderPart.AddChildObject(jp2kSubDesc);
+ rgbDesc->SubDescriptors.push_back(jp2kSubDesc->InstanceUID);
+ m_EssenceDescriptor = rgbDesc;
result = m_State.Goto_INIT();
}
@@ -436,10 +425,12 @@ ASDCP::JP2K::MXFWriter::h__Writer::SetSourceStream(const PictureDescriptor& PDes
return RESULT_STATE;
m_PDesc = PDesc;
- Result_t result = JP2K_PDesc_to_MD(m_PDesc, *m_EssenceDescriptor);
+ Result_t result = JP2K_PDesc_to_MD(m_PDesc, (RGBAEssenceDescriptor*)m_EssenceDescriptor);
if ( ASDCP_SUCCESS(result) )
- result = WriteMXFHeader(ESS_JPEG_2000, m_PDesc.EditRate, 24 /* TCFrameRate */);
+ result = WriteMXFHeader(JP2K_PACKAGE_LABEL,
+ UL(WrappingUL_Data_JPEG_2000),
+ m_PDesc.EditRate, 24 /* TCFrameRate */);
if ( ASDCP_SUCCESS(result) )
result = m_State.Goto_READY();
@@ -461,15 +452,16 @@ ASDCP::JP2K::MXFWriter::h__Writer::WriteFrame(const FrameBuffer& FrameBuf, AESEn
if ( m_State.Test_READY() )
result = m_State.Goto_RUNNING(); // first time through
- ui64_t ThisOffset = m_StreamOffset;
+ fpos_t ThisOffset = m_StreamOffset;
if ( ASDCP_SUCCESS(result) )
result = WriteEKLVPacket(FrameBuf, JP2KEssenceUL_Data, Ctx, HMAC);
if ( ASDCP_SUCCESS(result) )
{
- m_IndexMan->OfferEditUnit(0, m_FramesWritten, 0, 1);
- m_IndexMan->OfferOffset(0, m_FramesWritten, ThisOffset);
+ IndexTableSegment::IndexEntry Entry;
+ Entry.StreamOffset = ThisOffset - m_FooterPart.m_ECOffset;
+ m_FooterPart.PushIndexEntry(Entry);
m_FramesWritten++;
}
@@ -485,12 +477,9 @@ ASDCP::JP2K::MXFWriter::h__Writer::Finalize()
if ( ! m_State.Test_RUNNING() )
return RESULT_STATE;
- if ( ! m_File )
- return RESULT_INIT;
-
m_State.Goto_FINAL();
- return WriteMXFFooter(ESS_JPEG_2000);
+ return WriteMXFFooter();
}
@@ -553,7 +542,6 @@ ASDCP::JP2K::MXFWriter::Finalize()
return m_Writer->Finalize();
}
-#endif
//
// end AS_DCP_JP2K.cpp
diff --git a/src/AS_DCP_MPEG2.cpp b/src/AS_DCP_MPEG2.cpp
index 51fd802..db00c45 100755
--- a/src/AS_DCP_MPEG2.cpp
+++ b/src/AS_DCP_MPEG2.cpp
@@ -30,7 +30,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "AS_DCP_internal.h"
-#include "MDD.h"
//------------------------------------------------------------------------------------------
@@ -57,7 +56,7 @@ ASDCP::MD_to_MPEG2_VDesc(MXF::MPEG2VideoDescriptor* VDescObj, MPEG2::VideoDescri
VDesc.ColorSiting = VDescObj->ColorSiting;
VDesc.CodedContentType = VDescObj->CodedContentType;
- VDesc.LowDelay = VDescObj->LowDelay;
+ VDesc.LowDelay = VDescObj->LowDelay == 0 ? false : true;
VDesc.BitRate = VDescObj->BitRate;
VDesc.ProfileAndLevel = VDescObj->ProfileAndLevel;
return RESULT_OK;
@@ -66,8 +65,28 @@ ASDCP::MD_to_MPEG2_VDesc(MXF::MPEG2VideoDescriptor* VDescObj, MPEG2::VideoDescri
//
ASDCP::Result_t
-ASDCP::MPEG2_VDesc_to_MD(MPEG2::VideoDescriptor&, MXF::MPEG2VideoDescriptor*)
+ASDCP::MPEG2_VDesc_to_MD(MPEG2::VideoDescriptor& VDesc, MXF::MPEG2VideoDescriptor* VDescObj)
{
+ ASDCP_TEST_NULL(VDescObj);
+
+ VDescObj->SampleRate = VDesc.SampleRate;
+ VDescObj->SampleRate.Numerator = VDesc.FrameRate;
+ VDescObj->ContainerDuration = VDesc.ContainerDuration;
+
+ VDescObj->FrameLayout = VDesc.FrameLayout;
+ VDescObj->StoredWidth = VDesc.StoredWidth;
+ VDescObj->StoredHeight = VDesc.StoredHeight;
+ VDescObj->AspectRatio = VDesc.AspectRatio;
+
+ VDescObj->ComponentDepth = VDesc.ComponentDepth;
+ VDescObj->HorizontalSubsampling = VDesc.HorizontalSubsampling;
+ VDescObj->VerticalSubsampling = VDesc.VerticalSubsampling;
+ VDescObj->ColorSiting = VDesc.ColorSiting;
+ VDescObj->CodedContentType = VDesc.CodedContentType;
+
+ VDescObj->LowDelay = VDesc.LowDelay ? 1 : 0;
+ VDescObj->BitRate = VDesc.BitRate;
+ VDescObj->ProfileAndLevel = VDesc.ProfileAndLevel;
return RESULT_OK;
}
@@ -390,7 +409,7 @@ ASDCP::MPEG2::MXFWriter::h__Writer::OpenWrite(const char* filename, ui32_t Heade
if ( ASDCP_SUCCESS(result) )
{
- // m_EssenceDescriptor = new MDObject("MPEG2VideoDescriptor");
+ m_EssenceDescriptor = new MPEG2VideoDescriptor;
result = m_State.Goto_INIT();
}
@@ -405,10 +424,12 @@ ASDCP::MPEG2::MXFWriter::h__Writer::SetSourceStream(const VideoDescriptor& VDesc
return RESULT_STATE;
m_VDesc = VDesc;
- Result_t result = RESULT_OK; // MPEG2_VDesc_to_MD(m_VDesc, *m_EssenceDescriptor);
+ Result_t result = MPEG2_VDesc_to_MD(m_VDesc, (MPEG2VideoDescriptor*)m_EssenceDescriptor);
if ( ASDCP_SUCCESS(result) )
- result = WriteMXFHeader(ESS_MPEG2_VES, m_VDesc.EditRate, 24 /* TCFrameRate */);
+ result = WriteMXFHeader(MPEG_PACKAGE_LABEL,
+ UL(WrappingUL_Data_MPEG2_VES),
+ m_VDesc.EditRate, 24 /* TCFrameRate */);
if ( ASDCP_SUCCESS(result) )
result = m_State.Goto_READY();
@@ -430,7 +451,7 @@ ASDCP::MPEG2::MXFWriter::h__Writer::WriteFrame(const FrameBuffer& FrameBuf, AESE
if ( m_State.Test_READY() )
result = m_State.Goto_RUNNING(); // first time through, get the body location
- ui64_t ThisOffset = m_StreamOffset;
+ ui64_t ThisOffset = m_File.Tell();
if ( ASDCP_SUCCESS(result) )
result = WriteEKLVPacket(FrameBuf, MPEGEssenceUL_Data, Ctx, HMAC);
@@ -458,12 +479,12 @@ ASDCP::MPEG2::MXFWriter::h__Writer::WriteFrame(const FrameBuffer& FrameBuf, AESE
}
// update the index manager
-#if 0
- m_IndexMan->OfferEditUnit(0, m_FramesWritten, m_GOPOffset, Flags);
- m_IndexMan->OfferTemporalOffset(m_FramesWritten, m_GOPOffset - FrameBuf.TemporalOffset());
- m_IndexMan->OfferOffset(0, m_FramesWritten, ThisOffset);
-#endif
-
+ IndexTableSegment::IndexEntry Entry;
+ Entry.TemporalOffset = - FrameBuf.TemporalOffset();
+ Entry.KeyFrameOffset = m_GOPOffset;
+ Entry.Flags = Flags;
+ Entry.StreamOffset = ThisOffset - m_FooterPart.m_ECOffset;
+ m_FooterPart.PushIndexEntry(Entry);
m_FramesWritten++;
m_GOPOffset++;
@@ -481,7 +502,7 @@ ASDCP::MPEG2::MXFWriter::h__Writer::Finalize()
m_State.Goto_FINAL();
- return WriteMXFFooter(ESS_MPEG2_VES);
+ return WriteMXFFooter();
}
diff --git a/src/AS_DCP_MXF.cpp b/src/AS_DCP_MXF.cpp
index fbf37c3..5bba537 100755
--- a/src/AS_DCP_MXF.cpp
+++ b/src/AS_DCP_MXF.cpp
@@ -34,7 +34,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "DirScanner.h"
#include "JP2K.h"
#include "Wav.h"
-#include "MDD.h"
//------------------------------------------------------------------------------------------
@@ -127,72 +126,6 @@ ASDCP::MD_to_CryptoInfo(CryptographicContext* InfoObj, WriterInfo& Info)
return RESULT_OK;
}
-#if 0
-
-
-//
-// add DMS CryptographicFramework entry to source package
-void
-ASDCP::AddDMScrypt(PackagePtr SourcePackage, WriterInfo& Descr, const byte_t* SourceEssenceContainerLabel)
-{
- assert(SourceEssenceContainerLabel);
-
- TrackPtr MPDMTrack = SourcePackage->AddDMTrack(); // zero parameters = static
- DMSegmentPtr MPDMSegment = MPDMTrack->AddDMSegment();
-
- MDObject* Crypto_DMS_Ptr = new MDObject("CryptographicFramework");
- MPDMSegment->AddChild("DMFramework")->MakeLink(*Crypto_DMS_Ptr);
-
- MDObject* Crypto_DMS_BasicPtr = new MDObject("CryptographicContext");
- Crypto_DMS_Ptr->AddChild("ContextSR")->MakeLink(*Crypto_DMS_BasicPtr);
-
- UUID ContextID(Descr.ContextID);
- Crypto_DMS_BasicPtr->SetValue("ContextID", DataChunk(UUIDlen, ContextID.GetValue())); // UUID
- Crypto_DMS_BasicPtr->SetValue("SourceEssenceContainer",
- DataChunk(klv_key_size, SourceEssenceContainerLabel)); // Label
- Crypto_DMS_BasicPtr->SetValue("CipherAlgorithm", DataChunk(klv_key_size, CipherAlgorithm_AES)); // UL Key
-
- Crypto_DMS_BasicPtr->SetValue("MICAlgorithm",
- DataChunk(KeyLen,
- (Descr.UsesHMAC ?
- MICAlgorithm_HMAC_SHA1
- : MICAlgorithm_NONE))); // UL Key
-
- UUID CryptographicKeyID(Descr.CryptographicKeyID);
-
- Crypto_DMS_BasicPtr->SetValue("CryptographicKeyID", DataChunk(UUIDlen, CryptographicKeyID.GetValue())); // UUID
-}
-
-
-//
-//
-ASDCP::Result_t
-ASDCP::FindObject(const char* filename, const char* objname, FILE* stream)
-{
- ASDCP_TEST_NULL_STR(filename);
- ASDCP_TEST_NULL_STR(objname);
-
- if ( stream == 0 )
- stream = stderr;
-
- ASDCP::h__Reader Reader;
- Result_t result = Reader.OpenMXFRead(filename);
-
- if ( ASDCP_FAILURE(result) )
- return result;
-
- MDObject* DescObj = Reader.GetMDObjectByType(objname);
-
- if ( DescObj )
- {
- DumpMDObject(*DescObj, " ", stream);
- return RESULT_OK;
- }
-
- return RESULT_FAIL;
-}
-#endif
-
//
//
ASDCP::Result_t
@@ -210,7 +143,7 @@ ASDCP::EssenceType(const char* filename, EssenceType_t& type)
if ( ASDCP_SUCCESS(result) )
{
type = ESS_UNKNOWN;
- if ( ASDCP_SUCCESS(TestHeader.GetMDObjectByType(OBJ_TYPE_ARGS(JPEG2000PictureSubDescriptor))) )
+ if ( ASDCP_SUCCESS(TestHeader.GetMDObjectByType(OBJ_TYPE_ARGS(RGBAEssenceDescriptor))) )
type = ESS_JPEG_2000;
else
{
@@ -544,12 +477,22 @@ ASDCP::KLVReader::ReadKLFromFile(ASDCP::FileReader& Reader)
{
m_BERLength = BER_length(m_Key + klv_key_size);
+ if ( m_BERLength == 0 )
+ {
+ char intbuf[IntBufferLen];
+ ASDCP::DefaultLogSink().Error("KLV format error, zero BER length not allowed at file position %s\n",
+ i64szx((Reader.Tell() - (fpos_t)klv_key_size), 8, intbuf));
+ return RESULT_FAIL;
+ }
+
if ( m_BERLength != klv_length_size )
{
+
ASDCP::DefaultLogSink().Error("Found packet with BER length %lu; being less efficient...\n",
m_BERLength);
// TODO: recover the correct BER value
// and reposition the file pointer
+ ASDCP::DefaultLogSink().Error("please finish me\n");
assert(0);
}
diff --git a/src/AS_DCP_PCM.cpp b/src/AS_DCP_PCM.cpp
index 3f019c1..0aa396f 100755
--- a/src/AS_DCP_PCM.cpp
+++ b/src/AS_DCP_PCM.cpp
@@ -30,13 +30,26 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "AS_DCP_internal.h"
-#include "MDD.h"
-#include <stdio.h>
-#include <stdarg.h>
#include <map>
//------------------------------------------------------------------------------------------
+Result_t
+ASDCP::PCM_ADesc_to_MD(PCM::AudioDescriptor& ADesc, MXF::WaveAudioDescriptor* ADescObj)
+{
+ ASDCP_TEST_NULL(ADescObj);
+ ADescObj->SampleRate = ADesc.SampleRate;
+ ADescObj->AudioSamplingRate = ADesc.AudioSamplingRate;
+ ADescObj->Locked = ADesc.Locked;
+ ADescObj->ChannelCount = ADesc.ChannelCount;
+ ADescObj->QuantizationBits = ADesc.QuantizationBits;
+ ADescObj->BlockAlign = ADesc.BlockAlign;
+ ADescObj->AvgBps = ADesc.AvgBps;
+ ADescObj->LinkedTrackID = ADesc.LinkedTrackID;
+ ADescObj->ContainerDuration = ADesc.ContainerDuration;
+ return RESULT_OK;
+}
+
//
ASDCP::Result_t
ASDCP::MD_to_PCM_ADesc(MXF::WaveAudioDescriptor* ADescObj, PCM::AudioDescriptor& ADesc)
@@ -289,7 +302,6 @@ ASDCP::PCM::MXFReader::DumpIndex(FILE* stream) const
//------------------------------------------------------------------------------------------
-#if 0
//
class ASDCP::PCM::MXFWriter::h__Writer : public ASDCP::h__Writer
@@ -318,13 +330,11 @@ ASDCP::PCM::MXFWriter::h__Writer::OpenWrite(const char* filename, ui32_t HeaderS
if ( ! m_State.Test_BEGIN() )
return RESULT_STATE;
- m_File = new MXFFile;
-
Result_t result = m_File.OpenWrite(filename);
if ( ASDCP_SUCCESS(result) )
{
- m_EssenceDescriptor = new MDObject("WaveAudioDescriptor");
+ m_EssenceDescriptor = new WaveAudioDescriptor;
result = m_State.Goto_INIT();
}
@@ -356,13 +366,12 @@ ASDCP::PCM::MXFWriter::h__Writer::SetSourceStream(const AudioDescriptor& ADesc)
}
m_ADesc = ADesc;
- Result_t result = PCM_ADesc_to_MD(m_ADesc, *m_EssenceDescriptor);
+ Result_t result = PCM_ADesc_to_MD(m_ADesc, (WaveAudioDescriptor*)m_EssenceDescriptor);
if ( ASDCP_SUCCESS(result) )
- {
- result = WriteMXFHeader(ESS_PCM_24b_48k, m_ADesc.SampleRate,
- 24 /* TCFrameRate */, calc_CBR_frame_size(m_Info, m_ADesc));
- }
+ result = WriteMXFHeader(PCM_PACKAGE_LABEL,
+ UL(WrappingUL_Data_PCM_24b_48k),
+ m_ADesc.SampleRate, 24 /* TCFrameRate */, calc_CBR_frame_size(m_Info, m_ADesc));
if ( ASDCP_SUCCESS(result) )
result = m_State.Goto_READY();
@@ -399,12 +408,9 @@ ASDCP::PCM::MXFWriter::h__Writer::Finalize()
if ( ! m_State.Test_RUNNING() )
return RESULT_STATE;
- if ( ! m_File )
- return RESULT_INIT;
-
m_State.Goto_FINAL();
- return WriteMXFFooter(ESS_PCM_24b_48k);
+ return WriteMXFFooter();
}
@@ -467,8 +473,6 @@ ASDCP::PCM::MXFWriter::Finalize()
return m_Writer->Finalize();
}
-#endif
-
//
// end AS_DCP_PCM.cpp
//
diff --git a/src/AS_DCP_internal.h b/src/AS_DCP_internal.h
index c903698..ca3d9bb 100755
--- a/src/AS_DCP_internal.h
+++ b/src/AS_DCP_internal.h
@@ -172,7 +172,6 @@ namespace ASDCP
Result_t MPEG2_VDesc_to_MD(MPEG2::VideoDescriptor&, MXF::MPEG2VideoDescriptor*);
Result_t JP2K_PDesc_to_MD(JP2K::PictureDescriptor&, MXF::RGBAEssenceDescriptor*);
Result_t PCM_ADesc_to_MD(PCM::AudioDescriptor&, MXF::WaveAudioDescriptor*);
- // void AddDMScrypt(PackagePtr, WriterInfo&, const byte_t*);
Result_t EncryptFrameBuffer(const ASDCP::FrameBuffer&, ASDCP::FrameBuffer&, AESEncContext*);
Result_t DecryptFrameBuffer(const ASDCP::FrameBuffer&, ASDCP::FrameBuffer&, AESDecContext*);
@@ -199,6 +198,7 @@ namespace ASDCP
ui64_t m_EssenceStart;
WriterInfo m_Info;
ASDCP::FrameBuffer m_CtFrameBuf;
+ fpos_t m_LastPosition;
h__Reader();
virtual ~h__Reader();
@@ -257,43 +257,35 @@ namespace ASDCP
OPAtomHeader m_HeaderPart;
Partition m_BodyPart;
OPAtomIndexFooter m_FooterPart;
-
-#if 0
ui64_t m_EssenceStart;
- WriterInfo m_Info;
- ASDCP::FrameBuffer m_CtFrameBuf;
- mem_ptr<MXFFile> m_File;
- mem_ptr<Metadata> m_Metadata;
- mem_ptr<Package> m_FilePackage;
- mem_ptr<Partition> m_HeaderPart;
- mem_ptr<MDObject> m_EssenceDescriptor;
- mem_ptr<Package> m_MaterialPackage;
- mem_ptr<Track> m_MPTrack; //! Material Package track for each essence stream
- mem_ptr<Track> m_FPTrack; //! File Package track for each essence stream
- mem_ptr<TimecodeComponent> m_MPTimecode;
- mem_ptr<TimecodeComponent> m_FPTimecode;
- mem_ptr<IndexManager> m_IndexMan;
- SourceClip* m_MPClip; //! Material Package SourceClip for each essence stream
- SourceClip* m_FPClip; //! File Package SourceClip for each essence stream
-#endif
+ MaterialPackage* m_MaterialPackage;
+ TimecodeComponent* m_MPTimecode;
+ SourceClip* m_MPClip; //! Material Package SourceClip for each essence stream
+
+ SourcePackage* m_FilePackage;
+ TimecodeComponent* m_FPTimecode;
+ SourceClip* m_FPClip; //! File Package SourceClip for each essence stream
- i32_t m_EssenceID; //! Essence stream ID for each essence stream
- ui32_t m_FramesWritten;
- ui64_t m_StreamOffset;
- ASDCP::FrameBuffer m_CtFrameBuf;
- h__WriterState m_State;
- WriterInfo m_Info;
- FrameBuffer m_CryptFrameBuf;
+ FileDescriptor* m_EssenceDescriptor;
+
+ ui32_t m_FramesWritten;
+ ui64_t m_StreamOffset;
+ ASDCP::FrameBuffer m_CtFrameBuf;
+ h__WriterState m_State;
+ WriterInfo m_Info;
h__Writer();
virtual ~h__Writer();
- Result_t WriteMXFHeader(EssenceType_t EssenceType, Rational& EditRate,
+ Result_t WriteMXFHeader(const std::string& PackageLabel, const UL& WrappingUL,
+ const MXF::Rational& EditRate,
ui32_t TCFrameRate, ui32_t BytesPerEditUnit = 0);
+
Result_t WriteEKLVPacket(const ASDCP::FrameBuffer& FrameBuf,
const byte_t* EssenceUL, AESEncContext* Ctx, HMACContext* HMAC);
- Result_t WriteMXFFooter(EssenceType_t EssenceType);
+
+ Result_t WriteMXFFooter();
};
diff --git a/src/Dict.cpp b/src/Dict.cpp
new file mode 100755
index 0000000..384843e
--- /dev/null
+++ b/src/Dict.cpp
@@ -0,0 +1,103 @@
+/*
+Copyright (c) 2006, John Hurst
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+/*! \file Dict.cpp
+ \version $Id$
+ \brief MXF dictionary
+*/
+
+
+#include "KLV.h"
+#include "MDD.cpp"
+
+//------------------------------------------------------------------------------------------
+// singleton wrapper
+
+const byte_t mdd_key[] = { 0x06, 0x0e, 0x2b, 0x34 };
+
+//
+const ASDCP::MDDEntry&
+ASDCP::Dict::Type(MDD_t type_id)
+{
+ return s_MDD_Table[type_id];
+}
+
+//
+const ASDCP::MDDEntry*
+ASDCP::Dict::FindUL(const byte_t* ul_buf)
+{
+ ui32_t t_idx = 0;
+ ui32_t k_idx = 8;
+
+ // must be a pointer to a SMPTE UL
+ if ( ul_buf == 0 || memcmp(mdd_key, ul_buf, 4) != 0 )
+ return 0;
+
+ // advance to first matching element
+ // TODO: optimize using binary search
+ while ( s_MDD_Table[t_idx].ul != 0
+ && s_MDD_Table[t_idx].ul[k_idx] != ul_buf[k_idx] )
+ t_idx++;
+
+ if ( s_MDD_Table[t_idx].ul == 0 )
+ return 0;
+
+ // match successive elements
+ while ( s_MDD_Table[t_idx].ul != 0
+ && k_idx < SMPTE_UL_LENGTH - 1
+ && s_MDD_Table[t_idx].ul[k_idx] == ul_buf[k_idx] )
+ {
+ if ( s_MDD_Table[t_idx].ul[k_idx+1] == ul_buf[k_idx+1] )
+ {
+ k_idx++;
+ }
+ else
+ {
+ while ( s_MDD_Table[t_idx].ul != 0
+ && s_MDD_Table[t_idx].ul[k_idx] == ul_buf[k_idx]
+ && s_MDD_Table[t_idx].ul[k_idx+1] != ul_buf[k_idx+1] )
+ t_idx++;
+
+ while ( s_MDD_Table[t_idx].ul[k_idx] != ul_buf[k_idx] )
+ k_idx--;
+ }
+ }
+
+ return (s_MDD_Table[t_idx].ul == 0 ? 0 : &s_MDD_Table[t_idx]);
+}
+
+
+//
+// implementation
+
+ASDCP::Dict::Dict() { DefaultLogSink().Warn("new Dict\n"); }
+ASDCP::Dict::~Dict() {}
+
+
+
+//
+// end Dict.cpp
+//
diff --git a/src/Index.cpp b/src/Index.cpp
index b7bdc33..20db4da 100755
--- a/src/Index.cpp
+++ b/src/Index.cpp
@@ -29,13 +29,14 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\brief MXF index segment objects
*/
-#include "MDD.h"
#include "MXF.h"
+const ui32_t kl_length = ASDCP::SMPTE_UL_LENGTH + ASDCP::MXF_BER_LENGTH;
+
//
ASDCP::MXF::IndexTableSegment::IndexTableSegment() :
IndexStartPosition(0), IndexDuration(0), EditUnitByteCount(0),
- IndexSID(0), BodySID(0), SliceCount(0), PosTableCount(0)
+ IndexSID(129), BodySID(1), SliceCount(0), PosTableCount(0)
{
}
@@ -46,29 +47,21 @@ ASDCP::MXF::IndexTableSegment::~IndexTableSegment()
//
ASDCP::Result_t
-ASDCP::MXF::IndexTableSegment::InitFromBuffer(const byte_t* p, ui32_t l)
+ASDCP::MXF::IndexTableSegment::InitFromTLVSet(TLVReader& TLVSet)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_IndexTableSegment].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
-
- result = MemRDR.ReadObject(OBJ_READ_ARGS(InterchangeObject, InstanceUID));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadObject(OBJ_READ_ARGS(IndexTableSegmentBase, IndexEditRate));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi64(OBJ_READ_ARGS(IndexTableSegmentBase, IndexStartPosition));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi64(OBJ_READ_ARGS(IndexTableSegmentBase, IndexDuration));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi32(OBJ_READ_ARGS(IndexTableSegmentBase, EditUnitByteCount));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi32(OBJ_READ_ARGS(IndexTableSegmentBase, IndexSID));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi32(OBJ_READ_ARGS(IndexTableSegmentBase, BodySID));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi8(OBJ_READ_ARGS(IndexTableSegmentBase, SliceCount));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi8(OBJ_READ_ARGS(IndexTableSegmentBase, PosTableCount));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadObject(OBJ_READ_ARGS(IndexTableSegment, DeltaEntryArray));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadObject(OBJ_READ_ARGS(IndexTableSegment, IndexEntryArray));
- }
+ Result_t result = InterchangeObject::InitFromTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(IndexTableSegmentBase, IndexEditRate));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi64(OBJ_READ_ARGS(IndexTableSegmentBase, IndexStartPosition));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi64(OBJ_READ_ARGS(IndexTableSegmentBase, IndexDuration));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi32(OBJ_READ_ARGS(IndexTableSegmentBase, EditUnitByteCount));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi32(OBJ_READ_ARGS(IndexTableSegmentBase, IndexSID));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi32(OBJ_READ_ARGS(IndexTableSegmentBase, BodySID));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi8(OBJ_READ_ARGS(IndexTableSegmentBase, SliceCount));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi8(OBJ_READ_ARGS(IndexTableSegmentBase, PosTableCount));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(IndexTableSegment, DeltaEntryArray));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(IndexTableSegment, IndexEntryArray));
+#if 0
if ( ASDCP_SUCCESS(result) )
{
Batch<IndexEntry>::iterator i;
@@ -81,37 +74,43 @@ ASDCP::MXF::IndexTableSegment::InitFromBuffer(const byte_t* p, ui32_t l)
(*i).KeyFrameOffset = offset++;
}
}
+#endif
return result;
}
//
ASDCP::Result_t
-ASDCP::MXF::IndexTableSegment::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
+ASDCP::MXF::IndexTableSegment::WriteToTLVSet(TLVWriter& TLVSet)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_IndexTableSegment].ul, 0);
-#if 0
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_IndexTableSegment].ul);
+ Result_t result = InterchangeObject::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(IndexTableSegmentBase, IndexEditRate));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi64(OBJ_WRITE_ARGS(IndexTableSegmentBase, IndexStartPosition));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi64(OBJ_WRITE_ARGS(IndexTableSegmentBase, IndexDuration));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(IndexTableSegmentBase, EditUnitByteCount));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(IndexTableSegmentBase, IndexSID));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(IndexTableSegmentBase, BodySID));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi8(OBJ_WRITE_ARGS(IndexTableSegmentBase, SliceCount));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi8(OBJ_WRITE_ARGS(IndexTableSegmentBase, PosTableCount));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(IndexTableSegment, DeltaEntryArray));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(IndexTableSegment, IndexEntryArray));
+ return result;
+}
- if ( ASDCP_SUCCESS(result) )
- {
- TLVWriter MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
-
- result = MemRDR.ReadObject(OBJ_READ_ARGS(InterchangeObject, InstanceUID));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadObject(OBJ_READ_ARGS(IndexTableSegmentBase, IndexEditRate));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi64(OBJ_READ_ARGS(IndexTableSegmentBase, IndexStartPosition));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi64(OBJ_READ_ARGS(IndexTableSegmentBase, IndexDuration));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi32(OBJ_READ_ARGS(IndexTableSegmentBase, EditUnitByteCount));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi32(OBJ_READ_ARGS(IndexTableSegmentBase, IndexSID));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi32(OBJ_READ_ARGS(IndexTableSegmentBase, BodySID));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi8(OBJ_READ_ARGS(IndexTableSegmentBase, SliceCount));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi8(OBJ_READ_ARGS(IndexTableSegmentBase, PosTableCount));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadObject(OBJ_READ_ARGS(IndexTableSegment, DeltaEntryArray));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadObject(OBJ_READ_ARGS(IndexTableSegment, IndexEntryArray));
- }
+//
+ASDCP::Result_t
+ASDCP::MXF::IndexTableSegment::InitFromBuffer(const byte_t* p, ui32_t l)
+{
+ m_Typeinfo = &Dict::Type(MDD_IndexTableSegment);
+ return InterchangeObject::InitFromBuffer(p, l);
+}
- return result;
-#endif
+//
+ASDCP::Result_t
+ASDCP::MXF::IndexTableSegment::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
+{
+ m_Typeinfo = &Dict::Type(MDD_IndexTableSegment);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//
@@ -123,8 +122,7 @@ ASDCP::MXF::IndexTableSegment::Dump(FILE* stream)
if ( stream == 0 )
stream = stderr;
- KLVPacket::Dump(stream, false);
- fprintf(stream, " InstanceUID = %s\n", InstanceUID.ToString(identbuf));
+ InterchangeObject::Dump(stream);
fprintf(stream, " IndexEditRate = %s\n", IndexEditRate.ToString(identbuf));
fprintf(stream, " IndexStartPosition = %s\n", i64sz(IndexStartPosition, identbuf));
fprintf(stream, " IndexDuration = %s\n", i64sz(IndexDuration, identbuf));
@@ -145,10 +143,11 @@ ASDCP::MXF::IndexTableSegment::Dump(FILE* stream)
{
fprintf(stream, " IndexEntryArray: %lu entries\n", IndexEntryArray.size());
}
-
- fputs("==========================================================================\n", stream);
}
+//------------------------------------------------------------------------------------------
+//
+
//
const char*
ASDCP::MXF::IndexTableSegment::DeltaEntry::ToString(char* str_buf) const
@@ -159,7 +158,7 @@ ASDCP::MXF::IndexTableSegment::DeltaEntry::ToString(char* str_buf) const
//
ASDCP::Result_t
-ASDCP::MXF::IndexTableSegment::DeltaEntry::ReadFrom(ASDCP::MemIOReader& Reader)
+ASDCP::MXF::IndexTableSegment::DeltaEntry::Unarchive(ASDCP::MemIOReader& Reader)
{
Result_t result = Reader.ReadUi8((ui8_t*)&PosTableIndex);
if ( ASDCP_SUCCESS(result) ) result = Reader.ReadUi8(&Slice);
@@ -169,7 +168,7 @@ ASDCP::MXF::IndexTableSegment::DeltaEntry::ReadFrom(ASDCP::MemIOReader& Reader)
//
ASDCP::Result_t
-ASDCP::MXF::IndexTableSegment::DeltaEntry::WriteTo(ASDCP::MemIOWriter& Writer)
+ASDCP::MXF::IndexTableSegment::DeltaEntry::Archive(ASDCP::MemIOWriter& Writer)
{
Result_t result = Writer.WriteUi8((ui8_t)PosTableIndex);
if ( ASDCP_SUCCESS(result) ) result = Writer.WriteUi8(Slice);
@@ -177,6 +176,9 @@ ASDCP::MXF::IndexTableSegment::DeltaEntry::WriteTo(ASDCP::MemIOWriter& Writer)
return result;
}
+//------------------------------------------------------------------------------------------
+//
+
// Flags:
// Bit 7: Random Access
// Bit 6: Sequence Header
@@ -195,13 +197,13 @@ ASDCP::MXF::IndexTableSegment::IndexEntry::ToString(char* str_buf) const
{
char intbuf[IntBufferLen];
char txt_flags[6];
- txt_flags[5] = 0;
txt_flags[0] = ( (Flags & 0x80) != 0 ) ? 'r' : ' ';
txt_flags[1] = ( (Flags & 0x40) != 0 ) ? 's' : ' ';
txt_flags[2] = ( (Flags & 0x20) != 0 ) ? 'f' : ' ';
txt_flags[3] = ( (Flags & 0x10) != 0 ) ? 'b' : ' ';
txt_flags[4] = ( (Flags & 0x0f) == 3 ) ? 'B' : ( (Flags & 0x0f) == 2 ) ? 'P' : 'I';
+ txt_flags[5] = 0;
snprintf(str_buf, IdentBufferLen, "%3i %-3hu %s %s",
TemporalOffset, KeyFrameOffset, txt_flags,
@@ -212,7 +214,7 @@ ASDCP::MXF::IndexTableSegment::IndexEntry::ToString(char* str_buf) const
//
ASDCP::Result_t
-ASDCP::MXF::IndexTableSegment::IndexEntry::ReadFrom(ASDCP::MemIOReader& Reader)
+ASDCP::MXF::IndexTableSegment::IndexEntry::Unarchive(ASDCP::MemIOReader& Reader)
{
Result_t result = Reader.ReadUi8((ui8_t*)&TemporalOffset);
if ( ASDCP_SUCCESS(result) ) result = Reader.ReadUi8((ui8_t*)&KeyFrameOffset);
@@ -223,7 +225,7 @@ ASDCP::MXF::IndexTableSegment::IndexEntry::ReadFrom(ASDCP::MemIOReader& Reader)
//
ASDCP::Result_t
-ASDCP::MXF::IndexTableSegment::IndexEntry::WriteTo(ASDCP::MemIOWriter& Writer)
+ASDCP::MXF::IndexTableSegment::IndexEntry::Archive(ASDCP::MemIOWriter& Writer)
{
Result_t result = Writer.WriteUi8((ui8_t)TemporalOffset);
if ( ASDCP_SUCCESS(result) ) result = Writer.WriteUi8((ui8_t)KeyFrameOffset);
diff --git a/src/KLV.cpp b/src/KLV.cpp
index 062fd74..a0d2089 100755
--- a/src/KLV.cpp
+++ b/src/KLV.cpp
@@ -123,7 +123,7 @@ ASDCP::KLVPacket::Dump(FILE* stream, bool show_hex)
for ( ui32_t i = 0; i < SMPTE_UL_LENGTH; i++ )
fprintf(stream, "%02x.", m_KeyStart[i]);
- const MDDEntry* Entry = GetMDDEntry(m_KeyStart);
+ const MDDEntry* Entry = Dict::FindUL(m_KeyStart);
fprintf(stream, "\b len: %7lu (%s)\n", m_ValueLength, (Entry ? Entry->name : "Unknown"));
if ( show_hex && m_ValueLength < 1000 )
diff --git a/src/KLV.h b/src/KLV.h
index d940ff3..5fb0b3a 100755
--- a/src/KLV.h
+++ b/src/KLV.h
@@ -32,8 +32,10 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _KLV_H_
#define _KLV_H_
-#include <FileIO.h>
-#include <MemIO.h>
+#include "FileIO.h"
+#include "MemIO.h"
+#include "MDD.h"
+
namespace ASDCP
{
@@ -69,8 +71,8 @@ namespace ASDCP
{
public:
virtual ~IArchive() {}
- virtual Result_t ReadFrom(ASDCP::MemIOReader& Reader) = 0;
- virtual Result_t WriteTo(ASDCP::MemIOWriter& Writer) = 0;
+ virtual Result_t Unarchive(ASDCP::MemIOReader& Reader) = 0;
+ virtual Result_t Archive(ASDCP::MemIOWriter& Writer) = 0;
};
} // namespace ASDCP
@@ -79,16 +81,6 @@ namespace ASDCP
namespace ASDCP
{
//
- class IPrimerLookup
- {
- public:
- virtual ~IPrimerLookup() {}
- virtual void ClearTagList() = 0;
- virtual Result_t InsertTag(const ASDCP::UL& Key, ASDCP::TagValue& Tag) = 0;
- virtual Result_t TagForKey(const ASDCP::UL& Key, ASDCP::TagValue& Tag) = 0;
- };
-
- //
struct MDDEntry
{
byte_t ul[SMPTE_UL_LENGTH];
@@ -99,7 +91,38 @@ namespace ASDCP
};
//
- const MDDEntry* GetMDDEntry(const byte_t*);
+ class Dict
+ {
+ public:
+ static const MDDEntry* FindUL(const byte_t*);
+ static const MDDEntry& Type(MDD_t type_id);
+ static bool Replace(const MDDEntry& Entry);
+ static void Restore(const byte_t* ul);
+ static void RestoreAll();
+
+ inline static const byte_t* ul(MDD_t type_id) {
+ return Type(type_id).ul;
+ }
+
+ private:
+ ASDCP_NO_COPY_CONSTRUCT(Dict);
+
+ protected:
+ Dict();
+
+ public:
+ ~Dict();
+ };
+
+ //
+ class IPrimerLookup
+ {
+ public:
+ virtual ~IPrimerLookup() {}
+ virtual void ClearTagList() = 0;
+ virtual Result_t InsertTag(const MDDEntry& Entry, ASDCP::TagValue& Tag) = 0;
+ virtual Result_t TagForKey(const ASDCP::UL& Key, ASDCP::TagValue& Tag) = 0;
+ };
//
class KLVPacket
diff --git a/src/MDD.cpp b/src/MDD.cpp
new file mode 100644
index 0000000..a365c1e
--- /dev/null
+++ b/src/MDD.cpp
@@ -0,0 +1,1081 @@
+/*
+Copyright (c) 2006, John Hurst
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+/*! \file MDD.[h|cpp]
+ \version $Id$
+ \brief MXF Metadata Dictionary
+*/
+//
+// MDD.cpp
+//
+
+static const ASDCP::MDDEntry s_MDD_Table[] = {
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x02, 0x01, 0x01,
+ 0x0d, 0x01, 0x03, 0x01, 0x15, 0x01, 0x08, 0x01 }, {0}, true, "JPEG2000Essence", // 0
+ "JPEG 2000 Compressed Picture Essence Descriptor" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x02, 0x01, 0x01,
+ 0x0d, 0x01, 0x03, 0x01, 0x15, 0x01, 0x05, 0x00 }, {0}, true, "MPEG2Essence", // 1
+ "MPEG-2 Compressed Picture Essence Descriptor" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x02, 0x01, 0x01,
+ 0x0d, 0x01, 0x03, 0x01, 0x16, 0x01, 0x01, 0x00 }, {0}, true, "WAVEssence", // 2
+ "PCM Audio Essence Descriptor" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x04, 0x01, 0x07,
+ 0x0d, 0x01, 0x03, 0x01, 0x02, 0x7e, 0x01, 0x00 }, {0}, true, "EKLVPacket", // 3
+ "Encrypted Essence Container Descriptor" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x03, 0x01, 0x02, 0x10, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "KLVFill", // 4
+ "KLV Filler packet" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x03, 0x01, 0x02, 0x01, 0x06, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_MajorVersion", // 5
+ "Major Version number of MXF byte-level format (non-backwards compatible version number)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x03, 0x01, 0x02, 0x01, 0x07, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_MinorVersion", // 6
+ "Minor Version number of MXF byte-level format (backwards compatible version number)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x03, 0x01, 0x02, 0x01, 0x09, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_KAGSize", // 7
+ "Size of the KLV Alignment Grid (KAG) for this partition, in bytes" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x06, 0x10, 0x10, 0x03, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_ThisPartition", // 8
+ "Byte offset of the start of This Partition, relative to the start of the Header Partition" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x06, 0x10, 0x10, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_PreviousPartition", // 9
+ "Byte offset of the start of the Previous Partition, relative to the start of the Header Partition" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x06, 0x10, 0x10, 0x05, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_FooterPartition", // 10
+ "Byte offset of the start of the Footer Partition, relative to the start of the Header Partition" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x06, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_HeaderByteCount", // 11
+ "Count of Bytes used for Header Metadata. This starts at the byte following the Partition pack and includes any trailing filler which is part of the Header Metadata." },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x06, 0x09, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_IndexByteCount", // 12
+ "Count of Bytes used for Index Table Segments. This starts at the byte following the Header Metadata and includes any trailing filler which is part of the Index Table." },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x01, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_IndexSID", // 13
+ "Index Table Segment Identifier in this partition. The value 0 defines that there are no Index Table segments in this partition." },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x06, 0x08, 0x01, 0x02, 0x01, 0x03, 0x00, 0x00 }, {0}, false, "PartitionMetadata_BodyOffset", // 14
+ "Byte offset of the first byte in the following Essence Container data relative to the start of the Essence Container identified by this BodySID" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x01, 0x03, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_BodySID", // 15
+ "Identifier of the Essence Container data found in this partition. The value 0 indicates there is no Essence Container data in this partition." },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x01, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_OperationalPattern", // 16
+ "Universal Label of the Operational Pattern to which this file complies" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x01, 0x02, 0x02, 0x10, 0x02, 0x01, 0x00, 0x00 }, {0}, false, "PartitionMetadata_EssenceContainers", // 17
+ "The unordered batch of Universal Labels of Essence Containers used in or referenced by this file" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
+ 0x0d, 0x01, 0x02, 0x01, 0x01, 0x02, 0x01, 0x00 }, {0}, false, "OpenHeader", // 18
+ "Open Header Partition Pack" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
+ 0x0d, 0x01, 0x02, 0x01, 0x01, 0x02, 0x03, 0x00 }, {0}, false, "OpenCompleteHeader", // 19
+ "Open Complete Header Partition Pack" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
+ 0x0d, 0x01, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00 }, {0}, false, "ClosedHeader", // 20
+ "Closed Header Partition Pack" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
+ 0x0d, 0x01, 0x02, 0x01, 0x01, 0x02, 0x04, 0x00 }, {0}, false, "ClosedCompleteHeader", // 21
+ "Closed Complete Header Partition Pack" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
+ 0x0d, 0x01, 0x02, 0x01, 0x01, 0x03, 0x01, 0x00 }, {0}, false, "OpenBodyPartition", // 22
+ "Open Body Partition Pack" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
+ 0x0d, 0x01, 0x02, 0x01, 0x01, 0x03, 0x03, 0x00 }, {0}, false, "OpenCompleteBodyPartition", // 23
+ "Open Complete Body Partition Pack" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
+ 0x0d, 0x01, 0x02, 0x01, 0x01, 0x03, 0x02, 0x00 }, {0}, false, "ClosedBodyPartition", // 24
+ "Closed Body Partition Pack" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
+ 0x0d, 0x01, 0x02, 0x01, 0x01, 0x03, 0x04, 0x00 }, {0}, false, "ClosedCompleteBodyPartition", // 25
+ "Closed Complete Body Partition Pack" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
+ 0x0d, 0x01, 0x02, 0x01, 0x01, 0x04, 0x02, 0x00 }, {0}, false, "Footer", // 26
+ "Footer Partition Pack" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
+ 0x0d, 0x01, 0x02, 0x01, 0x01, 0x04, 0x04, 0x00 }, {0}, false, "CompleteFooter", // 27
+ "Complete Footer Partition Pack" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
+ 0x0d, 0x01, 0x02, 0x01, 0x01, 0x05, 0x01, 0x00 }, {0}, false, "Primer", // 28
+ "Primer Pack" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x06, 0x01, 0x01, 0x07, 0x15, 0x00, 0x00, 0x00 }, {0}, false, "Primer_LocalTagEntryBatch", // 29
+ "Local Tag Entry Batch" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x01, 0x03, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "LocalTagEntryBatch_Primer_LocalTag", // 30
+ "The value of the Local Tag" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x01, 0x03, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "LocalTagEntryBatch_Primer_UID", // 31
+ "The UID of which the local tag is an alias" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x15, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0x3c, 0x0a}, false, "InterchangeObject_InstanceUID", // 32
+ "Unique ID of this instance" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x05, 0x20, 0x07, 0x01, 0x08, 0x00, 0x00, 0x00 }, {0x01, 0x02}, true, "GenerationInterchangeObject_GenerationUID", // 33
+ "Generation Instance" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "DefaultObject", // 34
+ "" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x05, 0x30, 0x04, 0x06, 0x00, 0x00, 0x00, 0x00 }, {0x3f, 0x0b}, false, "IndexTableSegmentBase_IndexEditRate", // 35
+ "Edit Rate copied from the tracks of the Essence Container" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x07, 0x02, 0x01, 0x03, 0x01, 0x0a, 0x00, 0x00 }, {0x3f, 0x0c}, false, "IndexTableSegmentBase_IndexStartPosition", // 36
+ "The first editable unit indexed by this Index Table segment measured in File Package Edit Units" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x07, 0x02, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00 }, {0x3f, 0x0d}, false, "IndexTableSegmentBase_IndexDuration", // 37
+ "Time duration of this table segment measured in Edit Unitsof the referenceg package" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x06, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0x3f, 0x05}, false, "IndexTableSegmentBase_EditUnitByteCount", // 38
+ "Byte count of each and every Edit Unit. A value of 0 defines the byte count of Edit Units is only given in the Index Entry Array" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x01, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00 }, {0x3f, 0x06}, false, "IndexTableSegmentBase_IndexSID", // 39
+ "Stream Identifier (SID) of Index Stream" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x01, 0x03, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00 }, {0x3f, 0x07}, false, "IndexTableSegmentBase_BodySID", // 40
+ "Stream Identifier (SID) of Essence Container Stream" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0x3f, 0x08}, false, "IndexTableSegmentBase_SliceCount", // 41
+ "Number of slices minus 1 (NSL)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x04, 0x04, 0x01, 0x07, 0x00, 0x00, 0x00 }, {0x3f, 0x0e}, true, "IndexTableSegmentBase_PosTableCount", // 42
+ "Number of PosTable Entries minus 1 (NPE)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x02, 0x01, 0x01, 0x10, 0x00, 0x00 }, {0}, false, "V10IndexTableSegment", // 43
+ "A segment of an Index Table (v10)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x04, 0x04, 0x01, 0x06, 0x00, 0x00, 0x00 }, {0x3f, 0x09}, true, "V10IndexTableSegment_V10DeltaEntryArray", // 44
+ "Map Elements onto Slices" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x01, 0x04, 0x00, 0x00, 0x00 }, {0}, false, "V10DeltaEntryArray_V10IndexTableSegment_Reorder", // 45
+ "TRUE=Apply Temporal Reordering" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x01, 0x02, 0x00, 0x00, 0x00 }, {0}, false, "V10DeltaEntryArray_V10IndexTableSegment_Slice", // 46
+ "Slice number in IndexEntry" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x01, 0x03, 0x00, 0x00, 0x00 }, {0}, false, "V10DeltaEntryArray_V10IndexTableSegment_ElementDelta", // 47
+ "Delta from start of slice to this Element" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x04, 0x04, 0x02, 0x05, 0x00, 0x00, 0x00 }, {0x3f, 0x0a}, false, "V10IndexTableSegment_V10IndexEntryArray", // 48
+ "Index from Edit Unit number to stream offset" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x02, 0x03, 0x00, 0x00, 0x00 }, {0}, false, "V10IndexEntryArray_V10IndexTableSegment_TemporalOffset", // 49
+ "Offset in edit units from Display Order to Coded Order" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x02, 0x04, 0x00, 0x00, 0x00 }, {0}, false, "V10IndexEntryArray_V10IndexTableSegment_AnchorOffset", // 50
+ "Offset in edit units to previous Anchor Frame. The value is zero if this is an anchor frame." },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00 }, {0}, false, "V10IndexEntryArray_V10IndexTableSegment_Flags", // 51
+ "Flags for this Edit Unit" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "V10IndexEntryArray_V10IndexTableSegment_StreamOffset", // 52
+ "Offset in bytes from the first KLV element in this Edit Unit within the Essence Container" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x01, 0x05, 0x00, 0x00, 0x00 }, {0}, false, "V10IndexEntryArray_V10IndexTableSegment_SliceOffsetArray", // 53
+ "Array of offsets in bytes from the Stream Offset to the start of each slice." },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x02, 0x01, 0x01, 0x10, 0x01, 0x00 }, {0}, false, "IndexTableSegment", // 54
+ "A segment of an Index Table" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x04, 0x04, 0x01, 0x06, 0x00, 0x00, 0x00 }, {0x3f, 0x09}, true, "IndexTableSegment_DeltaEntryArray", // 55
+ "Map Elements onto Slices" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x01, 0x04, 0x00, 0x00, 0x00 }, {0}, false, "DeltaEntryArray_IndexTableSegment_PosTableIndex", // 56
+ "Index into PosTable (or Apply Temporta Reordering if -1)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x01, 0x02, 0x00, 0x00, 0x00 }, {0}, false, "DeltaEntryArray_IndexTableSegment_Slice", // 57
+ "Slice number in IndexEntry" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x01, 0x03, 0x00, 0x00, 0x00 }, {0}, false, "DeltaEntryArray_IndexTableSegment_ElementDelta", // 58
+ "Delta from start of slice to this Element" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x04, 0x04, 0x02, 0x05, 0x00, 0x00, 0x00 }, {0x3f, 0x0a}, false, "IndexTableSegment_IndexEntryArray", // 59
+ "Index from Edit Unit number to stream offset" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x02, 0x03, 0x00, 0x00, 0x00 }, {0}, false, "IndexEntryArray_IndexTableSegment_TemporalOffset", // 60
+ "Offset in edit units from Display Order to Coded Order" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x02, 0x04, 0x00, 0x00, 0x00 }, {0}, false, "IndexEntryArray_IndexTableSegment_AnchorOffset", // 61
+ "Offset in edit units to previous Anchor Frame. The value is zero if this is an anchor frame." },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00 }, {0}, false, "IndexEntryArray_IndexTableSegment_Flags", // 62
+ "Flags for this Edit Unit" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "IndexEntryArray_IndexTableSegment_StreamOffset", // 63
+ "Offset in bytes from the first KLV element in this Edit Unit within the Essence Container" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x01, 0x05, 0x00, 0x00, 0x00 }, {0}, false, "IndexEntryArray_IndexTableSegment_SliceOffsetArray", // 64
+ "Array of offsets in bytes from the Stream Offset to the start of each slice." },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x04, 0x04, 0x01, 0x08, 0x00, 0x00, 0x00 }, {0}, false, "IndexEntryArray_IndexTableSegment_PosTableArray", // 65
+ "Array of fractional position offsets from the start of the content package to the synchronized sample in the Content Package" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
+ 0x0d, 0x01, 0x02, 0x01, 0x01, 0x11, 0x01, 0x00 }, {0}, false, "RandomIndexMetadata", // 66
+ "Random Index Pack" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x01, 0x03, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "PartitionArray_RandomIndexMetadata_BodySID", // 67
+ "Stream ID of the Body in this partition" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x06, 0x09, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "PartitionArray_RandomIndexMetadata_ByteOffset", // 68
+ "Byte offset from file start (1st byte of the file which is numbered 0) to the 1st byte of the Partition Pack Key" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x06, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "RandomIndexMetadata_Length", // 69
+ "Overall Length of this Pack including the Set Key and BER Length fields" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
+ 0x0d, 0x01, 0x02, 0x01, 0x01, 0x11, 0x00, 0x00 }, {0}, false, "RandomIndexMetadataV10", // 70
+ "Random Index Pack (v10)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x2f, 0x00 }, {0}, false, "Preface", // 71
+ "Preface Set" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x07, 0x02, 0x01, 0x10, 0x02, 0x04, 0x00, 0x00 }, {0x3b, 0x02}, false, "Preface_LastModifiedDate", // 72
+ "Date &amp; time of the last modification of the file" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x03, 0x01, 0x02, 0x01, 0x05, 0x00, 0x00, 0x00 }, {0x3b, 0x05}, false, "Preface_Version", // 73
+ "The value shall be 258 (i.e. v1.2)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x03, 0x01, 0x02, 0x01, 0x04, 0x00, 0x00, 0x00 }, {0x3b, 0x07}, true, "Preface_ObjectModelVersion", // 74
+ "Simple integer version number of Object Model" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x06, 0x01, 0x01, 0x04, 0x01, 0x08, 0x00, 0x00 }, {0x3b, 0x08}, true, "Preface_PrimaryPackage", // 75
+ "The primary Package in this file" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x06, 0x01, 0x01, 0x04, 0x06, 0x04, 0x00, 0x00 }, {0x3b, 0x06}, false, "Preface_Identifications", // 76
+ "Ordered array of strong references to Identification sets recording all modifications to the file" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x06, 0x01, 0x01, 0x04, 0x02, 0x01, 0x00, 0x00 }, {0x3b, 0x03}, false, "Preface_ContentStorage", // 77
+ "Strong reference to Content Storage object" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x01, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00 }, {0x3b, 0x09}, false, "Preface_OperationalPattern", // 78
+ "Universal Label of the Operational Pattern which this file complies to (repeat of Partition Pack value)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x01, 0x02, 0x02, 0x10, 0x02, 0x01, 0x00, 0x00 }, {0x3b, 0x0a}, false, "Preface_EssenceContainers", // 79
+ "Unordered batch of ULs of Essence Containers used in or referenced by this file (repeat of Partition Pack value)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x01, 0x02, 0x02, 0x10, 0x02, 0x02, 0x00, 0x00 }, {0x3b, 0x0b}, false, "Preface_DMSchemes", // 80
+ "An unordered batch of Universal Labels of all the Descriptive Metadata schemes used in this file" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x30, 0x00 }, {0}, false, "Identification", // 81
+ "Identification set" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x05, 0x20, 0x07, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0x3c, 0x09}, false, "Identification_ThisGenerationUID", // 82
+ "This Generation Identifier" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x05, 0x20, 0x07, 0x01, 0x02, 0x01, 0x00, 0x00 }, {0x3c, 0x01}, false, "Identification_CompanyName", // 83
+ "Manufacturer of the equipment or application that created or modified the file" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x05, 0x20, 0x07, 0x01, 0x03, 0x01, 0x00, 0x00 }, {0x3c, 0x02}, false, "Identification_ProductName", // 84
+ "Name of the application which created or modified this file" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x05, 0x20, 0x07, 0x01, 0x04, 0x00, 0x00, 0x00 }, {0x3c, 0x03}, true, "Identification_ProductVersion", // 85
+ "Maj.min.tweak.build.rel version number of this application" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x05, 0x20, 0x07, 0x01, 0x05, 0x01, 0x00, 0x00 }, {0x3c, 0x04}, false, "Identification_VersionString", // 86
+ "Human readable name of the application version" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x05, 0x20, 0x07, 0x01, 0x07, 0x00, 0x00, 0x00 }, {0x3c, 0x05}, false, "Identification_ProductUID", // 87
+ "A unique identification for the product which created this file (defined by the manufacturer)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x07, 0x02, 0x01, 0x10, 0x02, 0x03, 0x00, 0x00 }, {0x3c, 0x06}, false, "Identification_ModificationDate", // 88
+ "Time &amp; date an application created or modified this file and created this Identification set" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x05, 0x20, 0x07, 0x01, 0x0a, 0x00, 0x00, 0x00 }, {0x3c, 0x07}, true, "Identification_ToolkitVersion", // 89
+ "Maj.min.tweak.build.rel version of software or hardware codec used" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x05, 0x20, 0x07, 0x01, 0x06, 0x01, 0x00, 0x00 }, {0x3c, 0x08}, true, "Identification_Platform", // 90
+ "Human readable name of the operating system used." },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18, 0x00 }, {0}, false, "ContentStorage", // 91
+ "Content Storage set" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x06, 0x01, 0x01, 0x04, 0x05, 0x01, 0x00, 0x00 }, {0x19, 0x01}, false, "ContentStorage_Packages", // 92
+ "Unordered batch of all packages used in this file" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x06, 0x01, 0x01, 0x04, 0x05, 0x02, 0x00, 0x00 }, {0x19, 0x02}, true, "ContentStorage_EssenceContainerData", // 93
+ "Unordered batch of strong references to Essence Container Data sets used in this file" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x06, 0x01, 0x01, 0x04, 0x05, 0x00, 0x00, 0x00 }, {0x19, 0x01}, false, "ContentStorageKludge_V10Packages", // 94
+ "Unordered batch of all packages used in this file" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x23, 0x00 }, {0}, false, "EssenceContainerData", // 95
+ "Essence Container Data set" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x06, 0x01, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00 }, {0x27, 0x01}, false, "EssenceContainerData_LinkedPackageUID", // 96
+ "Identifier of the Package to which this set is linked as a UMID" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x01, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00 }, {0x3f, 0x06}, true, "EssenceContainerData_IndexSID", // 97
+ "ID of the Index Table for the Essence Container to which this set is linked" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x01, 0x03, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00 }, {0x3f, 0x07}, false, "EssenceContainerData_BodySID", // 98
+ "ID of the Essence Container to which this set is linked" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x15, 0x10, 0x00, 0x00, 0x00, 0x00 }, {0x44, 0x01}, false, "GenericPackage_PackageUID", // 99
+ "Unique Package Identifier as a UMID" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0x44, 0x02}, true, "GenericPackage_Name", // 100
+ "Human readable package name" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x07, 0x02, 0x01, 0x10, 0x01, 0x03, 0x00, 0x00 }, {0x44, 0x05}, false, "GenericPackage_PackageCreationDate", // 101
+ "The date &amp; time of creation of this package" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x07, 0x02, 0x01, 0x10, 0x02, 0x05, 0x00, 0x00 }, {0x44, 0x04}, false, "GenericPackage_PackageModifiedDate", // 102
+ "The date &amp; time of last modification of this package" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x06, 0x01, 0x01, 0x04, 0x06, 0x05, 0x00, 0x00 }, {0x44, 0x03}, false, "GenericPackage_Tracks", // 103
+ "Array of Unique IDs of Tracks" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x32, 0x00 }, {0}, false, "NetworkLocator", // 104
+ "Network Locator set for location with a URL" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0x40, 0x01}, false, "NetworkLocator_URLString", // 105
+ "A URL indicating where the essence may be found." },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x33, 0x00 }, {0}, false, "TextLocator", // 106
+ "Text Locator set for location with a human-readable text string" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x01, 0x04, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0x41, 0x01}, false, "TextLocator_LocatorName", // 107
+ "Value of a human-readable locator text string for manual location of essence" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x01, 0x07, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0x48, 0x01}, false, "GenericTrack_TrackID", // 108
+ "ID of the track in this package (for linking to a SourceTrackID in a segment)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x01, 0x04, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00 }, {0x48, 0x04}, false, "GenericTrack_TrackNumber", // 109
+ "Number used to link to the track in the Essence Container if it exists" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x01, 0x07, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0x48, 0x02}, true, "GenericTrack_TrackName", // 110
+ "Human readable name of the track type" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x06, 0x01, 0x01, 0x04, 0x02, 0x04, 0x00, 0x00 }, {0x48, 0x03}, false, "GenericTrack_Sequence", // 111
+ "Strong Reference to Sequence Set" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x3a, 0x00 }, {0}, false, "StaticTrack", // 112
+ "" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x3b, 0x00 }, {0}, false, "Track", // 113
+ "Track" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x05, 0x30, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00 }, {0x4b, 0x01}, false, "Track_EditRate", // 114
+ "Edit Rate of Track" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x07, 0x02, 0x01, 0x03, 0x01, 0x03, 0x00, 0x00 }, {0x4b, 0x02}, false, "Track_Origin", // 115
+ "An Offset used to resolved timeline references to this track. The start of the track has this timeline value measured in Edit Units." },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x39, 0x00 }, {0}, false, "EventTrack", // 116
+ "Event Track" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x05, 0x30, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0x49, 0x01}, false, "EventTrack_EventEditRate", // 117
+ "Edit Rate of Event Track" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x07, 0x02, 0x01, 0x03, 0x01, 0x0b, 0x00, 0x00 }, {0x49, 0x02}, true, "EventTrack_EventOrigin", // 118
+ "An Offset used to resolved timeline references to this event track. The start of the event track has this timeline value measured in Edit Units." },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 }, {0x02, 0x01}, false, "StructuralComponent_DataDefinition", // 119
+ "Data Definition - kind of data or metadata this structure refers to" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x07, 0x02, 0x02, 0x01, 0x01, 0x03, 0x00, 0x00 }, {0x02, 0x02}, false, "StructuralComponent_Duration", // 120
+ "Duration (in units of edit rate)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0f, 0x00 }, {0}, false, "Sequence", // 121
+ "Sequence" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x06, 0x01, 0x01, 0x04, 0x06, 0x09, 0x00, 0x00 }, {0x10, 0x01}, false, "Sequence_StructuralComponents", // 122
+ "Ordered array of strong references to Structural Components" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x14, 0x00 }, {0}, false, "TimecodeComponent", // 123
+ "Timecode Component" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x04, 0x01, 0x01, 0x02, 0x06, 0x00, 0x00 }, {0x15, 0x02}, false, "TimecodeComponent_RoundedTimecodeBase", // 124
+ "Integer frames per second" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x07, 0x02, 0x01, 0x03, 0x01, 0x05, 0x00, 0x00 }, {0x15, 0x01}, false, "TimecodeComponent_StartTimecode", // 125
+ "Starting timecode" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x04, 0x01, 0x01, 0x05, 0x00, 0x00, 0x00 }, {0x15, 0x03}, false, "TimecodeComponent_DropFrame", // 126
+ "Drop frame flag" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x11, 0x00 }, {0}, false, "SourceClip", // 127
+ "Source Clip" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x07, 0x02, 0x01, 0x03, 0x01, 0x04, 0x00, 0x00 }, {0x12, 0x01}, false, "SourceClip_StartPosition", // 128
+ "Offset into Essence measured in edit units of the track containing this segment" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x06, 0x01, 0x01, 0x03, 0x01, 0x00, 0x00, 0x00 }, {0x11, 0x01}, false, "SourceClip_SourcePackageID", // 129
+ "ID of referenced Package as a UMID" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x06, 0x01, 0x01, 0x03, 0x02, 0x00, 0x00, 0x00 }, {0x11, 0x02}, false, "SourceClip_SourceTrackID", // 130
+ "Track ID of the referenced Track within the referenced Package" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x41, 0x00 }, {0}, false, "DMSegment", // 131
+ "Descriptive Metadata Segment" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x07, 0x02, 0x01, 0x03, 0x03, 0x03, 0x00, 0x00 }, {0x06, 0x01}, false, "DMSegment_EventStartPosition", // 132
+ "Offset into the descriptive metadata track in edit units" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x05, 0x30, 0x04, 0x04, 0x01, 0x00, 0x00, 0x00 }, {0x06, 0x02}, true, "DMSegment_EventComment", // 133
+ "Description of the Descriptive Metadata Framework" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x01, 0x07, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00 }, {0x61, 0x02}, false, "DMSegment_TrackIDs", // 134
+ "An unordered list of track ID values that identify the tracks in this Package to which this DM Framework refers (if omitted, refers to all essence tracks)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x06, 0x01, 0x01, 0x04, 0x02, 0x0c, 0x00, 0x00 }, {0x61, 0x01}, false, "DMSegment_DMFramework", // 135
+ "Strong Reference to the Descriptive Metadata Framework" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x45, 0x00 }, {0}, false, "DMSourceClip", // 136
+ "Descriptive Metadata SourceClip" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x01, 0x07, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00 }, {0x61, 0x03}, true, "DMSourceClip_DMSourceClipTrackIDs", // 137
+ "An unordered list of track ID values that identify the tracks in this Package to which the referenced Descriptive Metadata refers (if omitted, refers to all essence tracks)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x36, 0x00 }, {0}, false, "MaterialPackage", // 138
+ "Material Package set" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x37, 0x00 }, {0}, false, "SourcePackage", // 139
+ "File Package set" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x06, 0x01, 0x01, 0x04, 0x02, 0x03, 0x00, 0x00 }, {0x47, 0x01}, false, "SourcePackage_Descriptor", // 140
+ "Strong Reference to the Descriptor" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x06, 0x01, 0x01, 0x04, 0x06, 0x03, 0x00, 0x00 }, {0x2f, 0x01}, true, "GenericDescriptor_Locators", // 141
+ "Ordered array of strong references to Locator sets" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x06, 0x01, 0x01, 0x04, 0x06, 0x10, 0x00, 0x00 }, {0}, true, "GenericDescriptor_SubDescriptors", // 142
+ "Ordered array of strong references to sub descriptor sets" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x25, 0x00 }, {0}, false, "FileDescriptor", // 143
+ "File Descriptor" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x06, 0x01, 0x01, 0x03, 0x05, 0x00, 0x00, 0x00 }, {0x30, 0x06}, true, "FileDescriptor_LinkedTrackID", // 144
+ "Link to (i.e. value of) the Track ID of the Track in this Package to which the Descriptor applies" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x06, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0x30, 0x01}, false, "FileDescriptor_SampleRate", // 145
+ "The field or frame rate of the Essence Container (not the essence sampling clock rate)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x06, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0x30, 0x02}, true, "FileDescriptor_ContainerDuration", // 146
+ "Duration of Essence Container (measured in Edit Units)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x06, 0x01, 0x01, 0x04, 0x01, 0x02, 0x00, 0x00 }, {0x30, 0x04}, false, "FileDescriptor_EssenceContainer", // 147
+ "The UL identifying the Essence Container described by this Descriptor" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x06, 0x01, 0x01, 0x04, 0x01, 0x03, 0x00, 0x00 }, {0x30, 0x05}, true, "FileDescriptor_Codec", // 148
+ "UL to identify a codec compatible with this Essence Container" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x27, 0x00 }, {0}, false, "GenericPictureEssenceDescriptor", // 149
+ "Defines the Picture Essence Descriptor set" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x05, 0x01, 0x13, 0x00, 0x00, 0x00, 0x00 }, {0x32, 0x15}, true, "GenericPictureEssenceDescriptor_SignalStandard", // 150
+ "Underlying signal standard" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x01, 0x03, 0x01, 0x04, 0x00, 0x00, 0x00 }, {0x32, 0x0c}, false, "GenericPictureEssenceDescriptor_FrameLayout", // 151
+ "Interlace or Progressive layout" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x01, 0x05, 0x02, 0x02, 0x00, 0x00, 0x00 }, {0x32, 0x03}, false, "GenericPictureEssenceDescriptor_StoredWidth", // 152
+ "Horizontal Size of active picture" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x01, 0x05, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0x32, 0x02}, false, "GenericPictureEssenceDescriptor_StoredHeight", // 153
+ "Vertical Field Size of active picture" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x03, 0x02, 0x08, 0x00, 0x00, 0x00 }, {0x32, 0x16}, true, "GenericPictureEssenceDescriptor_StoredF2Offset", // 154
+ "Topness Adjustment for stored picture" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x01, 0x05, 0x01, 0x08, 0x00, 0x00, 0x00 }, {0x32, 0x05}, true, "GenericPictureEssenceDescriptor_SampledWidth", // 155
+ "Sampled width supplied to codec" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x01, 0x05, 0x01, 0x07, 0x00, 0x00, 0x00 }, {0x32, 0x04}, true, "GenericPictureEssenceDescriptor_SampledHeight", // 156
+ "Sampled height supplied to codec" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x01, 0x05, 0x01, 0x09, 0x00, 0x00, 0x00 }, {0x32, 0x06}, true, "GenericPictureEssenceDescriptor_SampledXOffset", // 157
+ "Offset from sampled to stored width" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x01, 0x05, 0x01, 0x0a, 0x00, 0x00, 0x00 }, {0x32, 0x07}, true, "GenericPictureEssenceDescriptor_SampledYOffset", // 158
+ "Offset from sampled to stored" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x01, 0x05, 0x01, 0x0b, 0x00, 0x00, 0x00 }, {0x32, 0x08}, true, "GenericPictureEssenceDescriptor_DisplayHeight", // 159
+ "Displayed Height placed in Production Aperture" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x01, 0x05, 0x01, 0x0c, 0x00, 0x00, 0x00 }, {0x32, 0x09}, true, "GenericPictureEssenceDescriptor_DisplayWidth", // 160
+ "Displayed Width placed in Production Aperture" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x01, 0x05, 0x01, 0x0d, 0x00, 0x00, 0x00 }, {0x32, 0x0a}, true, "GenericPictureEssenceDescriptor_DisplayXOffset", // 161
+ "The horizontal offset from the (in pixels) of the picture as displayed" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x01, 0x05, 0x01, 0x0e, 0x00, 0x00, 0x00 }, {0x32, 0x0b}, true, "GenericPictureEssenceDescriptor_DisplayYOffset", // 162
+ "The vertical offset (in pixels) of the picture as displayed" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x03, 0x02, 0x07, 0x00, 0x00, 0x00 }, {0x32, 0x17}, true, "GenericPictureEssenceDescriptor_DisplayF2Offset", // 163
+ "Topness Adjustment for Displayed Picture" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0x32, 0x0e}, false, "GenericPictureEssenceDescriptor_AspectRatio", // 164
+ "Specifies the horizontal to vertical aspect ratio of the whole image as it is to be presented to avoid geometric distortion (and hence including any black edges)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x03, 0x02, 0x09, 0x00, 0x00, 0x00 }, {0x32, 0x18}, true, "GenericPictureEssenceDescriptor_ActiveFormatDescriptor", // 165
+ "Specifies the intended framing of the content within the displayed image" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x01, 0x03, 0x02, 0x05, 0x00, 0x00, 0x00 }, {0x32, 0x0d}, false, "GenericPictureEssenceDescriptor_VideoLineMap", // 166
+ "First active line in each field" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x05, 0x20, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0x32, 0x0f}, true, "GenericPictureEssenceDescriptor_AlphaTransparency", // 167
+ "Is Alpha Inverted" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x01, 0x02, 0x01, 0x01, 0x01, 0x02, 0x00 }, {0x32, 0x10}, true, "GenericPictureEssenceDescriptor_Gamma", // 168
+ "Registered UL of known Gamma" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x18, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0x32, 0x11}, true, "GenericPictureEssenceDescriptor_ImageAlignmentOffset", // 169
+ "Byte Boundary alignment required for Low Level Essence Storage" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x18, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0x32, 0x13}, true, "GenericPictureEssenceDescriptor_ImageStartOffset", // 170
+ "Unused bytes before start of stored data" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x18, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00 }, {0x32, 0x14}, true, "GenericPictureEssenceDescriptor_ImageEndOffset", // 171
+ "Unused bytes before start of stored data" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x01, 0x03, 0x01, 0x06, 0x00, 0x00, 0x00 }, {0x32, 0x12}, true, "GenericPictureEssenceDescriptor_FieldDominance", // 172
+ "The number of the field which is considered temporally to come first" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0x32, 0x01}, false, "GenericPictureEssenceDescriptor_PictureEssenceCoding", // 173
+ "UL identifying the Picture Compression Scheme" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x28, 0x00 }, {0}, false, "CDCIEssenceDescriptor", // 174
+ "Defines the CDCI Picture Essence Descriptor set" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x01, 0x05, 0x03, 0x0a, 0x00, 0x00, 0x00 }, {0x33, 0x01}, false, "CDCIEssenceDescriptor_ComponentDepth", // 175
+ "Number of active bits per sample (e.g. 8, 10, 16)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x01, 0x05, 0x01, 0x05, 0x00, 0x00, 0x00 }, {0x33, 0x02}, false, "CDCIEssenceDescriptor_HorizontalSubsampling", // 176
+ "Specifies the H colour subsampling" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x01, 0x05, 0x01, 0x10, 0x00, 0x00, 0x00 }, {0x33, 0x08}, true, "CDCIEssenceDescriptor_VerticalSubsampling", // 177
+ "Specifies the V colour subsampling" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x01, 0x05, 0x01, 0x06, 0x00, 0x00, 0x00 }, {0x33, 0x03}, true, "CDCIEssenceDescriptor_ColorSiting", // 178
+ "Enumerated value describing the color siting" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x03, 0x01, 0x02, 0x01, 0x0a, 0x00, 0x00, 0x00 }, {0x33, 0x0b}, true, "CDCIEssenceDescriptor_ReversedByteOrder", // 179
+ "a FALSE value denotes Chroma followed by Luma pexels according to ITU Rec. 601" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x18, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00 }, {0x33, 0x07}, true, "CDCIEssenceDescriptor_PaddingBits", // 180
+ "Bits to round up each pixel to stored size" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x01, 0x05, 0x03, 0x07, 0x00, 0x00, 0x00 }, {0x33, 0x09}, true, "CDCIEssenceDescriptor_AlphaSampleDepth", // 181
+ "Number of bits per alpha sample" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x01, 0x05, 0x03, 0x03, 0x00, 0x00, 0x00 }, {0x33, 0x04}, true, "CDCIEssenceDescriptor_BlackRefLevel", // 182
+ "Black refernece level e.g. 16 or 64 (8 or 10-bits)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x01, 0x05, 0x03, 0x04, 0x00, 0x00, 0x00 }, {0x33, 0x05}, true, "CDCIEssenceDescriptor_WhiteReflevel", // 183
+ "White reference level e.g. 235 or 943 (8 or 10 bits)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x01, 0x05, 0x03, 0x05, 0x00, 0x00, 0x00 }, {0x33, 0x06}, true, "CDCIEssenceDescriptor_ColorRange", // 184
+ "Color range e.g. 225 or 897 (8 or 10 bits)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x29, 0x00 }, {0}, false, "RGBAEssenceDescriptor", // 185
+ "Defines the RGBA Picture Essence Descriptor set" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x05, 0x03, 0x0b, 0x00, 0x00, 0x00 }, {0x34, 0x06}, true, "RGBAEssenceDescriptor_ComponentMaxRef", // 186
+ "Maximum value for RGB components, e.g. 235 or 940 (8 or 10 bits)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x05, 0x03, 0x0c, 0x00, 0x00, 0x00 }, {0x34, 0x07}, true, "RGBAEssenceDescriptor_ComponentMinRef", // 187
+ "Minimum value for RGB components, e.g. 16 or 64 (8 or 10 bits)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x05, 0x03, 0x0d, 0x00, 0x00, 0x00 }, {0x34, 0x08}, true, "RGBAEssenceDescriptor_AlphaMaxRef", // 188
+ "Maximum value for alpha component, e.g. 235 or 940 (8 or 10 bits)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x05, 0x03, 0x0e, 0x00, 0x00, 0x00 }, {0x34, 0x09}, true, "RGBAEssenceDescriptor_AlphaMinRef", // 189
+ "Minimum value for alpha component, e.g. 16 or 64 (8 or 10 bits)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x04, 0x04, 0x01, 0x00, 0x00, 0x00 }, {0x34, 0x05}, true, "RGBAEssenceDescriptor_ScanningDirection", // 190
+ "Enumerated Scanning Direction" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x01, 0x05, 0x03, 0x06, 0x00, 0x00, 0x00 }, {0x34, 0x01}, false, "RGBAEssenceDescriptor_PixelLayout", // 191
+ "Pixel Layout" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x01, 0x05, 0x03, 0x08, 0x00, 0x00, 0x00 }, {0x34, 0x03}, true, "RGBAEssenceDescriptor_Palette", // 192
+ "Palette" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x01, 0x05, 0x03, 0x09, 0x00, 0x00, 0x00 }, {0x34, 0x04}, true, "RGBAEssenceDescriptor_PaletteLayout", // 193
+ "Palette Layout" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x42, 0x00 }, {0}, false, "GenericSoundEssenceDescriptor", // 194
+ "Defines the Sound Essence Descriptor set" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x02, 0x03, 0x01, 0x01, 0x01, 0x00, 0x00 }, {0x3d, 0x03}, false, "GenericSoundEssenceDescriptor_AudioSamplingRate", // 195
+ "Sampling rate of the audio essence" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x02, 0x03, 0x01, 0x04, 0x00, 0x00, 0x00 }, {0x3d, 0x02}, false, "GenericSoundEssenceDescriptor_Locked", // 196
+ "Boolean indicating that the Number of samples per frame is locked or unlocked (non-0 = locked)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x02, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00 }, {0x3d, 0x04}, true, "GenericSoundEssenceDescriptor_AudioRefLevel", // 197
+ "Audio reference level which gives the number of dBm for 0VU" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
+ 0x04, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0x3d, 0x05}, true, "GenericSoundEssenceDescriptor_ElectroSpatialFormulation", // 198
+ "E.g. mono, dual mono, stereo, A,B etc (enum)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x02, 0x01, 0x01, 0x04, 0x00, 0x00, 0x00 }, {0x3d, 0x07}, false, "GenericSoundEssenceDescriptor_ChannelCount", // 199
+ "Number of Sound Channels" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x04, 0x02, 0x03, 0x03, 0x04, 0x00, 0x00, 0x00 }, {0x3d, 0x01}, false, "GenericSoundEssenceDescriptor_QuantizationBits", // 200
+ "Number of quantization bits" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x02, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0x3d, 0x0c}, true, "GenericSoundEssenceDescriptor_DialNorm", // 201
+ "Gain to be applied to normalise perceived loudness of the clip, defined by ATSC A/53 (1dB per step)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
+ 0x04, 0x02, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0x3d, 0x06}, false, "GenericSoundEssenceDescriptor_SoundEssenceCompression", // 202
+ "UL identifying the Sound Compression Scheme" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x43, 0x00 }, {0}, false, "GenericDataEssenceDescriptor", // 203
+ "Defines the Data Essence Descriptor set" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x03, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0x3e, 0x01}, false, "GenericDataEssenceDescriptor_DataEssenceCoding", // 204
+ "Specifies the data essence coding type" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x44, 0x00 }, {0}, false, "MultipleDescriptor", // 205
+ "Defines the Multiple Descriptor set" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
+ 0x06, 0x01, 0x01, 0x04, 0x06, 0x0b, 0x00, 0x00 }, {0x3f, 0x01}, false, "MultipleDescriptor_SubDescriptorUIDs", // 206
+ "Unordered array of strong references to File Descriptor sets (1 per interleaved item within the Essence Container)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x51, 0x00 }, {0}, false, "MPEG2VideoDescriptor", // 207
+ "Defines the MPEG2 Picture Essence Descriptor set" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x06, 0x02, 0x01, 0x02, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_SingleSequence", // 208
+ "TRUE if the essence consists of a single MPEG sequence. False if there are a number of sequences. This flag implies that the sequence header information is not varying in the essence stream." },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x06, 0x02, 0x01, 0x03, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_ConstantBFrames", // 209
+ "TRUE if the number of B frames is always constant" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x06, 0x02, 0x01, 0x04, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_CodedContentType", // 210
+ "0= &quot;Unknown&quot;,1= &quot;Progressive&quot;, 2= &quot;Interlaced&quot;, 3= &quot;Mixed&quot;: an enumerated value which tells if the underlying content which was MPEG coded was of a known type" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x06, 0x02, 0x01, 0x05, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_LowDelay", // 211
+ "TRUE if low delay mode was used in the sequence" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x06, 0x02, 0x01, 0x06, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_ClosedGOP", // 212
+ "TRUE if closed_gop is set in all GOP Headers, per 13818-1 IBP descriptor" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x06, 0x02, 0x01, 0x07, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_IdenticalGOP", // 213
+ "TRUE if every GOP in the sequence is constructed the same, per 13818-1 IBP descriptor" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x06, 0x02, 0x01, 0x08, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_MaxGOP", // 214
+ "Specifies the maximum occurring spacing between I frames, per 13818-1 IBP descriptor. A value of 0 or the absence of this property implies no limit to the maximum GOP" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x06, 0x02, 0x01, 0x09, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_BPictureCount", // 215
+ "Specifies the maximum number of B pictures between P or I frames, equivalent to 13818-2 annex D (M-1)" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x06, 0x02, 0x01, 0x0b, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_BitRate", // 216
+ "Maximum bit rate of MPEG video elementary stream in bit/s as defined in ISO-13818-2 bit_rate property" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x01, 0x06, 0x02, 0x01, 0x0a, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_ProfileAndLevel", // 217
+ "Specifies the MPEG-2 video profile and level. The value is taken directly from the profile_and_level_indication in the MPEG-2 sequence header extension. For main profile @ main level, the value is 0x48. For 4:2:2 profile @ main level, the value is 0x85" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x48, 0x00 }, {0}, false, "WaveAudioDescriptor", // 218
+ "Defines the Wave Audio Essence Descriptor Set" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x02, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0x3d, 0x0a}, false, "WaveAudioDescriptor_BlockAlign", // 219
+ "Sample Block alignment" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x02, 0x03, 0x02, 0x02, 0x00, 0x00, 0x00 }, {0x3d, 0x0b}, true, "WaveAudioDescriptor_SequenceOffset", // 220
+ "Zero-based ordinal frame number of first essence data within five-frame sequence" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x02, 0x03, 0x03, 0x05, 0x00, 0x00, 0x00 }, {0x3d, 0x09}, false, "WaveAudioDescriptor_AvgBps", // 221
+ "Average Bytes per second" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
+ 0x04, 0x02, 0x03, 0x01, 0x0e, 0x00, 0x00, 0x00 }, {0x3d, 0x0e}, true, "WaveAudioDescriptor_PeakEnvelope", // 222
+ "Peak Envelope from &lt;LEVL> Chunk" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x5a, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor", // 223
+ "JPEG 2000 Picture Sub Descriptor" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
+ 0x04, 0x01, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_Rsize", // 224
+ "An enumerated value that defines the decoder capabilities" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
+ 0x04, 0x01, 0x06, 0x03, 0x02, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_Xsize", // 225
+ "Width of the reference grid" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
+ 0x04, 0x01, 0x06, 0x03, 0x03, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_Ysize", // 226
+ "Height of the reference grid" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
+ 0x04, 0x01, 0x06, 0x03, 0x04, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_XOsize", // 227
+ "Horizontal offset from the origin of the reference grid to the left side of the image area" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
+ 0x04, 0x01, 0x06, 0x03, 0x05, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_YOsize", // 228
+ "Vertical offset from the origin of the reference grid to the top side of the image area" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
+ 0x04, 0x01, 0x06, 0x03, 0x06, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_XTsize", // 229
+ "Width of one reference tile with respect to the reference grid" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
+ 0x04, 0x01, 0x06, 0x03, 0x07, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_YTsize", // 230
+ "Height of one reference tile with respect to the reference grid" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
+ 0x04, 0x01, 0x06, 0x03, 0x08, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_XTOsize", // 231
+ "Horizontal offset from the origin of the reference grid to the left side of the first tile" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
+ 0x04, 0x01, 0x06, 0x03, 0x09, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_YTOsize", // 232
+ "Vertical offset from the origin of the reference grid to the top side of the first tile" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
+ 0x04, 0x01, 0x06, 0x03, 0x0a, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_Csize", // 233
+ "The number of components in the picture" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
+ 0x04, 0x01, 0x06, 0x03, 0x0b, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_PictureComponentSizing", // 234
+ "Array of picture components" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
+ 0x04, 0x01, 0x06, 0x03, 0x0c, 0x00, 0x00, 0x00 }, {0}, true, "JPEG2000PictureSubDescriptor_CodingStyleDefault", // 235
+ "Default coding style for all components. Use this value only if static for all pictures in the Essence Container" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
+ 0x04, 0x01, 0x06, 0x03, 0x0d, 0x00, 0x00, 0x00 }, {0}, true, "JPEG2000PictureSubDescriptor_QuantizationDefault", // 236
+ "Default quantization style for all components. Use this value only if static for all pictures in the Essence Container" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "DM_Framework", // 237
+ "Superclass for all concrete DM Frameworks" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "DM_Set", // 238
+ "Superclass for all concrete DM Frameworks" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x07,
+ 0x0d, 0x01, 0x03, 0x01, 0x02, 0x0b, 0x01, 0x00 }, {0}, false, "EncryptedContainerLabel", // 239
+ "DCP-Crypto Encrypted Essence Container, frame-wrapped" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x07,
+ 0x0d, 0x01, 0x04, 0x01, 0x02, 0x01, 0x01, 0x00 }, {0}, false, "CryptographicFrameworkLabel", // 240
+ "DCP-Crypto Framework" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x04, 0x01, 0x02, 0x01, 0x00, 0x00 }, {0}, false, "CryptographicFramework", // 241
+ "DCP-Encryption Cryptographic Framework" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
+ 0x06, 0x01, 0x01, 0x04, 0x02, 0x0d, 0x00, 0x00 }, {0}, false, "CryptographicFramework_ContextSR", // 242
+ "Strong Reference to the associated Cryptographic Context" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
+ 0x0d, 0x01, 0x04, 0x01, 0x02, 0x02, 0x00, 0x00 }, {0}, false, "CryptographicContext", // 243
+ "cryptographic information that applies to encrypted essence tracks as a whole" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
+ 0x01, 0x01, 0x15, 0x11, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "CryptographicContext_ContextID", // 244
+ "Persistent Unique identifier for the context" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
+ 0x06, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00 }, {0}, false, "CryptographicContext_SourceEssenceContainer", // 245
+ "Essence Container Label for the source essence, prior to encryption" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
+ 0x02, 0x09, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "CryptographicContext_CipherAlgorithm", // 246
+ "Algorithm used for Triplet encryption, if any" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
+ 0x02, 0x09, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "CryptographicContext_MICAlgorithm", // 247
+ "Algorithm used for Triplet integrity, if any" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
+ 0x02, 0x09, 0x03, 0x01, 0x02, 0x00, 0x00, 0x00 }, {0}, false, "CryptographicContext_CryptographicKeyID", // 248
+ "Unique identifier for the cryptographic key" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x04, 0x01, 0x07,
+ 0x0d, 0x01, 0x03, 0x01, 0x02, 0x7e, 0x01, 0x00 }, {0}, false, "EncryptedTriplet", // 249
+ "encrypted data and cryptographic information specific to the Triplet" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
+ 0x06, 0x01, 0x01, 0x06, 0x03, 0x00, 0x00, 0x00 }, {0}, false, "EncryptedTriplet_ContextIDLink", // 250
+ "Persistent Unique identifier for the context.associated with this Triplet" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
+ 0x06, 0x09, 0x02, 0x01, 0x03, 0x00, 0x00, 0x00 }, {0}, false, "EncryptedTriplet_PlaintextOffset", // 251
+ "Offset within the source at which encryption starts" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
+ 0x06, 0x01, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00 }, {0}, false, "EncryptedTriplet_SourceKey", // 252
+ "Key of the source Triplet" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
+ 0x04, 0x06, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "EncryptedTriplet_SourceLength", // 253
+ "Length of the value of the source Triplet" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
+ 0x02, 0x09, 0x03, 0x01, 0x03, 0x00, 0x00, 0x00 }, {0}, false, "EncryptedTriplet_EncryptedSourceValue", // 254
+ "Encrypted Source value starting at Plaintext Offset" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
+ 0x06, 0x01, 0x01, 0x06, 0x02, 0x00, 0x00, 0x00 }, {0}, true, "EncryptedTriplet_TrackFileID", // 255
+ "The identifier of the AS-DCP Track File containing this Triplet" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
+ 0x06, 0x10, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00 }, {0}, true, "EncryptedTriplet_SequenceNumber", // 256
+ "Sequence number of this Triplet within the Track File" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
+ 0x02, 0x09, 0x03, 0x02, 0x02, 0x00, 0x00, 0x00 }, {0}, true, "EncryptedTriplet_MIC", // 257
+ "Keyed HMAC" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x07,
+ 0x02, 0x09, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "CipherAlgorithmAES128CBC", // 258
+ "Identifes the use of AES128 CBC mode cipher algorithm" },
+
+ { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x07,
+ 0x02, 0x09, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "HMACAlgorithmSHA1128", // 259
+ "Identifes the use of SHA1 128 bit HMAC algorithm" },
+
+ { 0, 0, 0 }
+};
+
+//
+// end MDD.cpp
+//
diff --git a/src/MDD.h b/src/MDD.h
index bcf0a98..413955c 100755
--- a/src/MDD.h
+++ b/src/MDD.h
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2005-2006, John Hurst
+Copyright (c) 2006, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -24,1250 +24,280 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/*! \file MDD.h
+/*! \file MDD.[h|cpp]
\version $Id$
- \brief MXF constants
+ \brief MXF Metadata Dictionary
*/
#ifndef _MDD_H_
#define _MDD_H_
-#include <KLV.h>
-const ASDCP::MDDEntry s_MDD_Table[] = {
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x02, 0x01, 0x01,
- 0x0d, 0x01, 0x03, 0x01, 0x15, 0x01, 0x08, 0x01 }, {0}, true, "JPEG2000Essence", // 0
- "JPEG 2000 Compressed Picture Essence Descriptor" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x02, 0x01, 0x01,
- 0x0d, 0x01, 0x03, 0x01, 0x15, 0x01, 0x05, 0x00 }, {0}, true, "MPEG2Essence", // 1
- "MPEG-2 Compressed Picture Essence Descriptor" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x02, 0x01, 0x01,
- 0x0d, 0x01, 0x03, 0x01, 0x16, 0x01, 0x01, 0x00 }, {0}, true, "WAVEssence", // 2
- "PCM Audio Essence Descriptor" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x04, 0x01, 0x07,
- 0x0d, 0x01, 0x03, 0x01, 0x02, 0x7e, 0x01, 0x00 }, {0}, true, "EKLVPacket", // 3
- "Encrypted Essence Container Descriptor" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x03, 0x01, 0x02, 0x10, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "KLVFill", // 4
- "KLV Filler packet" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x03, 0x01, 0x02, 0x01, 0x06, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_MajorVersion", // 5
- "Major Version number of MXF byte-level format (non-backwards compatible version number)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x03, 0x01, 0x02, 0x01, 0x07, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_MinorVersion", // 6
- "Minor Version number of MXF byte-level format (backwards compatible version number)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x03, 0x01, 0x02, 0x01, 0x09, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_KAGSize", // 7
- "Size of the KLV Alignment Grid (KAG) for this partition, in bytes" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x06, 0x10, 0x10, 0x03, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_ThisPartition", // 8
- "Byte offset of the start of This Partition, relative to the start of the Header Partition" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x06, 0x10, 0x10, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_PreviousPartition", // 9
- "Byte offset of the start of the Previous Partition, relative to the start of the Header Partition" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x06, 0x10, 0x10, 0x05, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_FooterPartition", // 10
- "Byte offset of the start of the Footer Partition, relative to the start of the Header Partition" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x04, 0x06, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_HeaderByteCount", // 11
- "Count of Bytes used for Header Metadata. This starts at the byte following the Partition pack and includes any trailing filler which is part of the Header Metadata." },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x04, 0x06, 0x09, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_IndexByteCount", // 12
- "Count of Bytes used for Index Table Segments. This starts at the byte following the Header Metadata and includes any trailing filler which is part of the Index Table." },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x01, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_IndexSID", // 13
- "Index Table Segment Identifier in this partition. The value 0 defines that there are no Index Table segments in this partition." },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x06, 0x08, 0x01, 0x02, 0x01, 0x03, 0x00, 0x00 }, {0}, false, "PartitionMetadata_BodyOffset", // 14
- "Byte offset of the first byte in the following Essence Container data relative to the start of the Essence Container identified by this BodySID" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x01, 0x03, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_BodySID", // 15
- "Identifier of the Essence Container data found in this partition. The value 0 indicates there is no Essence Container data in this partition." },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x01, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "PartitionMetadata_OperationalPattern", // 16
- "Universal Label of the Operational Pattern to which this file complies" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x01, 0x02, 0x02, 0x10, 0x02, 0x01, 0x00, 0x00 }, {0}, false, "PartitionMetadata_EssenceContainers", // 17
- "The unordered batch of Universal Labels of Essence Containers used in or referenced by this file" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
- 0x0d, 0x01, 0x02, 0x01, 0x01, 0x02, 0x01, 0x00 }, {0}, false, "OpenHeader", // 18
- "Open Header Partition Pack" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
- 0x0d, 0x01, 0x02, 0x01, 0x01, 0x02, 0x03, 0x00 }, {0}, false, "OpenCompleteHeader", // 19
- "Open Complete Header Partition Pack" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
- 0x0d, 0x01, 0x02, 0x01, 0x01, 0x02, 0x02, 0x00 }, {0}, false, "ClosedHeader", // 20
- "Closed Header Partition Pack" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
- 0x0d, 0x01, 0x02, 0x01, 0x01, 0x02, 0x04, 0x00 }, {0}, false, "ClosedCompleteHeader", // 21
- "Closed Complete Header Partition Pack" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
- 0x0d, 0x01, 0x02, 0x01, 0x01, 0x03, 0x01, 0x00 }, {0}, false, "OpenBodyPartition", // 22
- "Open Body Partition Pack" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
- 0x0d, 0x01, 0x02, 0x01, 0x01, 0x03, 0x03, 0x00 }, {0}, false, "OpenCompleteBodyPartition", // 23
- "Open Complete Body Partition Pack" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
- 0x0d, 0x01, 0x02, 0x01, 0x01, 0x03, 0x02, 0x00 }, {0}, false, "ClosedBodyPartition", // 24
- "Closed Body Partition Pack" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
- 0x0d, 0x01, 0x02, 0x01, 0x01, 0x03, 0x04, 0x00 }, {0}, false, "ClosedCompleteBodyPartition", // 25
- "Closed Complete Body Partition Pack" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
- 0x0d, 0x01, 0x02, 0x01, 0x01, 0x04, 0x02, 0x00 }, {0}, false, "Footer", // 26
- "Footer Partition Pack" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
- 0x0d, 0x01, 0x02, 0x01, 0x01, 0x04, 0x04, 0x00 }, {0}, false, "CompleteFooter", // 27
- "Complete Footer Partition Pack" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
- 0x0d, 0x01, 0x02, 0x01, 0x01, 0x05, 0x01, 0x00 }, {0}, false, "Primer", // 28
- "Primer Pack" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x06, 0x01, 0x01, 0x07, 0x15, 0x00, 0x00, 0x00 }, {0}, false, "Primer_LocalTagEntryBatch", // 29
- "Local Tag Entry Batch" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x01, 0x03, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "LocalTagEntryBatch_Primer_LocalTag", // 30
- "The value of the Local Tag" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x01, 0x03, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "LocalTagEntryBatch_Primer_UID", // 31
- "The UID of which the local tag is an alias" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x15, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0x3c, 0x0a}, false, "InterchangeObject_InstanceUID", // 32
- "Unique ID of this instance" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x05, 0x20, 0x07, 0x01, 0x08, 0x00, 0x00, 0x00 }, {0x01, 0x02}, true, "GenerationInterchangeObject_GenerationUID", // 33
- "Generation Instance" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "DefaultObject", // 34
- "" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x05, 0x30, 0x04, 0x06, 0x00, 0x00, 0x00, 0x00 }, {0x3f, 0x0b}, false, "IndexTableSegmentBase_IndexEditRate", // 35
- "Edit Rate copied from the tracks of the Essence Container" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x07, 0x02, 0x01, 0x03, 0x01, 0x0a, 0x00, 0x00 }, {0x3f, 0x0c}, false, "IndexTableSegmentBase_IndexStartPosition", // 36
- "The first editable unit indexed by this Index Table segment measured in File Package Edit Units" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x07, 0x02, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00 }, {0x3f, 0x0d}, false, "IndexTableSegmentBase_IndexDuration", // 37
- "Time duration of this table segment measured in Edit Unitsof the referenceg package" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x04, 0x06, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0x3f, 0x05}, false, "IndexTableSegmentBase_EditUnitByteCount", // 38
- "Byte count of each and every Edit Unit. A value of 0 defines the byte count of Edit Units is only given in the Index Entry Array" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x01, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00 }, {0x3f, 0x06}, false, "IndexTableSegmentBase_IndexSID", // 39
- "Stream Identifier (SID) of Index Stream" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x01, 0x03, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00 }, {0x3f, 0x07}, false, "IndexTableSegmentBase_BodySID", // 40
- "Stream Identifier (SID) of Essence Container Stream" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x04, 0x04, 0x04, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0x3f, 0x08}, false, "IndexTableSegmentBase_SliceCount", // 41
- "Number of slices minus 1 (NSL)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x04, 0x04, 0x01, 0x07, 0x00, 0x00, 0x00 }, {0x3f, 0x0e}, true, "IndexTableSegmentBase_PosTableCount", // 42
- "Number of PosTable Entries minus 1 (NPE)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x02, 0x01, 0x01, 0x10, 0x01, 0x00 }, {0}, false, "IndexTableSegment", // 43
- "A segment of an Index Table" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x04, 0x04, 0x01, 0x06, 0x00, 0x00, 0x00 }, {0x3f, 0x09}, true, "IndexTableSegment_DeltaEntryArray", // 44
- "Map Elements onto Slices" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x04, 0x04, 0x04, 0x01, 0x04, 0x00, 0x00, 0x00 }, {0}, false, "DeltaEntryArray_IndexTableSegment_PosTableIndex", // 45
- "Index into PosTable (or Apply Temporta Reordering if -1)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x04, 0x04, 0x04, 0x01, 0x02, 0x00, 0x00, 0x00 }, {0}, false, "DeltaEntryArray_IndexTableSegment_Slice", // 46
- "Slice number in IndexEntry" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x04, 0x04, 0x04, 0x01, 0x03, 0x00, 0x00, 0x00 }, {0}, false, "DeltaEntryArray_IndexTableSegment_ElementDelta", // 47
- "Delta from start of slice to this Element" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x04, 0x04, 0x02, 0x05, 0x00, 0x00, 0x00 }, {0x3f, 0x0a}, false, "IndexTableSegment_IndexEntryArray", // 48
- "Index from Edit Unit number to stream offset" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x04, 0x04, 0x04, 0x02, 0x03, 0x00, 0x00, 0x00 }, {0}, false, "IndexEntryArray_IndexTableSegment_TemporalOffset", // 49
- "Offset in edit units from Display Order to Coded Order" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x04, 0x04, 0x04, 0x02, 0x04, 0x00, 0x00, 0x00 }, {0}, false, "IndexEntryArray_IndexTableSegment_AnchorOffset", // 50
- "Offset in edit units to previous Anchor Frame. The value is zero if this is an anchor frame." },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x04, 0x04, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00 }, {0}, false, "IndexEntryArray_IndexTableSegment_Flags", // 51
- "Flags for this Edit Unit" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "IndexEntryArray_IndexTableSegment_StreamOffset", // 52
- "Offset in bytes from the first KLV element in this Edit Unit within the Essence Container" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x04, 0x04, 0x04, 0x01, 0x05, 0x00, 0x00, 0x00 }, {0}, false, "IndexEntryArray_IndexTableSegment_SliceOffsetArray", // 53
- "Array of offsets in bytes from the Stream Offset to the start of each slice." },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x04, 0x04, 0x04, 0x01, 0x08, 0x00, 0x00, 0x00 }, {0}, false, "IndexEntryArray_IndexTableSegment_PosTableArray", // 54
- "Array of fractional position offsets from the start of the content package to the synchronized sample in the Content Package" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x05, 0x01, 0x01,
- 0x0d, 0x01, 0x02, 0x01, 0x01, 0x11, 0x01, 0x00 }, {0}, false, "RandomIndexMetadata", // 55
- "Random Index Pack" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x01, 0x03, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "PartitionArray_RandomIndexMetadata_BodySID", // 56
- "Stream ID of the Body in this partition" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x06, 0x09, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "PartitionArray_RandomIndexMetadata_ByteOffset", // 57
- "Byte offset from file start (1st byte of the file which is numbered 0) to the 1st byte of the Partition Pack Key" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x04, 0x06, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "RandomIndexMetadata_Length", // 58
- "Overall Length of this Pack including the Set Key and BER Length fields" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x2f, 0x00 }, {0}, false, "Preface", // 59
- "Preface Set" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x07, 0x02, 0x01, 0x10, 0x02, 0x04, 0x00, 0x00 }, {0x3b, 0x02}, false, "Preface_LastModifiedDate", // 60
- "Date &amp; time of the last modification of the file" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x03, 0x01, 0x02, 0x01, 0x05, 0x00, 0x00, 0x00 }, {0x3b, 0x05}, false, "Preface_Version", // 61
- "The value shall be 258 (i.e. v1.2)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x03, 0x01, 0x02, 0x01, 0x04, 0x00, 0x00, 0x00 }, {0x3b, 0x07}, true, "Preface_ObjectModelVersion", // 62
- "Simple integer version number of Object Model" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x06, 0x01, 0x01, 0x04, 0x01, 0x08, 0x00, 0x00 }, {0x3b, 0x08}, true, "Preface_PrimaryPackage", // 63
- "The primary Package in this file" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x06, 0x01, 0x01, 0x04, 0x06, 0x04, 0x00, 0x00 }, {0x3b, 0x06}, false, "Preface_Identifications", // 64
- "Ordered array of strong references to Identification sets recording all modifications to the file" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x06, 0x01, 0x01, 0x04, 0x02, 0x01, 0x00, 0x00 }, {0x3b, 0x03}, false, "Preface_ContentStorage", // 65
- "Strong reference to Content Storage object" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x01, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00 }, {0x3b, 0x09}, false, "Preface_OperationalPattern", // 66
- "Universal Label of the Operational Pattern which this file complies to (repeat of Partition Pack value)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x01, 0x02, 0x02, 0x10, 0x02, 0x01, 0x00, 0x00 }, {0x3b, 0x0a}, false, "Preface_EssenceContainers", // 67
- "Unordered batch of ULs of Essence Containers used in or referenced by this file (repeat of Partition Pack value)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x01, 0x02, 0x02, 0x10, 0x02, 0x02, 0x00, 0x00 }, {0x3b, 0x0b}, false, "Preface_DMSchemes", // 68
- "An unordered batch of Universal Labels of all the Descriptive Metadata schemes used in this file" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x30, 0x00 }, {0}, false, "Identification", // 69
- "Identification set" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x05, 0x20, 0x07, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0x3c, 0x09}, false, "Identification_ThisGenerationUID", // 70
- "This Generation Identifier" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x05, 0x20, 0x07, 0x01, 0x02, 0x01, 0x00, 0x00 }, {0x3c, 0x01}, false, "Identification_CompanyName", // 71
- "Manufacturer of the equipment or application that created or modified the file" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x05, 0x20, 0x07, 0x01, 0x03, 0x01, 0x00, 0x00 }, {0x3c, 0x02}, false, "Identification_ProductName", // 72
- "Name of the application which created or modified this file" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x05, 0x20, 0x07, 0x01, 0x04, 0x00, 0x00, 0x00 }, {0x3c, 0x03}, true, "Identification_ProductVersion", // 73
- "Maj.min.tweak.build.rel version number of this application" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x05, 0x20, 0x07, 0x01, 0x05, 0x01, 0x00, 0x00 }, {0x3c, 0x04}, false, "Identification_VersionString", // 74
- "Human readable name of the application version" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x05, 0x20, 0x07, 0x01, 0x07, 0x00, 0x00, 0x00 }, {0x3c, 0x05}, false, "Identification_ProductUID", // 75
- "A unique identification for the product which created this file (defined by the manufacturer)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x07, 0x02, 0x01, 0x10, 0x02, 0x03, 0x00, 0x00 }, {0x3c, 0x06}, false, "Identification_ModificationDate", // 76
- "Time &amp; date an application created or modified this file and created this Identification set" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x05, 0x20, 0x07, 0x01, 0x0a, 0x00, 0x00, 0x00 }, {0x3c, 0x07}, true, "Identification_ToolkitVersion", // 77
- "Maj.min.tweak.build.rel version of software or hardware codec used" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x05, 0x20, 0x07, 0x01, 0x06, 0x01, 0x00, 0x00 }, {0x3c, 0x08}, true, "Identification_Platform", // 78
- "Human readable name of the operating system used." },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18, 0x00 }, {0}, false, "ContentStorage", // 79
- "Content Storage set" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x06, 0x01, 0x01, 0x04, 0x05, 0x01, 0x00, 0x00 }, {0x19, 0x01}, false, "ContentStorage_Packages", // 80
- "Unordered batch of all packages used in this file" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x06, 0x01, 0x01, 0x04, 0x05, 0x02, 0x00, 0x00 }, {0x19, 0x02}, true, "ContentStorage_EssenceContainerData", // 81
- "Unordered batch of strong references to Essence Container Data sets used in this file" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x23, 0x00 }, {0}, false, "EssenceContainerData", // 82
- "Essence Container Data set" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x06, 0x01, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00 }, {0x27, 0x01}, false, "EssenceContainerData_LinkedPackageUID", // 83
- "Identifier of the Package to which this set is linked as a UMID" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x01, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00 }, {0x3f, 0x06}, true, "EssenceContainerData_IndexSID", // 84
- "ID of the Index Table for the Essence Container to which this set is linked" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x01, 0x03, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00 }, {0x3f, 0x07}, false, "EssenceContainerData_BodySID", // 85
- "ID of the Essence Container to which this set is linked" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x15, 0x10, 0x00, 0x00, 0x00, 0x00 }, {0x44, 0x01}, false, "GenericPackage_PackageUID", // 86
- "Unique Package Identifier as a UMID" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0x44, 0x02}, true, "GenericPackage_Name", // 87
- "Human readable package name" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x07, 0x02, 0x01, 0x10, 0x01, 0x03, 0x00, 0x00 }, {0x44, 0x05}, false, "GenericPackage_PackageCreationDate", // 88
- "The date &amp; time of creation of this package" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x07, 0x02, 0x01, 0x10, 0x02, 0x05, 0x00, 0x00 }, {0x44, 0x04}, false, "GenericPackage_PackageModifiedDate", // 89
- "The date &amp; time of last modification of this package" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x06, 0x01, 0x01, 0x04, 0x06, 0x05, 0x00, 0x00 }, {0x44, 0x03}, false, "GenericPackage_Tracks", // 90
- "Array of Unique IDs of Tracks" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x32, 0x00 }, {0}, false, "NetworkLocator", // 91
- "Network Locator set for location with a URL" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0x40, 0x01}, false, "NetworkLocator_URLString", // 92
- "A URL indicating where the essence may be found." },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x33, 0x00 }, {0}, false, "TextLocator", // 93
- "Text Locator set for location with a human-readable text string" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x01, 0x04, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0x41, 0x01}, false, "TextLocator_LocatorName", // 94
- "Value of a human-readable locator text string for manual location of essence" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x01, 0x07, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0x48, 0x01}, false, "GenericTrack_TrackID", // 95
- "ID of the track in this package (for linking to a SourceTrackID in a segment)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x01, 0x04, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00 }, {0x48, 0x04}, false, "GenericTrack_TrackNumber", // 96
- "Number used to link to the track in the Essence Container if it exists" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x01, 0x07, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0x48, 0x02}, true, "GenericTrack_TrackName", // 97
- "Human readable name of the track type" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x06, 0x01, 0x01, 0x04, 0x02, 0x04, 0x00, 0x00 }, {0x48, 0x03}, false, "GenericTrack_Sequence", // 98
- "Strong Reference to Sequence Set" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x3a, 0x00 }, {0}, false, "StaticTrack", // 99
- "" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x3b, 0x00 }, {0}, false, "Track", // 100
- "Track" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x05, 0x30, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00 }, {0x4b, 0x01}, false, "Track_EditRate", // 101
- "Edit Rate of Track" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x07, 0x02, 0x01, 0x03, 0x01, 0x03, 0x00, 0x00 }, {0x4b, 0x02}, false, "Track_Origin", // 102
- "An Offset used to resolved timeline references to this track. The start of the track has this timeline value measured in Edit Units." },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x39, 0x00 }, {0}, false, "EventTrack", // 103
- "Event Track" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x05, 0x30, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0x49, 0x01}, false, "EventTrack_EventEditRate", // 104
- "Edit Rate of Event Track" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x07, 0x02, 0x01, 0x03, 0x01, 0x0b, 0x00, 0x00 }, {0x49, 0x02}, true, "EventTrack_EventOrigin", // 105
- "An Offset used to resolved timeline references to this event track. The start of the event track has this timeline value measured in Edit Units." },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 }, {0x02, 0x01}, false, "StructuralComponent_DataDefinition", // 106
- "Data Definition - kind of data or metadata this structure refers to" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x07, 0x02, 0x02, 0x01, 0x01, 0x03, 0x00, 0x00 }, {0x02, 0x02}, false, "StructuralComponent_Duration", // 107
- "Duration (in units of edit rate)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0f, 0x00 }, {0}, false, "Sequence", // 108
- "Sequence" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x06, 0x01, 0x01, 0x04, 0x06, 0x09, 0x00, 0x00 }, {0x10, 0x01}, false, "Sequence_StructuralComponents", // 109
- "Ordered array of strong references to Structural Components" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x14, 0x00 }, {0}, false, "TimecodeComponent", // 110
- "Timecode Component" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x04, 0x01, 0x01, 0x02, 0x06, 0x00, 0x00 }, {0x15, 0x02}, false, "TimecodeComponent_RoundedTimecodeBase", // 111
- "Integer frames per second" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x07, 0x02, 0x01, 0x03, 0x01, 0x05, 0x00, 0x00 }, {0x15, 0x01}, false, "TimecodeComponent_StartTimecode", // 112
- "Starting timecode" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x04, 0x01, 0x01, 0x05, 0x00, 0x00, 0x00 }, {0x15, 0x03}, false, "TimecodeComponent_DropFrame", // 113
- "Drop frame flag" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x11, 0x00 }, {0}, false, "SourceClip", // 114
- "Source Clip" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x07, 0x02, 0x01, 0x03, 0x01, 0x04, 0x00, 0x00 }, {0x12, 0x01}, false, "SourceClip_StartPosition", // 115
- "Offset into Essence measured in edit units of the track containing this segment" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x06, 0x01, 0x01, 0x03, 0x01, 0x00, 0x00, 0x00 }, {0x11, 0x01}, false, "SourceClip_SourcePackageID", // 116
- "ID of referenced Package as a UMID" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x06, 0x01, 0x01, 0x03, 0x02, 0x00, 0x00, 0x00 }, {0x11, 0x02}, false, "SourceClip_SourceTrackID", // 117
- "Track ID of the referenced Track within the referenced Package" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x41, 0x00 }, {0}, false, "DMSegment", // 118
- "Descriptive Metadata Segment" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x07, 0x02, 0x01, 0x03, 0x03, 0x03, 0x00, 0x00 }, {0x06, 0x01}, false, "DMSegment_EventStartPosition", // 119
- "Offset into the descriptive metadata track in edit units" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x05, 0x30, 0x04, 0x04, 0x01, 0x00, 0x00, 0x00 }, {0x06, 0x02}, true, "DMSegment_EventComment", // 120
- "Description of the Descriptive Metadata Framework" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x01, 0x07, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00 }, {0x61, 0x02}, false, "DMSegment_TrackIDs", // 121
- "An unordered list of track ID values that identify the tracks in this Package to which this DM Framework refers (if omitted, refers to all essence tracks)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x06, 0x01, 0x01, 0x04, 0x02, 0x0c, 0x00, 0x00 }, {0x61, 0x01}, false, "DMSegment_DMFramework", // 122
- "Strong Reference to the Descriptive Metadata Framework" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x45, 0x00 }, {0}, false, "DMSourceClip", // 123
- "Descriptive Metadata SourceClip" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x01, 0x07, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00 }, {0x61, 0x03}, true, "DMSourceClip_DMSourceClipTrackIDs", // 124
- "An unordered list of track ID values that identify the tracks in this Package to which the referenced Descriptive Metadata refers (if omitted, refers to all essence tracks)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x36, 0x00 }, {0}, false, "MaterialPackage", // 125
- "Material Package set" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x37, 0x00 }, {0}, false, "SourcePackage", // 126
- "File Package set" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x06, 0x01, 0x01, 0x04, 0x02, 0x03, 0x00, 0x00 }, {0x47, 0x01}, false, "SourcePackage_Descriptor", // 127
- "Strong Reference to the Descriptor" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x06, 0x01, 0x01, 0x04, 0x06, 0x03, 0x00, 0x00 }, {0x2f, 0x01}, true, "GenericDescriptor_Locators", // 128
- "Ordered array of strong references to Locator sets" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x06, 0x01, 0x01, 0x04, 0x06, 0x10, 0x00, 0x00 }, {0}, true, "GenericDescriptor_SubDescriptors", // 129
- "Ordered array of strong references to sub descriptor sets" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x25, 0x00 }, {0}, false, "FileDescriptor", // 130
- "File Descriptor" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x06, 0x01, 0x01, 0x03, 0x05, 0x00, 0x00, 0x00 }, {0x30, 0x06}, true, "FileDescriptor_LinkedTrackID", // 131
- "Link to (i.e. value of) the Track ID of the Track in this Package to which the Descriptor applies" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x06, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0x30, 0x01}, false, "FileDescriptor_SampleRate", // 132
- "The field or frame rate of the Essence Container (not the essence sampling clock rate)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x06, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0x30, 0x02}, true, "FileDescriptor_ContainerDuration", // 133
- "Duration of Essence Container (measured in Edit Units)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x06, 0x01, 0x01, 0x04, 0x01, 0x02, 0x00, 0x00 }, {0x30, 0x04}, false, "FileDescriptor_EssenceContainer", // 134
- "The UL identifying the Essence Container described by this Descriptor" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x06, 0x01, 0x01, 0x04, 0x01, 0x03, 0x00, 0x00 }, {0x30, 0x05}, true, "FileDescriptor_Codec", // 135
- "UL to identify a codec compatible with this Essence Container" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x27, 0x00 }, {0}, false, "GenericPictureEssenceDescriptor", // 136
- "Defines the Picture Essence Descriptor set" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x05, 0x01, 0x13, 0x00, 0x00, 0x00, 0x00 }, {0x32, 0x15}, true, "GenericPictureEssenceDescriptor_SignalStandard", // 137
- "Underlying signal standard" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x01, 0x03, 0x01, 0x04, 0x00, 0x00, 0x00 }, {0x32, 0x0c}, false, "GenericPictureEssenceDescriptor_FrameLayout", // 138
- "Interlace or Progressive layout" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x01, 0x05, 0x02, 0x02, 0x00, 0x00, 0x00 }, {0x32, 0x03}, false, "GenericPictureEssenceDescriptor_StoredWidth", // 139
- "Horizontal Size of active picture" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x01, 0x05, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0x32, 0x02}, false, "GenericPictureEssenceDescriptor_StoredHeight", // 140
- "Vertical Field Size of active picture" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x03, 0x02, 0x08, 0x00, 0x00, 0x00 }, {0x32, 0x16}, true, "GenericPictureEssenceDescriptor_StoredF2Offset", // 141
- "Topness Adjustment for stored picture" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x01, 0x05, 0x01, 0x08, 0x00, 0x00, 0x00 }, {0x32, 0x05}, true, "GenericPictureEssenceDescriptor_SampledWidth", // 142
- "Sampled width supplied to codec" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x01, 0x05, 0x01, 0x07, 0x00, 0x00, 0x00 }, {0x32, 0x04}, true, "GenericPictureEssenceDescriptor_SampledHeight", // 143
- "Sampled height supplied to codec" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x01, 0x05, 0x01, 0x09, 0x00, 0x00, 0x00 }, {0x32, 0x06}, true, "GenericPictureEssenceDescriptor_SampledXOffset", // 144
- "Offset from sampled to stored width" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x01, 0x05, 0x01, 0x0a, 0x00, 0x00, 0x00 }, {0x32, 0x07}, true, "GenericPictureEssenceDescriptor_SampledYOffset", // 145
- "Offset from sampled to stored" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x01, 0x05, 0x01, 0x0b, 0x00, 0x00, 0x00 }, {0x32, 0x08}, true, "GenericPictureEssenceDescriptor_DisplayHeight", // 146
- "Displayed Height placed in Production Aperture" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x01, 0x05, 0x01, 0x0c, 0x00, 0x00, 0x00 }, {0x32, 0x09}, true, "GenericPictureEssenceDescriptor_DisplayWidth", // 147
- "Displayed Width placed in Production Aperture" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x01, 0x05, 0x01, 0x0d, 0x00, 0x00, 0x00 }, {0x32, 0x0a}, true, "GenericPictureEssenceDescriptor_DisplayXOffset", // 148
- "The horizontal offset from the (in pixels) of the picture as displayed" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x01, 0x05, 0x01, 0x0e, 0x00, 0x00, 0x00 }, {0x32, 0x0b}, true, "GenericPictureEssenceDescriptor_DisplayYOffset", // 149
- "The vertical offset (in pixels) of the picture as displayed" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x03, 0x02, 0x07, 0x00, 0x00, 0x00 }, {0x32, 0x17}, true, "GenericPictureEssenceDescriptor_DisplayF2Offset", // 150
- "Topness Adjustment for Displayed Picture" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0x32, 0x0e}, false, "GenericPictureEssenceDescriptor_AspectRatio", // 151
- "Specifies the horizontal to vertical aspect ratio of the whole image as it is to be presented to avoid geometric distortion (and hence including any black edges)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x03, 0x02, 0x09, 0x00, 0x00, 0x00 }, {0x32, 0x18}, true, "GenericPictureEssenceDescriptor_ActiveFormatDescriptor", // 152
- "Specifies the intended framing of the content within the displayed image" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x01, 0x03, 0x02, 0x05, 0x00, 0x00, 0x00 }, {0x32, 0x0d}, false, "GenericPictureEssenceDescriptor_VideoLineMap", // 153
- "First active line in each field" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x05, 0x20, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0x32, 0x0f}, true, "GenericPictureEssenceDescriptor_AlphaTransparency", // 154
- "Is Alpha Inverted" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x01, 0x02, 0x01, 0x01, 0x01, 0x02, 0x00 }, {0x32, 0x10}, true, "GenericPictureEssenceDescriptor_Gamma", // 155
- "Registered UL of known Gamma" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x18, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0x32, 0x11}, true, "GenericPictureEssenceDescriptor_ImageAlignmentOffset", // 156
- "Byte Boundary alignment required for Low Level Essence Storage" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x18, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0x32, 0x13}, true, "GenericPictureEssenceDescriptor_ImageStartOffset", // 157
- "Unused bytes before start of stored data" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x18, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00 }, {0x32, 0x14}, true, "GenericPictureEssenceDescriptor_ImageEndOffset", // 158
- "Unused bytes before start of stored data" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x01, 0x03, 0x01, 0x06, 0x00, 0x00, 0x00 }, {0x32, 0x12}, true, "GenericPictureEssenceDescriptor_FieldDominance", // 159
- "The number of the field which is considered temporally to come first" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0x32, 0x01}, false, "GenericPictureEssenceDescriptor_PictureEssenceCoding", // 160
- "UL identifying the Picture Compression Scheme" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x28, 0x00 }, {0}, false, "CDCIEssenceDescriptor", // 161
- "Defines the CDCI Picture Essence Descriptor set" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x01, 0x05, 0x03, 0x0a, 0x00, 0x00, 0x00 }, {0x33, 0x01}, false, "CDCIEssenceDescriptor_ComponentDepth", // 162
- "Number of active bits per sample (e.g. 8, 10, 16)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x01, 0x05, 0x01, 0x05, 0x00, 0x00, 0x00 }, {0x33, 0x02}, false, "CDCIEssenceDescriptor_HorizontalSubsampling", // 163
- "Specifies the H colour subsampling" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x01, 0x05, 0x01, 0x10, 0x00, 0x00, 0x00 }, {0x33, 0x08}, true, "CDCIEssenceDescriptor_VerticalSubsampling", // 164
- "Specifies the V colour subsampling" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x01, 0x05, 0x01, 0x06, 0x00, 0x00, 0x00 }, {0x33, 0x03}, true, "CDCIEssenceDescriptor_ColorSiting", // 165
- "Enumerated value describing the color siting" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x03, 0x01, 0x02, 0x01, 0x0a, 0x00, 0x00, 0x00 }, {0x33, 0x0b}, true, "CDCIEssenceDescriptor_ReversedByteOrder", // 166
- "a FALSE value denotes Chroma followed by Luma pexels according to ITU Rec. 601" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x18, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00 }, {0x33, 0x07}, true, "CDCIEssenceDescriptor_PaddingBits", // 167
- "Bits to round up each pixel to stored size" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x01, 0x05, 0x03, 0x07, 0x00, 0x00, 0x00 }, {0x33, 0x09}, true, "CDCIEssenceDescriptor_AlphaSampleDepth", // 168
- "Number of bits per alpha sample" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x01, 0x05, 0x03, 0x03, 0x00, 0x00, 0x00 }, {0x33, 0x04}, true, "CDCIEssenceDescriptor_BlackRefLevel", // 169
- "Black refernece level e.g. 16 or 64 (8 or 10-bits)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x01, 0x05, 0x03, 0x04, 0x00, 0x00, 0x00 }, {0x33, 0x05}, true, "CDCIEssenceDescriptor_WhiteReflevel", // 170
- "White reference level e.g. 235 or 943 (8 or 10 bits)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x01, 0x05, 0x03, 0x05, 0x00, 0x00, 0x00 }, {0x33, 0x06}, true, "CDCIEssenceDescriptor_ColorRange", // 171
- "Color range e.g. 225 or 897 (8 or 10 bits)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x29, 0x00 }, {0}, false, "RGBAEssenceDescriptor", // 172
- "Defines the RGBA Picture Essence Descriptor set" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x05, 0x03, 0x0b, 0x00, 0x00, 0x00 }, {0x34, 0x06}, true, "RGBAEssenceDescriptor_ComponentMaxRef", // 173
- "Maximum value for RGB components, e.g. 235 or 940 (8 or 10 bits)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x05, 0x03, 0x0c, 0x00, 0x00, 0x00 }, {0x34, 0x07}, true, "RGBAEssenceDescriptor_ComponentMinRef", // 174
- "Minimum value for RGB components, e.g. 16 or 64 (8 or 10 bits)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x05, 0x03, 0x0d, 0x00, 0x00, 0x00 }, {0x34, 0x08}, true, "RGBAEssenceDescriptor_AlphaMaxRef", // 175
- "Maximum value for alpha component, e.g. 235 or 940 (8 or 10 bits)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x05, 0x03, 0x0e, 0x00, 0x00, 0x00 }, {0x34, 0x09}, true, "RGBAEssenceDescriptor_AlphaMinRef", // 176
- "Minimum value for alpha component, e.g. 16 or 64 (8 or 10 bits)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x04, 0x04, 0x01, 0x00, 0x00, 0x00 }, {0x34, 0x05}, true, "RGBAEssenceDescriptor_ScanningDirection", // 177
- "Enumerated Scanning Direction" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x01, 0x05, 0x03, 0x06, 0x00, 0x00, 0x00 }, {0x34, 0x01}, false, "RGBAEssenceDescriptor_PixelLayout", // 178
- "Pixel Layout" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x01, 0x05, 0x03, 0x08, 0x00, 0x00, 0x00 }, {0x34, 0x03}, true, "RGBAEssenceDescriptor_Palette", // 179
- "Palette" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x01, 0x05, 0x03, 0x09, 0x00, 0x00, 0x00 }, {0x34, 0x04}, true, "RGBAEssenceDescriptor_PaletteLayout", // 180
- "Palette Layout" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x42, 0x00 }, {0}, false, "GenericSoundEssenceDescriptor", // 181
- "Defines the Sound Essence Descriptor set" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x02, 0x03, 0x01, 0x01, 0x01, 0x00, 0x00 }, {0x3d, 0x03}, false, "GenericSoundEssenceDescriptor_AudioSamplingRate", // 182
- "Sampling rate of the audio essence" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x04, 0x02, 0x03, 0x01, 0x04, 0x00, 0x00, 0x00 }, {0x3d, 0x02}, false, "GenericSoundEssenceDescriptor_Locked", // 183
- "Boolean indicating that the Number of samples per frame is locked or unlocked (non-0 = locked)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x02, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00 }, {0x3d, 0x04}, true, "GenericSoundEssenceDescriptor_AudioRefLevel", // 184
- "Audio reference level which gives the number of dBm for 0VU" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01,
- 0x04, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0x3d, 0x05}, true, "GenericSoundEssenceDescriptor_ElectroSpatialFormulation", // 185
- "E.g. mono, dual mono, stereo, A,B etc (enum)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x02, 0x01, 0x01, 0x04, 0x00, 0x00, 0x00 }, {0x3d, 0x07}, false, "GenericSoundEssenceDescriptor_ChannelCount", // 186
- "Number of Sound Channels" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x04, 0x02, 0x03, 0x03, 0x04, 0x00, 0x00, 0x00 }, {0x3d, 0x01}, false, "GenericSoundEssenceDescriptor_QuantizationBits", // 187
- "Number of quantization bits" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x02, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0x3d, 0x0c}, true, "GenericSoundEssenceDescriptor_DialNorm", // 188
- "Gain to be applied to normalise perceived loudness of the clip, defined by ATSC A/53 (1dB per step)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x02,
- 0x04, 0x02, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0x3d, 0x06}, false, "GenericSoundEssenceDescriptor_SoundEssenceCompression", // 189
- "UL identifying the Sound Compression Scheme" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x43, 0x00 }, {0}, false, "GenericDataEssenceDescriptor", // 190
- "Defines the Data Essence Descriptor set" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x03, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0x3e, 0x01}, false, "GenericDataEssenceDescriptor_DataEssenceCoding", // 191
- "Specifies the data essence coding type" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x44, 0x00 }, {0}, false, "MultipleDescriptor", // 192
- "Defines the Multiple Descriptor set" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x04,
- 0x06, 0x01, 0x01, 0x04, 0x06, 0x0b, 0x00, 0x00 }, {0x3f, 0x01}, false, "MultipleDescriptor_SubDescriptorUIDs", // 193
- "Unordered array of strong references to File Descriptor sets (1 per interleaved item within the Essence Container)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x51, 0x00 }, {0}, false, "MPEG2VideoDescriptor", // 194
- "Defines the MPEG2 Picture Essence Descriptor set" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x06, 0x02, 0x01, 0x02, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_SingleSequence", // 195
- "TRUE if the essence consists of a single MPEG sequence. False if there are a number of sequences. This flag implies that the sequence header information is not varying in the essence stream." },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x06, 0x02, 0x01, 0x03, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_ConstantBFrames", // 196
- "TRUE if the number of B frames is always constant" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x06, 0x02, 0x01, 0x04, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_CodedContentType", // 197
- "0= &quot;Unknown&quot;,1= &quot;Progressive&quot;, 2= &quot;Interlaced&quot;, 3= &quot;Mixed&quot;: an enumerated value which tells if the underlying content which was MPEG coded was of a known type" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x06, 0x02, 0x01, 0x05, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_LowDelay", // 198
- "TRUE if low delay mode was used in the sequence" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x06, 0x02, 0x01, 0x06, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_ClosedGOP", // 199
- "TRUE if closed_gop is set in all GOP Headers, per 13818-1 IBP descriptor" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x06, 0x02, 0x01, 0x07, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_IdenticalGOP", // 200
- "TRUE if every GOP in the sequence is constructed the same, per 13818-1 IBP descriptor" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x06, 0x02, 0x01, 0x08, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_MaxGOP", // 201
- "Specifies the maximum occurring spacing between I frames, per 13818-1 IBP descriptor. A value of 0 or the absence of this property implies no limit to the maximum GOP" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x06, 0x02, 0x01, 0x09, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_BPictureCount", // 202
- "Specifies the maximum number of B pictures between P or I frames, equivalent to 13818-2 annex D (M-1)" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x06, 0x02, 0x01, 0x0b, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_BitRate", // 203
- "Maximum bit rate of MPEG video elementary stream in bit/s as defined in ISO-13818-2 bit_rate property" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x01, 0x06, 0x02, 0x01, 0x0a, 0x00, 0x00 }, {0}, true, "MPEG2VideoDescriptor_ProfileAndLevel", // 204
- "Specifies the MPEG-2 video profile and level. The value is taken directly from the profile_and_level_indication in the MPEG-2 sequence header extension. For main profile @ main level, the value is 0x48. For 4:2:2 profile @ main level, the value is 0x85" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x48, 0x00 }, {0}, false, "WaveAudioDescriptor", // 205
- "Defines the Wave Audio Essence Descriptor Set" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x02, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0x3d, 0x0a}, false, "WaveAudioDescriptor_BlockAlign", // 206
- "Sample Block alignment" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x02, 0x03, 0x02, 0x02, 0x00, 0x00, 0x00 }, {0x3d, 0x0b}, true, "WaveAudioDescriptor_SequenceOffset", // 207
- "Zero-based ordinal frame number of first essence data within five-frame sequence" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x02, 0x03, 0x03, 0x05, 0x00, 0x00, 0x00 }, {0x3d, 0x09}, false, "WaveAudioDescriptor_AvgBps", // 208
- "Average Bytes per second" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x05,
- 0x04, 0x02, 0x03, 0x01, 0x0e, 0x00, 0x00, 0x00 }, {0x3d, 0x0e}, true, "WaveAudioDescriptor_PeakEnvelope", // 209
- "Peak Envelope from &lt;LEVL> Chunk" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x5a, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor", // 210
- "JPEG 2000 Picture Sub Descriptor" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
- 0x04, 0x01, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_Rsize", // 211
- "An enumerated value that defines the decoder capabilities" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
- 0x04, 0x01, 0x06, 0x03, 0x02, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_Xsize", // 212
- "Width of the reference grid" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
- 0x04, 0x01, 0x06, 0x03, 0x03, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_Ysize", // 213
- "Height of the reference grid" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
- 0x04, 0x01, 0x06, 0x03, 0x04, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_XOsize", // 214
- "Horizontal offset from the origin of the reference grid to the left side of the image area" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
- 0x04, 0x01, 0x06, 0x03, 0x05, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_YOsize", // 215
- "Vertical offset from the origin of the reference grid to the top side of the image area" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
- 0x04, 0x01, 0x06, 0x03, 0x06, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_XTsize", // 216
- "Width of one reference tile with respect to the reference grid" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
- 0x04, 0x01, 0x06, 0x03, 0x07, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_YTsize", // 217
- "Height of one reference tile with respect to the reference grid" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
- 0x04, 0x01, 0x06, 0x03, 0x08, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_XTOsize", // 218
- "Horizontal offset from the origin of the reference grid to the left side of the first tile" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
- 0x04, 0x01, 0x06, 0x03, 0x09, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_YTOsize", // 219
- "Vertical offset from the origin of the reference grid to the top side of the first tile" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
- 0x04, 0x01, 0x06, 0x03, 0x0a, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_Csize", // 220
- "The number of components in the picture" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
- 0x04, 0x01, 0x06, 0x03, 0x0b, 0x00, 0x00, 0x00 }, {0}, false, "JPEG2000PictureSubDescriptor_PictureComponentSizing", // 221
- "Array of picture components" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
- 0x04, 0x01, 0x06, 0x03, 0x0c, 0x00, 0x00, 0x00 }, {0}, true, "JPEG2000PictureSubDescriptor_CodingStyleDefault", // 222
- "Default coding style for all components. Use this value only if static for all pictures in the Essence Container" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x0a,
- 0x04, 0x01, 0x06, 0x03, 0x0d, 0x00, 0x00, 0x00 }, {0}, true, "JPEG2000PictureSubDescriptor_QuantizationDefault", // 223
- "Default quantization style for all components. Use this value only if static for all pictures in the Essence Container" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "DM_Framework", // 224
- "Superclass for all concrete DM Frameworks" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "DM_Set", // 225
- "Superclass for all concrete DM Frameworks" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x07,
- 0x0d, 0x01, 0x03, 0x01, 0x02, 0x0b, 0x01, 0x00 }, {0}, false, "EncryptedContainerLabel", // 226
- "DCP-Crypto Encrypted Essence Container, frame-wrapped" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x07,
- 0x0d, 0x01, 0x04, 0x01, 0x02, 0x01, 0x01, 0x00 }, {0}, false, "CryptographicFrameworkLabel", // 227
- "DCP-Crypto Framework" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x04, 0x01, 0x02, 0x01, 0x00, 0x00 }, {0}, false, "CryptographicFramework", // 228
- "DCP-Encryption Cryptographic Framework" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
- 0x06, 0x01, 0x01, 0x04, 0x02, 0x0d, 0x00, 0x00 }, {0}, false, "CryptographicFramework_ContextSR", // 229
- "Strong Reference to the associated Cryptographic Context" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x53, 0x01, 0x01,
- 0x0d, 0x01, 0x04, 0x01, 0x02, 0x02, 0x00, 0x00 }, {0}, false, "CryptographicContext", // 230
- "cryptographic information that applies to encrypted essence tracks as a whole" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
- 0x01, 0x01, 0x15, 0x11, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "CryptographicContext_ContextID", // 231
- "Persistent Unique identifier for the context" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
- 0x06, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00 }, {0}, false, "CryptographicContext_SourceEssenceContainer", // 232
- "Essence Container Label for the source essence, prior to encryption" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
- 0x02, 0x09, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "CryptographicContext_CipherAlgorithm", // 233
- "Algorithm used for Triplet encryption, if any" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
- 0x02, 0x09, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "CryptographicContext_MICAlgorithm", // 234
- "Algorithm used for Triplet integrity, if any" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
- 0x02, 0x09, 0x03, 0x01, 0x02, 0x00, 0x00, 0x00 }, {0}, false, "CryptographicContext_CryptographicKeyID", // 235
- "Unique identifier for the cryptographic key" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x02, 0x04, 0x01, 0x07,
- 0x0d, 0x01, 0x03, 0x01, 0x02, 0x7e, 0x01, 0x00 }, {0}, false, "EncryptedTriplet", // 236
- "encrypted data and cryptographic information specific to the Triplet" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
- 0x06, 0x01, 0x01, 0x06, 0x03, 0x00, 0x00, 0x00 }, {0}, false, "EncryptedTriplet_ContextIDLink", // 237
- "Persistent Unique identifier for the context.associated with this Triplet" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
- 0x06, 0x09, 0x02, 0x01, 0x03, 0x00, 0x00, 0x00 }, {0}, false, "EncryptedTriplet_PlaintextOffset", // 238
- "Offset within the source at which encryption starts" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
- 0x06, 0x01, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00 }, {0}, false, "EncryptedTriplet_SourceKey", // 239
- "Key of the source Triplet" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
- 0x04, 0x06, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00 }, {0}, false, "EncryptedTriplet_SourceLength", // 240
- "Length of the value of the source Triplet" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
- 0x02, 0x09, 0x03, 0x01, 0x03, 0x00, 0x00, 0x00 }, {0}, false, "EncryptedTriplet_EncryptedSourceValue", // 241
- "Encrypted Source value starting at Plaintext Offset" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
- 0x06, 0x01, 0x01, 0x06, 0x02, 0x00, 0x00, 0x00 }, {0}, true, "EncryptedTriplet_TrackFileID", // 242
- "The identifier of the AS-DCP Track File containing this Triplet" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
- 0x06, 0x10, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00 }, {0}, true, "EncryptedTriplet_SequenceNumber", // 243
- "Sequence number of this Triplet within the Track File" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09,
- 0x02, 0x09, 0x03, 0x02, 0x02, 0x00, 0x00, 0x00 }, {0}, true, "EncryptedTriplet_MIC", // 244
- "Keyed HMAC" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x07,
- 0x02, 0x09, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "CipherAlgorithmAES128CBC", // 245
- "Identifes the use of AES128 CBC mode cipher algorithm" },
-
- { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x07,
- 0x02, 0x09, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00 }, {0}, false, "HMACAlgorithmSHA1128", // 246
- "Identifes the use of SHA1 128 bit HMAC algorithm" },
-
- { 0, 0, 0 }
-};
+//
+namespace ASDCP {
+ enum MDD_t {
+ MDD_JPEG2000Essence,
+ MDD_MPEG2Essence,
+ MDD_WAVEssence,
+ MDD_EKLVPacket,
+ MDD_KLVFill,
+ MDD_PartitionMetadata_MajorVersion,
+ MDD_PartitionMetadata_MinorVersion,
+ MDD_PartitionMetadata_KAGSize,
+ MDD_PartitionMetadata_ThisPartition,
+ MDD_PartitionMetadata_PreviousPartition,
+ MDD_PartitionMetadata_FooterPartition,
+ MDD_PartitionMetadata_HeaderByteCount,
+ MDD_PartitionMetadata_IndexByteCount,
+ MDD_PartitionMetadata_IndexSID,
+ MDD_PartitionMetadata_BodyOffset,
+ MDD_PartitionMetadata_BodySID,
+ MDD_PartitionMetadata_OperationalPattern,
+ MDD_PartitionMetadata_EssenceContainers,
+ MDD_OpenHeader,
+ MDD_OpenCompleteHeader,
+ MDD_ClosedHeader,
+ MDD_ClosedCompleteHeader,
+ MDD_OpenBodyPartition,
+ MDD_OpenCompleteBodyPartition,
+ MDD_ClosedBodyPartition,
+ MDD_ClosedCompleteBodyPartition,
+ MDD_Footer,
+ MDD_CompleteFooter,
+ MDD_Primer,
+ MDD_Primer_LocalTagEntryBatch,
+ MDD_LocalTagEntryBatch_Primer_LocalTag,
+ MDD_LocalTagEntryBatch_Primer_UID,
+ MDD_InterchangeObject_InstanceUID,
+ MDD_GenerationInterchangeObject_GenerationUID,
+ MDD_DefaultObject,
+ MDD_IndexTableSegmentBase_IndexEditRate,
+ MDD_IndexTableSegmentBase_IndexStartPosition,
+ MDD_IndexTableSegmentBase_IndexDuration,
+ MDD_IndexTableSegmentBase_EditUnitByteCount,
+ MDD_IndexTableSegmentBase_IndexSID,
+ MDD_IndexTableSegmentBase_BodySID,
+ MDD_IndexTableSegmentBase_SliceCount,
+ MDD_IndexTableSegmentBase_PosTableCount,
+ MDD_V10IndexTableSegment,
+ MDD_V10IndexTableSegment_V10DeltaEntryArray,
+ MDD_V10DeltaEntryArray_V10IndexTableSegment_Reorder,
+ MDD_V10DeltaEntryArray_V10IndexTableSegment_Slice,
+ MDD_V10DeltaEntryArray_V10IndexTableSegment_ElementDelta,
+ MDD_V10IndexTableSegment_V10IndexEntryArray,
+ MDD_V10IndexEntryArray_V10IndexTableSegment_TemporalOffset,
+ MDD_V10IndexEntryArray_V10IndexTableSegment_AnchorOffset,
+ MDD_V10IndexEntryArray_V10IndexTableSegment_Flags,
+ MDD_V10IndexEntryArray_V10IndexTableSegment_StreamOffset,
+ MDD_V10IndexEntryArray_V10IndexTableSegment_SliceOffsetArray,
+ MDD_IndexTableSegment,
+ MDD_IndexTableSegment_DeltaEntryArray,
+ MDD_DeltaEntryArray_IndexTableSegment_PosTableIndex,
+ MDD_DeltaEntryArray_IndexTableSegment_Slice,
+ MDD_DeltaEntryArray_IndexTableSegment_ElementDelta,
+ MDD_IndexTableSegment_IndexEntryArray,
+ MDD_IndexEntryArray_IndexTableSegment_TemporalOffset,
+ MDD_IndexEntryArray_IndexTableSegment_AnchorOffset,
+ MDD_IndexEntryArray_IndexTableSegment_Flags,
+ MDD_IndexEntryArray_IndexTableSegment_StreamOffset,
+ MDD_IndexEntryArray_IndexTableSegment_SliceOffsetArray,
+ MDD_IndexEntryArray_IndexTableSegment_PosTableArray,
+ MDD_RandomIndexMetadata,
+ MDD_PartitionArray_RandomIndexMetadata_BodySID,
+ MDD_PartitionArray_RandomIndexMetadata_ByteOffset,
+ MDD_RandomIndexMetadata_Length,
+ MDD_RandomIndexMetadataV10,
+ MDD_Preface,
+ MDD_Preface_LastModifiedDate,
+ MDD_Preface_Version,
+ MDD_Preface_ObjectModelVersion,
+ MDD_Preface_PrimaryPackage,
+ MDD_Preface_Identifications,
+ MDD_Preface_ContentStorage,
+ MDD_Preface_OperationalPattern,
+ MDD_Preface_EssenceContainers,
+ MDD_Preface_DMSchemes,
+ MDD_Identification,
+ MDD_Identification_ThisGenerationUID,
+ MDD_Identification_CompanyName,
+ MDD_Identification_ProductName,
+ MDD_Identification_ProductVersion,
+ MDD_Identification_VersionString,
+ MDD_Identification_ProductUID,
+ MDD_Identification_ModificationDate,
+ MDD_Identification_ToolkitVersion,
+ MDD_Identification_Platform,
+ MDD_ContentStorage,
+ MDD_ContentStorage_Packages,
+ MDD_ContentStorage_EssenceContainerData,
+ MDD_ContentStorageKludge_V10Packages,
+ MDD_EssenceContainerData,
+ MDD_EssenceContainerData_LinkedPackageUID,
+ MDD_EssenceContainerData_IndexSID,
+ MDD_EssenceContainerData_BodySID,
+ MDD_GenericPackage_PackageUID,
+ MDD_GenericPackage_Name,
+ MDD_GenericPackage_PackageCreationDate,
+ MDD_GenericPackage_PackageModifiedDate,
+ MDD_GenericPackage_Tracks,
+ MDD_NetworkLocator,
+ MDD_NetworkLocator_URLString,
+ MDD_TextLocator,
+ MDD_TextLocator_LocatorName,
+ MDD_GenericTrack_TrackID,
+ MDD_GenericTrack_TrackNumber,
+ MDD_GenericTrack_TrackName,
+ MDD_GenericTrack_Sequence,
+ MDD_StaticTrack,
+ MDD_Track,
+ MDD_Track_EditRate,
+ MDD_Track_Origin,
+ MDD_EventTrack,
+ MDD_EventTrack_EventEditRate,
+ MDD_EventTrack_EventOrigin,
+ MDD_StructuralComponent_DataDefinition,
+ MDD_StructuralComponent_Duration,
+ MDD_Sequence,
+ MDD_Sequence_StructuralComponents,
+ MDD_TimecodeComponent,
+ MDD_TimecodeComponent_RoundedTimecodeBase,
+ MDD_TimecodeComponent_StartTimecode,
+ MDD_TimecodeComponent_DropFrame,
+ MDD_SourceClip,
+ MDD_SourceClip_StartPosition,
+ MDD_SourceClip_SourcePackageID,
+ MDD_SourceClip_SourceTrackID,
+ MDD_DMSegment,
+ MDD_DMSegment_EventStartPosition,
+ MDD_DMSegment_EventComment,
+ MDD_DMSegment_TrackIDs,
+ MDD_DMSegment_DMFramework,
+ MDD_DMSourceClip,
+ MDD_DMSourceClip_DMSourceClipTrackIDs,
+ MDD_MaterialPackage,
+ MDD_SourcePackage,
+ MDD_SourcePackage_Descriptor,
+ MDD_GenericDescriptor_Locators,
+ MDD_GenericDescriptor_SubDescriptors,
+ MDD_FileDescriptor,
+ MDD_FileDescriptor_LinkedTrackID,
+ MDD_FileDescriptor_SampleRate,
+ MDD_FileDescriptor_ContainerDuration,
+ MDD_FileDescriptor_EssenceContainer,
+ MDD_FileDescriptor_Codec,
+ MDD_GenericPictureEssenceDescriptor,
+ MDD_GenericPictureEssenceDescriptor_SignalStandard,
+ MDD_GenericPictureEssenceDescriptor_FrameLayout,
+ MDD_GenericPictureEssenceDescriptor_StoredWidth,
+ MDD_GenericPictureEssenceDescriptor_StoredHeight,
+ MDD_GenericPictureEssenceDescriptor_StoredF2Offset,
+ MDD_GenericPictureEssenceDescriptor_SampledWidth,
+ MDD_GenericPictureEssenceDescriptor_SampledHeight,
+ MDD_GenericPictureEssenceDescriptor_SampledXOffset,
+ MDD_GenericPictureEssenceDescriptor_SampledYOffset,
+ MDD_GenericPictureEssenceDescriptor_DisplayHeight,
+ MDD_GenericPictureEssenceDescriptor_DisplayWidth,
+ MDD_GenericPictureEssenceDescriptor_DisplayXOffset,
+ MDD_GenericPictureEssenceDescriptor_DisplayYOffset,
+ MDD_GenericPictureEssenceDescriptor_DisplayF2Offset,
+ MDD_GenericPictureEssenceDescriptor_AspectRatio,
+ MDD_GenericPictureEssenceDescriptor_ActiveFormatDescriptor,
+ MDD_GenericPictureEssenceDescriptor_VideoLineMap,
+ MDD_GenericPictureEssenceDescriptor_AlphaTransparency,
+ MDD_GenericPictureEssenceDescriptor_Gamma,
+ MDD_GenericPictureEssenceDescriptor_ImageAlignmentOffset,
+ MDD_GenericPictureEssenceDescriptor_ImageStartOffset,
+ MDD_GenericPictureEssenceDescriptor_ImageEndOffset,
+ MDD_GenericPictureEssenceDescriptor_FieldDominance,
+ MDD_GenericPictureEssenceDescriptor_PictureEssenceCoding,
+ MDD_CDCIEssenceDescriptor,
+ MDD_CDCIEssenceDescriptor_ComponentDepth,
+ MDD_CDCIEssenceDescriptor_HorizontalSubsampling,
+ MDD_CDCIEssenceDescriptor_VerticalSubsampling,
+ MDD_CDCIEssenceDescriptor_ColorSiting,
+ MDD_CDCIEssenceDescriptor_ReversedByteOrder,
+ MDD_CDCIEssenceDescriptor_PaddingBits,
+ MDD_CDCIEssenceDescriptor_AlphaSampleDepth,
+ MDD_CDCIEssenceDescriptor_BlackRefLevel,
+ MDD_CDCIEssenceDescriptor_WhiteReflevel,
+ MDD_CDCIEssenceDescriptor_ColorRange,
+ MDD_RGBAEssenceDescriptor,
+ MDD_RGBAEssenceDescriptor_ComponentMaxRef,
+ MDD_RGBAEssenceDescriptor_ComponentMinRef,
+ MDD_RGBAEssenceDescriptor_AlphaMaxRef,
+ MDD_RGBAEssenceDescriptor_AlphaMinRef,
+ MDD_RGBAEssenceDescriptor_ScanningDirection,
+ MDD_RGBAEssenceDescriptor_PixelLayout,
+ MDD_RGBAEssenceDescriptor_Palette,
+ MDD_RGBAEssenceDescriptor_PaletteLayout,
+ MDD_GenericSoundEssenceDescriptor,
+ MDD_GenericSoundEssenceDescriptor_AudioSamplingRate,
+ MDD_GenericSoundEssenceDescriptor_Locked,
+ MDD_GenericSoundEssenceDescriptor_AudioRefLevel,
+ MDD_GenericSoundEssenceDescriptor_ElectroSpatialFormulation,
+ MDD_GenericSoundEssenceDescriptor_ChannelCount,
+ MDD_GenericSoundEssenceDescriptor_QuantizationBits,
+ MDD_GenericSoundEssenceDescriptor_DialNorm,
+ MDD_GenericSoundEssenceDescriptor_SoundEssenceCompression,
+ MDD_GenericDataEssenceDescriptor,
+ MDD_GenericDataEssenceDescriptor_DataEssenceCoding,
+ MDD_MultipleDescriptor,
+ MDD_MultipleDescriptor_SubDescriptorUIDs,
+ MDD_MPEG2VideoDescriptor,
+ MDD_MPEG2VideoDescriptor_SingleSequence,
+ MDD_MPEG2VideoDescriptor_ConstantBFrames,
+ MDD_MPEG2VideoDescriptor_CodedContentType,
+ MDD_MPEG2VideoDescriptor_LowDelay,
+ MDD_MPEG2VideoDescriptor_ClosedGOP,
+ MDD_MPEG2VideoDescriptor_IdenticalGOP,
+ MDD_MPEG2VideoDescriptor_MaxGOP,
+ MDD_MPEG2VideoDescriptor_BPictureCount,
+ MDD_MPEG2VideoDescriptor_BitRate,
+ MDD_MPEG2VideoDescriptor_ProfileAndLevel,
+ MDD_WaveAudioDescriptor,
+ MDD_WaveAudioDescriptor_BlockAlign,
+ MDD_WaveAudioDescriptor_SequenceOffset,
+ MDD_WaveAudioDescriptor_AvgBps,
+ MDD_WaveAudioDescriptor_PeakEnvelope,
+ MDD_JPEG2000PictureSubDescriptor,
+ MDD_JPEG2000PictureSubDescriptor_Rsize,
+ MDD_JPEG2000PictureSubDescriptor_Xsize,
+ MDD_JPEG2000PictureSubDescriptor_Ysize,
+ MDD_JPEG2000PictureSubDescriptor_XOsize,
+ MDD_JPEG2000PictureSubDescriptor_YOsize,
+ MDD_JPEG2000PictureSubDescriptor_XTsize,
+ MDD_JPEG2000PictureSubDescriptor_YTsize,
+ MDD_JPEG2000PictureSubDescriptor_XTOsize,
+ MDD_JPEG2000PictureSubDescriptor_YTOsize,
+ MDD_JPEG2000PictureSubDescriptor_Csize,
+ MDD_JPEG2000PictureSubDescriptor_PictureComponentSizing,
+ MDD_JPEG2000PictureSubDescriptor_CodingStyleDefault,
+ MDD_JPEG2000PictureSubDescriptor_QuantizationDefault,
+ MDD_DM_Framework,
+ MDD_DM_Set,
+ MDD_EncryptedContainerLabel,
+ MDD_CryptographicFrameworkLabel,
+ MDD_CryptographicFramework,
+ MDD_CryptographicFramework_ContextSR,
+ MDD_CryptographicContext,
+ MDD_CryptographicContext_ContextID,
+ MDD_CryptographicContext_SourceEssenceContainer,
+ MDD_CryptographicContext_CipherAlgorithm,
+ MDD_CryptographicContext_MICAlgorithm,
+ MDD_CryptographicContext_CryptographicKeyID,
+ MDD_EncryptedTriplet,
+ MDD_EncryptedTriplet_ContextIDLink,
+ MDD_EncryptedTriplet_PlaintextOffset,
+ MDD_EncryptedTriplet_SourceKey,
+ MDD_EncryptedTriplet_SourceLength,
+ MDD_EncryptedTriplet_EncryptedSourceValue,
+ MDD_EncryptedTriplet_TrackFileID,
+ MDD_EncryptedTriplet_SequenceNumber,
+ MDD_EncryptedTriplet_MIC,
+ MDD_CipherAlgorithmAES128CBC,
+ MDD_HMACAlgorithmSHA1128,
+ }; // enum MDD_t
+} // namespaceASDCP
-const ui32_t MDDindex_KLVFill = 4;
-const ui32_t MDDindex_PartitionMetadata_MajorVersion = 5;
-const ui32_t MDDindex_PartitionMetadata_MinorVersion = 6;
-const ui32_t MDDindex_PartitionMetadata_KAGSize = 7;
-const ui32_t MDDindex_PartitionMetadata_ThisPartition = 8;
-const ui32_t MDDindex_PartitionMetadata_PreviousPartition = 9;
-const ui32_t MDDindex_PartitionMetadata_FooterPartition = 10;
-const ui32_t MDDindex_PartitionMetadata_HeaderByteCount = 11;
-const ui32_t MDDindex_PartitionMetadata_IndexByteCount = 12;
-const ui32_t MDDindex_PartitionMetadata_IndexSID = 13;
-const ui32_t MDDindex_PartitionMetadata_BodyOffset = 14;
-const ui32_t MDDindex_PartitionMetadata_BodySID = 15;
-const ui32_t MDDindex_PartitionMetadata_OperationalPattern = 16;
-const ui32_t MDDindex_PartitionMetadata_EssenceContainers = 17;
-const ui32_t MDDindex_OpenHeader = 18;
-const ui32_t MDDindex_OpenCompleteHeader = 19;
-const ui32_t MDDindex_ClosedHeader = 20;
-const ui32_t MDDindex_ClosedCompleteHeader = 21;
-const ui32_t MDDindex_OpenBodyPartition = 22;
-const ui32_t MDDindex_OpenCompleteBodyPartition = 23;
-const ui32_t MDDindex_ClosedBodyPartition = 24;
-const ui32_t MDDindex_ClosedCompleteBodyPartition = 25;
-const ui32_t MDDindex_Footer = 26;
-const ui32_t MDDindex_CompleteFooter = 27;
-const ui32_t MDDindex_Primer = 28;
-const ui32_t MDDindex_Primer_LocalTagEntryBatch = 29;
-const ui32_t MDDindex_LocalTagEntryBatch_Primer_LocalTag = 30;
-const ui32_t MDDindex_LocalTagEntryBatch_Primer_UID = 31;
-const ui32_t MDDindex_InterchangeObject_InstanceUID = 32;
-const ui32_t MDDindex_GenerationInterchangeObject_GenerationUID = 33;
-const ui32_t MDDindex_DefaultObject = 34;
-const ui32_t MDDindex_IndexTableSegmentBase_IndexEditRate = 35;
-const ui32_t MDDindex_IndexTableSegmentBase_IndexStartPosition = 36;
-const ui32_t MDDindex_IndexTableSegmentBase_IndexDuration = 37;
-const ui32_t MDDindex_IndexTableSegmentBase_EditUnitByteCount = 38;
-const ui32_t MDDindex_IndexTableSegmentBase_IndexSID = 39;
-const ui32_t MDDindex_IndexTableSegmentBase_BodySID = 40;
-const ui32_t MDDindex_IndexTableSegmentBase_SliceCount = 41;
-const ui32_t MDDindex_IndexTableSegmentBase_PosTableCount = 42;
-const ui32_t MDDindex_IndexTableSegment = 43;
-const ui32_t MDDindex_IndexTableSegment_DeltaEntryArray = 44;
-const ui32_t MDDindex_DeltaEntryArray_IndexTableSegment_PosTableIndex = 45;
-const ui32_t MDDindex_DeltaEntryArray_IndexTableSegment_Slice = 46;
-const ui32_t MDDindex_DeltaEntryArray_IndexTableSegment_ElementDelta = 47;
-const ui32_t MDDindex_IndexTableSegment_IndexEntryArray = 48;
-const ui32_t MDDindex_IndexEntryArray_IndexTableSegment_TemporalOffset = 49;
-const ui32_t MDDindex_IndexEntryArray_IndexTableSegment_AnchorOffset = 50;
-const ui32_t MDDindex_IndexEntryArray_IndexTableSegment_Flags = 51;
-const ui32_t MDDindex_IndexEntryArray_IndexTableSegment_StreamOffset = 52;
-const ui32_t MDDindex_IndexEntryArray_IndexTableSegment_SliceOffsetArray = 53;
-const ui32_t MDDindex_IndexEntryArray_IndexTableSegment_PosTableArray = 54;
-const ui32_t MDDindex_RandomIndexMetadata = 55;
-const ui32_t MDDindex_PartitionArray_RandomIndexMetadata_BodySID = 56;
-const ui32_t MDDindex_PartitionArray_RandomIndexMetadata_ByteOffset = 57;
-const ui32_t MDDindex_RandomIndexMetadata_Length = 58;
-const ui32_t MDDindex_Preface = 59;
-const ui32_t MDDindex_Preface_LastModifiedDate = 60;
-const ui32_t MDDindex_Preface_Version = 61;
-const ui32_t MDDindex_Preface_ObjectModelVersion = 62;
-const ui32_t MDDindex_Preface_PrimaryPackage = 63;
-const ui32_t MDDindex_Preface_Identifications = 64;
-const ui32_t MDDindex_Preface_ContentStorage = 65;
-const ui32_t MDDindex_Preface_OperationalPattern = 66;
-const ui32_t MDDindex_Preface_EssenceContainers = 67;
-const ui32_t MDDindex_Preface_DMSchemes = 68;
-const ui32_t MDDindex_Identification = 69;
-const ui32_t MDDindex_Identification_ThisGenerationUID = 70;
-const ui32_t MDDindex_Identification_CompanyName = 71;
-const ui32_t MDDindex_Identification_ProductName = 72;
-const ui32_t MDDindex_Identification_ProductVersion = 73;
-const ui32_t MDDindex_Identification_VersionString = 74;
-const ui32_t MDDindex_Identification_ProductUID = 75;
-const ui32_t MDDindex_Identification_ModificationDate = 76;
-const ui32_t MDDindex_Identification_ToolkitVersion = 77;
-const ui32_t MDDindex_Identification_Platform = 78;
-const ui32_t MDDindex_ContentStorage = 79;
-const ui32_t MDDindex_ContentStorage_Packages = 80;
-const ui32_t MDDindex_ContentStorage_EssenceContainerData = 81;
-const ui32_t MDDindex_EssenceContainerData = 82;
-const ui32_t MDDindex_EssenceContainerData_LinkedPackageUID = 83;
-const ui32_t MDDindex_EssenceContainerData_IndexSID = 84;
-const ui32_t MDDindex_EssenceContainerData_BodySID = 85;
-const ui32_t MDDindex_GenericPackage_PackageUID = 86;
-const ui32_t MDDindex_GenericPackage_Name = 87;
-const ui32_t MDDindex_GenericPackage_PackageCreationDate = 88;
-const ui32_t MDDindex_GenericPackage_PackageModifiedDate = 89;
-const ui32_t MDDindex_GenericPackage_Tracks = 90;
-const ui32_t MDDindex_NetworkLocator = 91;
-const ui32_t MDDindex_NetworkLocator_URLString = 92;
-const ui32_t MDDindex_TextLocator = 93;
-const ui32_t MDDindex_TextLocator_LocatorName = 94;
-const ui32_t MDDindex_GenericTrack_TrackID = 95;
-const ui32_t MDDindex_GenericTrack_TrackNumber = 96;
-const ui32_t MDDindex_GenericTrack_TrackName = 97;
-const ui32_t MDDindex_GenericTrack_Sequence = 98;
-const ui32_t MDDindex_StaticTrack = 99;
-const ui32_t MDDindex_Track = 100;
-const ui32_t MDDindex_Track_EditRate = 101;
-const ui32_t MDDindex_Track_Origin = 102;
-const ui32_t MDDindex_EventTrack = 103;
-const ui32_t MDDindex_EventTrack_EventEditRate = 104;
-const ui32_t MDDindex_EventTrack_EventOrigin = 105;
-const ui32_t MDDindex_StructuralComponent_DataDefinition = 106;
-const ui32_t MDDindex_StructuralComponent_Duration = 107;
-const ui32_t MDDindex_Sequence = 108;
-const ui32_t MDDindex_Sequence_StructuralComponents = 109;
-const ui32_t MDDindex_TimecodeComponent = 110;
-const ui32_t MDDindex_TimecodeComponent_RoundedTimecodeBase = 111;
-const ui32_t MDDindex_TimecodeComponent_StartTimecode = 112;
-const ui32_t MDDindex_TimecodeComponent_DropFrame = 113;
-const ui32_t MDDindex_SourceClip = 114;
-const ui32_t MDDindex_SourceClip_StartPosition = 115;
-const ui32_t MDDindex_SourceClip_SourcePackageID = 116;
-const ui32_t MDDindex_SourceClip_SourceTrackID = 117;
-const ui32_t MDDindex_DMSegment = 118;
-const ui32_t MDDindex_DMSegment_EventStartPosition = 119;
-const ui32_t MDDindex_DMSegment_EventComment = 120;
-const ui32_t MDDindex_DMSegment_TrackIDs = 121;
-const ui32_t MDDindex_DMSegment_DMFramework = 122;
-const ui32_t MDDindex_DMSourceClip = 123;
-const ui32_t MDDindex_DMSourceClip_DMSourceClipTrackIDs = 124;
-const ui32_t MDDindex_MaterialPackage = 125;
-const ui32_t MDDindex_SourcePackage = 126;
-const ui32_t MDDindex_SourcePackage_Descriptor = 127;
-const ui32_t MDDindex_GenericDescriptor_Locators = 128;
-const ui32_t MDDindex_GenericDescriptor_SubDescriptors = 129;
-const ui32_t MDDindex_FileDescriptor = 130;
-const ui32_t MDDindex_FileDescriptor_LinkedTrackID = 131;
-const ui32_t MDDindex_FileDescriptor_SampleRate = 132;
-const ui32_t MDDindex_FileDescriptor_ContainerDuration = 133;
-const ui32_t MDDindex_FileDescriptor_EssenceContainer = 134;
-const ui32_t MDDindex_FileDescriptor_Codec = 135;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor = 136;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_SignalStandard = 137;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_FrameLayout = 138;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_StoredWidth = 139;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_StoredHeight = 140;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_StoredF2Offset = 141;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_SampledWidth = 142;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_SampledHeight = 143;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_SampledXOffset = 144;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_SampledYOffset = 145;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_DisplayHeight = 146;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_DisplayWidth = 147;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_DisplayXOffset = 148;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_DisplayYOffset = 149;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_DisplayF2Offset = 150;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_AspectRatio = 151;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_ActiveFormatDescriptor = 152;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_VideoLineMap = 153;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_AlphaTransparency = 154;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_Gamma = 155;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_ImageAlignmentOffset = 156;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_ImageStartOffset = 157;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_ImageEndOffset = 158;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_FieldDominance = 159;
-const ui32_t MDDindex_GenericPictureEssenceDescriptor_PictureEssenceCoding = 160;
-const ui32_t MDDindex_CDCIEssenceDescriptor = 161;
-const ui32_t MDDindex_CDCIEssenceDescriptor_ComponentDepth = 162;
-const ui32_t MDDindex_CDCIEssenceDescriptor_HorizontalSubsampling = 163;
-const ui32_t MDDindex_CDCIEssenceDescriptor_VerticalSubsampling = 164;
-const ui32_t MDDindex_CDCIEssenceDescriptor_ColorSiting = 165;
-const ui32_t MDDindex_CDCIEssenceDescriptor_ReversedByteOrder = 166;
-const ui32_t MDDindex_CDCIEssenceDescriptor_PaddingBits = 167;
-const ui32_t MDDindex_CDCIEssenceDescriptor_AlphaSampleDepth = 168;
-const ui32_t MDDindex_CDCIEssenceDescriptor_BlackRefLevel = 169;
-const ui32_t MDDindex_CDCIEssenceDescriptor_WhiteReflevel = 170;
-const ui32_t MDDindex_CDCIEssenceDescriptor_ColorRange = 171;
-const ui32_t MDDindex_RGBAEssenceDescriptor = 172;
-const ui32_t MDDindex_RGBAEssenceDescriptor_ComponentMaxRef = 173;
-const ui32_t MDDindex_RGBAEssenceDescriptor_ComponentMinRef = 174;
-const ui32_t MDDindex_RGBAEssenceDescriptor_AlphaMaxRef = 175;
-const ui32_t MDDindex_RGBAEssenceDescriptor_AlphaMinRef = 176;
-const ui32_t MDDindex_RGBAEssenceDescriptor_ScanningDirection = 177;
-const ui32_t MDDindex_RGBAEssenceDescriptor_PixelLayout = 178;
-const ui32_t MDDindex_RGBAEssenceDescriptor_Palette = 179;
-const ui32_t MDDindex_RGBAEssenceDescriptor_PaletteLayout = 180;
-const ui32_t MDDindex_GenericSoundEssenceDescriptor = 181;
-const ui32_t MDDindex_GenericSoundEssenceDescriptor_AudioSamplingRate = 182;
-const ui32_t MDDindex_GenericSoundEssenceDescriptor_Locked = 183;
-const ui32_t MDDindex_GenericSoundEssenceDescriptor_AudioRefLevel = 184;
-const ui32_t MDDindex_GenericSoundEssenceDescriptor_ElectroSpatialFormulation = 185;
-const ui32_t MDDindex_GenericSoundEssenceDescriptor_ChannelCount = 186;
-const ui32_t MDDindex_GenericSoundEssenceDescriptor_QuantizationBits = 187;
-const ui32_t MDDindex_GenericSoundEssenceDescriptor_DialNorm = 188;
-const ui32_t MDDindex_GenericSoundEssenceDescriptor_SoundEssenceCompression = 189;
-const ui32_t MDDindex_GenericDataEssenceDescriptor = 190;
-const ui32_t MDDindex_GenericDataEssenceDescriptor_DataEssenceCoding = 191;
-const ui32_t MDDindex_MultipleDescriptor = 192;
-const ui32_t MDDindex_MultipleDescriptor_SubDescriptorUIDs = 193;
-const ui32_t MDDindex_MPEG2VideoDescriptor = 194;
-const ui32_t MDDindex_MPEG2VideoDescriptor_SingleSequence = 195;
-const ui32_t MDDindex_MPEG2VideoDescriptor_ConstantBFrames = 196;
-const ui32_t MDDindex_MPEG2VideoDescriptor_CodedContentType = 197;
-const ui32_t MDDindex_MPEG2VideoDescriptor_LowDelay = 198;
-const ui32_t MDDindex_MPEG2VideoDescriptor_ClosedGOP = 199;
-const ui32_t MDDindex_MPEG2VideoDescriptor_IdenticalGOP = 200;
-const ui32_t MDDindex_MPEG2VideoDescriptor_MaxGOP = 201;
-const ui32_t MDDindex_MPEG2VideoDescriptor_BPictureCount = 202;
-const ui32_t MDDindex_MPEG2VideoDescriptor_BitRate = 203;
-const ui32_t MDDindex_MPEG2VideoDescriptor_ProfileAndLevel = 204;
-const ui32_t MDDindex_WaveAudioDescriptor = 205;
-const ui32_t MDDindex_WaveAudioDescriptor_BlockAlign = 206;
-const ui32_t MDDindex_WaveAudioDescriptor_SequenceOffset = 207;
-const ui32_t MDDindex_WaveAudioDescriptor_AvgBps = 208;
-const ui32_t MDDindex_WaveAudioDescriptor_PeakEnvelope = 209;
-const ui32_t MDDindex_JPEG2000PictureSubDescriptor = 210;
-const ui32_t MDDindex_JPEG2000PictureSubDescriptor_Rsize = 211;
-const ui32_t MDDindex_JPEG2000PictureSubDescriptor_Xsize = 212;
-const ui32_t MDDindex_JPEG2000PictureSubDescriptor_Ysize = 213;
-const ui32_t MDDindex_JPEG2000PictureSubDescriptor_XOsize = 214;
-const ui32_t MDDindex_JPEG2000PictureSubDescriptor_YOsize = 215;
-const ui32_t MDDindex_JPEG2000PictureSubDescriptor_XTsize = 216;
-const ui32_t MDDindex_JPEG2000PictureSubDescriptor_YTsize = 217;
-const ui32_t MDDindex_JPEG2000PictureSubDescriptor_XTOsize = 218;
-const ui32_t MDDindex_JPEG2000PictureSubDescriptor_YTOsize = 219;
-const ui32_t MDDindex_JPEG2000PictureSubDescriptor_Csize = 220;
-const ui32_t MDDindex_JPEG2000PictureSubDescriptor_PictureComponentSizing = 221;
-const ui32_t MDDindex_JPEG2000PictureSubDescriptor_CodingStyleDefault = 222;
-const ui32_t MDDindex_JPEG2000PictureSubDescriptor_QuantizationDefault = 223;
-const ui32_t MDDindex_DM_Framework = 224;
-const ui32_t MDDindex_DM_Set = 225;
-const ui32_t MDDindex_EncryptedContainerLabel = 226;
-const ui32_t MDDindex_CryptographicFrameworkLabel = 227;
-const ui32_t MDDindex_CryptographicFramework = 228;
-const ui32_t MDDindex_CryptographicFramework_ContextSR = 229;
-const ui32_t MDDindex_CryptographicContext = 230;
-const ui32_t MDDindex_CryptographicContext_ContextID = 231;
-const ui32_t MDDindex_CryptographicContext_SourceEssenceContainer = 232;
-const ui32_t MDDindex_CryptographicContext_CipherAlgorithm = 233;
-const ui32_t MDDindex_CryptographicContext_MICAlgorithm = 234;
-const ui32_t MDDindex_CryptographicContext_CryptographicKeyID = 235;
-const ui32_t MDDindex_EncryptedTriplet = 236;
-const ui32_t MDDindex_EncryptedTriplet_ContextIDLink = 237;
-const ui32_t MDDindex_EncryptedTriplet_PlaintextOffset = 238;
-const ui32_t MDDindex_EncryptedTriplet_SourceKey = 239;
-const ui32_t MDDindex_EncryptedTriplet_SourceLength = 240;
-const ui32_t MDDindex_EncryptedTriplet_EncryptedSourceValue = 241;
-const ui32_t MDDindex_EncryptedTriplet_TrackFileID = 242;
-const ui32_t MDDindex_EncryptedTriplet_SequenceNumber = 243;
-const ui32_t MDDindex_EncryptedTriplet_MIC = 244;
-const ui32_t MDDindex_CipherAlgorithmAES128CBC = 245;
-const ui32_t MDDindex_HMACAlgorithmSHA1128 = 246;
#endif // _MDD_H_
diff --git a/src/MPEG2_Parser.cpp b/src/MPEG2_Parser.cpp
index 9e72b0f..f6e0089 100755
--- a/src/MPEG2_Parser.cpp
+++ b/src/MPEG2_Parser.cpp
@@ -501,12 +501,8 @@ ASDCP::MPEG2::Parser::h__Parser::ReadFrame(FrameBuffer& FB)
FB.FrameType(m_ParserDelegate.m_FrameType);
FB.PlaintextOffset(m_ParserDelegate.m_PlaintextOffset);
FB.FrameNumber(m_FrameNumber++);
-
- if ( m_ParserDelegate.m_HasGOP )
- {
- FB.GOPStart(m_ParserDelegate.m_HasGOP);
- FB.ClosedGOP(m_ParserDelegate.m_ClosedGOP);
- }
+ FB.GOPStart(m_ParserDelegate.m_HasGOP);
+ FB.ClosedGOP(m_ParserDelegate.m_ClosedGOP);
}
return result;
diff --git a/src/MXF.cpp b/src/MXF.cpp
index ae45e07..2c41afc 100755
--- a/src/MXF.cpp
+++ b/src/MXF.cpp
@@ -29,16 +29,14 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\brief MXF objects
*/
-#define ASDCP_DECLARE_MDD
-#include "MDD.h"
#include "MXF.h"
-#include <hex_utils.h>
+#include "hex_utils.h"
//------------------------------------------------------------------------------------------
//
const ui32_t kl_length = ASDCP::SMPTE_UL_LENGTH + ASDCP::MXF_BER_LENGTH;
-
+#if 0
const byte_t mdd_key[] = { 0x06, 0x0e, 0x2b, 0x34 };
//
@@ -84,7 +82,7 @@ ASDCP::GetMDDEntry(const byte_t* ul_buf)
return (s_MDD_Table[t_idx].ul == 0 ? 0 : &s_MDD_Table[t_idx]);
}
-
+#endif
//------------------------------------------------------------------------------------------
//
@@ -139,12 +137,12 @@ ASDCP::MXF::SeekToRIP(const ASDCP::FileReader& Reader)
ASDCP::Result_t
ASDCP::MXF::RIP::InitFromFile(const ASDCP::FileReader& Reader)
{
- Result_t result = KLVFilePacket::InitFromFile(Reader, s_MDD_Table[MDDindex_RandomIndexMetadata].ul);
+ Result_t result = KLVFilePacket::InitFromFile(Reader, Dict::ul(MDD_RandomIndexMetadata));
if ( ASDCP_SUCCESS(result) )
{
MemIOReader MemRDR(m_ValueStart, m_ValueLength - 4);
- result = PairArray.ReadFrom(MemRDR);
+ result = PairArray.Unarchive(MemRDR);
}
if ( ASDCP_FAILURE(result) )
@@ -157,7 +155,28 @@ ASDCP::MXF::RIP::InitFromFile(const ASDCP::FileReader& Reader)
ASDCP::Result_t
ASDCP::MXF::RIP::WriteToFile(ASDCP::FileWriter& Writer)
{
- Result_t result = WriteKLToFile(Writer, s_MDD_Table[MDDindex_RandomIndexMetadata].ul, 0);
+ ASDCP::FrameBuffer Buffer;
+ ui32_t RIPSize = ( PairArray.size() * (sizeof(ui32_t) + sizeof(ui64_t)) ) + 4;
+ Result_t result = Buffer.Capacity(RIPSize);
+
+ if ( ASDCP_SUCCESS(result) )
+ result = WriteKLToFile(Writer, Dict::ul(MDD_RandomIndexMetadata), RIPSize);
+
+ if ( ASDCP_SUCCESS(result) )
+ {
+ MemIOWriter MemWRT(Buffer.Data(), Buffer.Capacity());
+ result = PairArray.Archive(MemWRT);
+
+ if ( ASDCP_SUCCESS(result) )
+ MemWRT.WriteUi32BE(RIPSize + 20);
+
+ if ( ASDCP_SUCCESS(result) )
+ Buffer.Size(MemWRT.Size());
+ }
+
+ if ( ASDCP_SUCCESS(result) )
+ result = Writer.Write(Buffer.RoData(), Buffer.Size());
+
return result;
}
@@ -178,6 +197,78 @@ ASDCP::MXF::RIP::Dump(FILE* stream)
//
//
+class ASDCP::MXF::Partition::h__PacketList
+{
+public:
+ std::list<InterchangeObject*> m_List;
+ std::map<UUID, InterchangeObject*> m_Map;
+
+ ~h__PacketList() {
+ while ( ! m_List.empty() )
+ {
+ delete m_List.back();
+ m_List.pop_back();
+ }
+ }
+
+ //
+ void AddPacket(InterchangeObject* ThePacket)
+ {
+ assert(ThePacket);
+ m_Map.insert(std::map<UUID, InterchangeObject*>::value_type(ThePacket->InstanceUID, ThePacket));
+ m_List.push_back(ThePacket);
+ }
+
+ //
+ Result_t GetMDObjectByType(const byte_t* ObjectID, InterchangeObject** Object)
+ {
+ ASDCP_TEST_NULL(ObjectID);
+ ASDCP_TEST_NULL(Object);
+ std::list<InterchangeObject*>::iterator li;
+ *Object = 0;
+
+ for ( li = m_List.begin(); li != m_List.end(); li++ )
+ {
+ if ( (*li)->HasUL(ObjectID) )
+ {
+ *Object = *li;
+ return RESULT_OK;
+ }
+ }
+
+ return RESULT_FAIL;
+ }
+};
+
+//------------------------------------------------------------------------------------------
+//
+
+
+ASDCP::MXF::Partition::Partition() :
+ MajorVersion(1), MinorVersion(2),
+ KAGSize(1), ThisPartition(0), PreviousPartition(0),
+ FooterPartition(0), HeaderByteCount(0), IndexByteCount(0), IndexSID(0),
+ BodyOffset(0), BodySID(1)
+{
+ m_PacketList = new h__PacketList;
+}
+
+ASDCP::MXF::Partition::~Partition()
+{
+}
+
+//
+void
+ASDCP::MXF::Partition::AddChildObject(InterchangeObject* Object)
+{
+ assert(Object);
+ UUID TmpID;
+ TmpID.GenRandomValue();
+ Object->InstanceUID = TmpID;
+ m_PacketList->AddPacket(Object);
+}
+
+//
ASDCP::Result_t
ASDCP::MXF::Partition::InitFromFile(const ASDCP::FileReader& Reader)
{
@@ -199,8 +290,8 @@ ASDCP::MXF::Partition::InitFromFile(const ASDCP::FileReader& Reader)
if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi32BE(&IndexSID);
if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi64BE(&BodyOffset);
if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi32BE(&BodySID);
- if ( ASDCP_SUCCESS(result) ) result = OperationalPattern.ReadFrom(MemRDR);
- if ( ASDCP_SUCCESS(result) ) result = EssenceContainers.ReadFrom(MemRDR);
+ if ( ASDCP_SUCCESS(result) ) result = OperationalPattern.Unarchive(MemRDR);
+ if ( ASDCP_SUCCESS(result) ) result = EssenceContainers.Unarchive(MemRDR);
}
if ( ASDCP_FAILURE(result) )
@@ -211,13 +302,14 @@ ASDCP::MXF::Partition::InitFromFile(const ASDCP::FileReader& Reader)
//
ASDCP::Result_t
-ASDCP::MXF::Partition::WriteToFile(ASDCP::FileWriter& Writer)
+ASDCP::MXF::Partition::WriteToFile(ASDCP::FileWriter& Writer, UL& PartitionLabel)
{
- Result_t result = m_Buffer.Capacity(1024);
+ ASDCP::FrameBuffer Buffer;
+ Result_t result = Buffer.Capacity(1024);
if ( ASDCP_SUCCESS(result) )
{
- MemIOWriter MemWRT(m_Buffer.Data(), m_Buffer.Capacity());
+ MemIOWriter MemWRT(Buffer.Data(), Buffer.Capacity());
result = MemWRT.WriteUi16BE(MajorVersion);
if ( ASDCP_SUCCESS(result) ) result = MemWRT.WriteUi16BE(MinorVersion);
if ( ASDCP_SUCCESS(result) ) result = MemWRT.WriteUi32BE(KAGSize);
@@ -229,18 +321,18 @@ ASDCP::MXF::Partition::WriteToFile(ASDCP::FileWriter& Writer)
if ( ASDCP_SUCCESS(result) ) result = MemWRT.WriteUi32BE(IndexSID);
if ( ASDCP_SUCCESS(result) ) result = MemWRT.WriteUi64BE(BodyOffset);
if ( ASDCP_SUCCESS(result) ) result = MemWRT.WriteUi32BE(BodySID);
- if ( ASDCP_SUCCESS(result) ) result = OperationalPattern.WriteTo(MemWRT);
- if ( ASDCP_SUCCESS(result) ) result = EssenceContainers.WriteTo(MemWRT);
- if ( ASDCP_SUCCESS(result) ) m_Buffer.Size(MemWRT.Size());
+ if ( ASDCP_SUCCESS(result) ) result = OperationalPattern.Archive(MemWRT);
+ if ( ASDCP_SUCCESS(result) ) result = EssenceContainers.Archive(MemWRT);
+ if ( ASDCP_SUCCESS(result) ) Buffer.Size(MemWRT.Size());
}
if ( ASDCP_SUCCESS(result) )
{
ui32_t write_count; // this is subclassed, so the UL is only right some of the time
- result = WriteKLToFile(Writer, s_MDD_Table[MDDindex_ClosedCompleteHeader].ul, m_Buffer.Size());
+ result = WriteKLToFile(Writer, PartitionLabel.Value(), Buffer.Size());
if ( ASDCP_SUCCESS(result) )
- result = Writer.Write(m_Buffer.RoData(), m_Buffer.Size(), &write_count);
+ result = Writer.Write(Buffer.RoData(), Buffer.Size(), &write_count);
}
return result;
@@ -292,7 +384,7 @@ public:
//
-ASDCP::MXF::Primer::Primer() {}
+ASDCP::MXF::Primer::Primer() : m_LocalTag(0xff) {}
//
ASDCP::MXF::Primer::~Primer() {}
@@ -309,12 +401,12 @@ ASDCP::MXF::Primer::ClearTagList()
ASDCP::Result_t
ASDCP::MXF::Primer::InitFromBuffer(const byte_t* p, ui32_t l)
{
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_Primer].ul);
+ Result_t result = KLVPacket::InitFromBuffer(p, l, Dict::ul(MDD_Primer));
if ( ASDCP_SUCCESS(result) )
{
MemIOReader MemRDR(m_ValueStart, m_ValueLength);
- result = LocalTagEntryBatch.ReadFrom(MemRDR);
+ result = LocalTagEntryBatch.Unarchive(MemRDR);
}
if ( ASDCP_SUCCESS(result) )
@@ -331,45 +423,72 @@ ASDCP::MXF::Primer::InitFromBuffer(const byte_t* p, ui32_t l)
//
ASDCP::Result_t
+ASDCP::MXF::Primer::WriteToFile(ASDCP::FileWriter& Writer)
+{
+ ASDCP::FrameBuffer Buffer;
+ Result_t result = Buffer.Capacity(128*1024);
+
+ if ( ASDCP_SUCCESS(result) )
+ result = WriteToBuffer(Buffer);
+
+ if ( ASDCP_SUCCESS(result) )
+ result = Writer.Write(Buffer.RoData(), Buffer.Size());
+
+ return result;
+}
+
+//
+ASDCP::Result_t
ASDCP::MXF::Primer::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
{
- MemIOWriter MemWRT(Buffer.Data(), Buffer.Capacity());
- Result_t result = LocalTagEntryBatch.WriteTo(MemWRT);
- Buffer.Size(MemWRT.Size());
-#if 0
+ ASDCP::FrameBuffer LocalTagBuffer;
+ MemIOWriter MemWRT(Buffer.Data() + kl_length, Buffer.Capacity() - kl_length);
+ Result_t result = LocalTagEntryBatch.Archive(MemWRT);
+
if ( ASDCP_SUCCESS(result) )
{
- ui32_t write_count;
- result = WriteKLToFile(Writer, s_MDD_Table[MDDindex_Primer].ul, Buffer.Size());
+ ui32_t packet_length = MemWRT.Size();
+ result = WriteKLToBuffer(Buffer, Dict::ul(MDD_Primer), packet_length);
if ( ASDCP_SUCCESS(result) )
- result = Writer.Write(Buffer.RoData(), Buffer.Size(), &write_count);
+ Buffer.Size(Buffer.Size() + packet_length);
}
-#endif
return result;
}
//
ASDCP::Result_t
-ASDCP::MXF::Primer::InsertTag(const ASDCP::UL& Key, ASDCP::TagValue& Tag)
+ASDCP::MXF::Primer::InsertTag(const MDDEntry& Entry, ASDCP::TagValue& Tag)
{
assert(m_Lookup);
-
- std::map<UL, TagValue>::iterator i = m_Lookup->find(Key);
+ UL TestUL(Entry.ul);
+ std::map<UL, TagValue>::iterator i = m_Lookup->find(TestUL);
if ( i == m_Lookup->end() )
{
- const MDDEntry* mdde = GetMDDEntry(Key.Value());
- assert(mdde);
+ if ( Entry.tag.a == 0 && Entry.tag.b == 0 )
+ {
+ Tag.a = 0xff;
+ Tag.b = m_LocalTag--;
+ }
+ else
+ {
+ Tag.a = Entry.tag.a;
+ Tag.b = Entry.tag.b;
+ }
LocalTagEntry TmpEntry;
- TmpEntry.UL = Key;
- TmpEntry.Tag = mdde->tag;
+ TmpEntry.UL = TestUL;
+ TmpEntry.Tag = Tag;
LocalTagEntryBatch.push_back(TmpEntry);
m_Lookup->insert(std::map<UL, TagValue>::value_type(TmpEntry.UL, TmpEntry.Tag));
}
+ else
+ {
+ Tag = (*i).second;
+ }
return RESULT_OK;
}
@@ -411,7 +530,7 @@ ASDCP::MXF::Primer::Dump(FILE* stream)
Batch<LocalTagEntry>::iterator i = LocalTagEntryBatch.begin();
for ( ; i != LocalTagEntryBatch.end(); i++ )
{
- const MDDEntry* Entry = GetMDDEntry((*i).UL.Value());
+ const MDDEntry* Entry = Dict::FindUL((*i).UL.Value());
fprintf(stream, " %s %s\n", (*i).ToString(identbuf), (Entry ? Entry->name : "Unknown"));
}
@@ -424,62 +543,52 @@ ASDCP::MXF::Primer::Dump(FILE* stream)
//
ASDCP::Result_t
-ASDCP::MXF::Preface::InitFromBuffer(const byte_t* p, ui32_t l)
+ASDCP::MXF::Preface::InitFromTLVSet(TLVReader& TLVSet)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_Preface].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
-
- result = MemRDR.ReadObject(OBJ_READ_ARGS(InterchangeObject, InstanceUID));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadObject(OBJ_READ_ARGS(GenerationInterchangeObject, GenerationUID));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadObject(OBJ_READ_ARGS(Preface, LastModifiedDate));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi16(OBJ_READ_ARGS(Preface, Version));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadUi32(OBJ_READ_ARGS(Preface, ObjectModelVersion));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadObject(OBJ_READ_ARGS(Preface, PrimaryPackage));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadObject(OBJ_READ_ARGS(Preface, Identifications));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadObject(OBJ_READ_ARGS(Preface, ContentStorage));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadObject(OBJ_READ_ARGS(Preface, OperationalPattern));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadObject(OBJ_READ_ARGS(Preface, EssenceContainers));
- if ( ASDCP_SUCCESS(result) ) result = MemRDR.ReadObject(OBJ_READ_ARGS(Preface, DMSchemes));
- }
-
- if ( ASDCP_FAILURE(result) )
- DefaultLogSink().Error("Failed to initialize Preface\n");
-
+ Result_t result = InterchangeObject::InitFromTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(Preface, LastModifiedDate));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi16(OBJ_READ_ARGS(Preface, Version));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi32(OBJ_READ_ARGS(Preface, ObjectModelVersion));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(Preface, PrimaryPackage));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(Preface, Identifications));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(Preface, ContentStorage));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(Preface, OperationalPattern));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(Preface, EssenceContainers));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(Preface, DMSchemes));
return result;
}
//
ASDCP::Result_t
-ASDCP::MXF::Preface::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
+ASDCP::MXF::Preface::WriteToTLVSet(TLVWriter& TLVSet)
{
- TLVWriter MemWRT(Buffer.Data() + kl_length, Buffer.Capacity() - kl_length, m_Lookup);
- Result_t result = MemWRT.WriteObject(OBJ_WRITE_ARGS(InterchangeObject, InstanceUID));
- if ( ASDCP_SUCCESS(result) ) result = MemWRT.WriteObject(OBJ_WRITE_ARGS(GenerationInterchangeObject, GenerationUID));
- if ( ASDCP_SUCCESS(result) ) result = MemWRT.WriteObject(OBJ_WRITE_ARGS(Preface, LastModifiedDate));
- if ( ASDCP_SUCCESS(result) ) result = MemWRT.WriteUi16(OBJ_WRITE_ARGS(Preface, Version));
- if ( ASDCP_SUCCESS(result) ) result = MemWRT.WriteUi32(OBJ_WRITE_ARGS(Preface, ObjectModelVersion));
- if ( ASDCP_SUCCESS(result) ) result = MemWRT.WriteObject(OBJ_WRITE_ARGS(Preface, PrimaryPackage));
- if ( ASDCP_SUCCESS(result) ) result = MemWRT.WriteObject(OBJ_WRITE_ARGS(Preface, Identifications));
- if ( ASDCP_SUCCESS(result) ) result = MemWRT.WriteObject(OBJ_WRITE_ARGS(Preface, ContentStorage));
- if ( ASDCP_SUCCESS(result) ) result = MemWRT.WriteObject(OBJ_WRITE_ARGS(Preface, OperationalPattern));
- if ( ASDCP_SUCCESS(result) ) result = MemWRT.WriteObject(OBJ_WRITE_ARGS(Preface, EssenceContainers));
- if ( ASDCP_SUCCESS(result) ) result = MemWRT.WriteObject(OBJ_WRITE_ARGS(Preface, DMSchemes));
-
- if ( ASDCP_SUCCESS(result) )
- {
- ui32_t packet_length = MemWRT.Size();
- result = WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_Preface].ul, packet_length);
+ Result_t result = InterchangeObject::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Preface, LastModifiedDate));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi16(OBJ_WRITE_ARGS(Preface, Version));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(Preface, ObjectModelVersion));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Preface, PrimaryPackage));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Preface, Identifications));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Preface, ContentStorage));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Preface, OperationalPattern));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Preface, EssenceContainers));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Preface, DMSchemes));
+ return result;
+}
- if ( ASDCP_SUCCESS(result) )
- Buffer.Size(Buffer.Size() + packet_length);
- }
+//
+ASDCP::Result_t
+ASDCP::MXF::Preface::InitFromBuffer(const byte_t* p, ui32_t l)
+{
+ m_Typeinfo = &Dict::Type(MDD_Preface);
+ return InterchangeObject::InitFromBuffer(p, l);
+}
- return result;
+//
+ASDCP::Result_t
+ASDCP::MXF::Preface::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
+{
+ m_Typeinfo = &Dict::Type(MDD_Preface);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//
@@ -491,83 +600,25 @@ ASDCP::MXF::Preface::Dump(FILE* stream)
if ( stream == 0 )
stream = stderr;
- KLVPacket::Dump(stream, false);
- fprintf(stream, " InstanceUID = %s\n", InstanceUID.ToString(identbuf));
- fprintf(stream, " GenerationUID = %s\n", GenerationUID.ToString(identbuf));
- fprintf(stream, " LastModifiedDate = %s\n", LastModifiedDate.ToString(identbuf));
- fprintf(stream, " Version = %hu\n", Version);
- fprintf(stream, " ObjectModelVersion = %lu\n", ObjectModelVersion);
- fprintf(stream, " PrimaryPackage = %s\n", PrimaryPackage.ToString(identbuf));
- fprintf(stream, " Identifications:\n"); Identifications.Dump(stream);
- fprintf(stream, " ContentStorage = %s\n", ContentStorage.ToString(identbuf));
- fprintf(stream, " OperationalPattern = %s\n", OperationalPattern.ToString(identbuf));
- fprintf(stream, " EssenceContainers:\n"); EssenceContainers.Dump(stream);
- fprintf(stream, " DMSchemes:\n"); DMSchemes.Dump(stream);
-
- fputs("==========================================================================\n", stream);
+ InterchangeObject::Dump(stream);
+ fprintf(stream, " %22s = %s\n", "LastModifiedDate", LastModifiedDate.ToString(identbuf));
+ fprintf(stream, " %22s = %hu\n", "Version", Version);
+ fprintf(stream, " %22s = %lu\n", "ObjectModelVersion", ObjectModelVersion);
+ fprintf(stream, " %22s = %s\n", "PrimaryPackage", PrimaryPackage.ToString(identbuf));
+ fprintf(stream, " %22s:\n", "Identifications"); Identifications.Dump(stream);
+ fprintf(stream, " %22s = %s\n", "ContentStorage", ContentStorage.ToString(identbuf));
+ fprintf(stream, " %22s = %s\n", "OperationalPattern", OperationalPattern.ToString(identbuf));
+ fprintf(stream, " %22s:\n", "EssenceContainers"); EssenceContainers.Dump(stream);
+ fprintf(stream, " %22s:\n", "DMSchemes"); DMSchemes.Dump(stream);
}
//------------------------------------------------------------------------------------------
//
-//
-class ASDCP::MXF::h__PacketList
-{
-public:
- std::list<InterchangeObject*> m_List;
- std::map<UL, InterchangeObject*> m_Map;
+ASDCP::MXF::OPAtomHeader::OPAtomHeader() : m_Preface(0), m_HasRIP(false) {}
+ASDCP::MXF::OPAtomHeader::~OPAtomHeader() {}
- ~h__PacketList() {
- while ( ! m_List.empty() )
- {
- delete m_List.back();
- m_List.pop_back();
- }
- }
-
- //
- void AddPacket(InterchangeObject* ThePacket)
- {
- assert(ThePacket);
- m_Map.insert(std::map<UID, InterchangeObject*>::value_type(ThePacket->InstanceUID, ThePacket));
- m_List.push_back(ThePacket);
- }
-
- //
- Result_t GetMDObjectByType(const byte_t* ObjectID, InterchangeObject** Object)
- {
- ASDCP_TEST_NULL(ObjectID);
- ASDCP_TEST_NULL(Object);
- std::list<InterchangeObject*>::iterator li;
- *Object = 0;
-
- for ( li = m_List.begin(); li != m_List.end(); li++ )
- {
- if ( (*li)->HasUL(ObjectID) )
- {
- *Object = *li;
- return RESULT_OK;
- }
- }
-
- return RESULT_FAIL;
- }
-};
-
-//------------------------------------------------------------------------------------------
//
-
-ASDCP::MXF::OPAtomHeader::OPAtomHeader() : m_Preface(0), m_HasRIP(false)
-{
- m_PacketList = new h__PacketList;
-}
-
-
-ASDCP::MXF::OPAtomHeader::~OPAtomHeader()
-{
-}
-
-
ASDCP::Result_t
ASDCP::MXF::OPAtomHeader::InitFromFile(const ASDCP::FileReader& Reader)
{
@@ -600,8 +651,15 @@ ASDCP::MXF::OPAtomHeader::InitFromFile(const ASDCP::FileReader& Reader)
if ( ASDCP_SUCCESS(result) )
{
- ui32_t buf_len = HeaderByteCount;
- result = m_Buffer.Capacity(buf_len);
+ ui32_t here = (ui32_t)Reader.Tell();
+
+ if ( HeaderByteCount < here )
+ {
+ DefaultLogSink().Error("HeaderByteCount less than Partition size\n");
+ return RESULT_FAIL;
+ }
+
+ result = m_Buffer.Capacity(HeaderByteCount - here);
}
if ( ASDCP_SUCCESS(result) )
@@ -631,18 +689,19 @@ ASDCP::MXF::OPAtomHeader::InitFromFile(const ASDCP::FileReader& Reader)
if ( ASDCP_SUCCESS(result) )
{
- if ( object->IsA(s_MDD_Table[MDDindex_KLVFill].ul) )
+ if ( object->IsA(Dict::ul(MDD_KLVFill)) )
{
delete object;
}
- else if ( object->IsA(s_MDD_Table[MDDindex_Primer].ul) )
+ else if ( object->IsA(Dict::ul(MDD_Primer)) )
{
delete object;
result = m_Primer.InitFromBuffer(redo_p, end_p - redo_p);
}
- else if ( object->IsA(s_MDD_Table[MDDindex_Preface].ul) )
+ else if ( object->IsA(Dict::ul(MDD_Preface)) )
{
- m_Preface = object;
+ assert(m_Preface == 0);
+ m_Preface = (Preface*)object;
}
else
{
@@ -699,37 +758,41 @@ ASDCP::MXF::OPAtomHeader::GetSourcePackage()
ASDCP::Result_t
ASDCP::MXF::OPAtomHeader::WriteToFile(ASDCP::FileWriter& Writer, ui32_t HeaderSize)
{
+ if ( m_Preface == 0 )
+ return RESULT_STATE;
+
if ( HeaderSize < 4096 )
{
- DefaultLogSink().Error("HeaderSize %lu is too small. Must be >= 4096\n");
+ DefaultLogSink().Error("HeaderSize %lu is too small. Must be >= 4096\n", HeaderSize);
return RESULT_FAIL;
}
ASDCP::FrameBuffer HeaderBuffer;
-
- Result_t result = HeaderBuffer.Capacity(HeaderSize);
HeaderByteCount = HeaderSize;
+ Result_t result = HeaderBuffer.Capacity(HeaderSize);
+ m_Preface->m_Lookup = &m_Primer;
- if ( ASDCP_SUCCESS(result) )
- {
- assert(m_Preface);
- m_Preface->m_Lookup = &m_Primer;
- result = m_Preface->WriteToBuffer(HeaderBuffer);
- }
-#if 0
std::list<InterchangeObject*>::iterator pl_i = m_PacketList->m_List.begin();
for ( ; pl_i != m_PacketList->m_List.end() && ASDCP_SUCCESS(result); pl_i++ )
{
InterchangeObject* object = *pl_i;
object->m_Lookup = &m_Primer;
- result = object->WriteToBuffer(HeaderBuffer);
+
+ ASDCP::FrameBuffer WriteWrapper;
+ WriteWrapper.SetData(HeaderBuffer.Data() + HeaderBuffer.Size(),
+ HeaderBuffer.Capacity() - HeaderBuffer.Size());
+ result = object->WriteToBuffer(WriteWrapper);
+ HeaderBuffer.Size(HeaderBuffer.Size() + WriteWrapper.Size());
}
-#endif
+
if ( ASDCP_SUCCESS(result) )
- result = Partition::WriteToFile(Writer);
+ {
+ UL TmpUL(Dict::ul(MDD_ClosedCompleteHeader));
+ result = Partition::WriteToFile(Writer, TmpUL);
+ }
- // if ( ASDCP_SUCCESS(result) )
- // result = m_Primer.WriteToFile(Writer);
+ if ( ASDCP_SUCCESS(result) )
+ result = m_Primer.WriteToFile(Writer);
if ( ASDCP_SUCCESS(result) )
{
@@ -762,7 +825,7 @@ ASDCP::MXF::OPAtomHeader::WriteToFile(ASDCP::FileWriter& Writer, ui32_t HeaderSi
}
klv_fill_length -= kl_length;
- result = WriteKLToFile(Writer, s_MDD_Table[MDDindex_KLVFill].ul, klv_fill_length);
+ result = WriteKLToFile(Writer, Dict::ul(MDD_KLVFill), klv_fill_length);
if ( ASDCP_SUCCESS(result) )
result = NilBuf.Capacity(klv_fill_length);
@@ -791,8 +854,11 @@ ASDCP::MXF::OPAtomHeader::Dump(FILE* stream)
Partition::Dump(stream);
m_Primer.Dump(stream);
- assert(m_Preface);
- m_Preface->Dump(stream);
+
+ if ( m_Preface == 0 )
+ fputs("No Preface loaded\n", stream);
+ else
+ m_Preface->Dump(stream);
std::list<InterchangeObject*>::iterator i = m_PacketList->m_List.begin();
for ( ; i != m_PacketList->m_List.end(); i++ )
@@ -802,15 +868,15 @@ ASDCP::MXF::OPAtomHeader::Dump(FILE* stream)
//------------------------------------------------------------------------------------------
//
-ASDCP::MXF::OPAtomIndexFooter::OPAtomIndexFooter() : m_Lookup(0)
+ASDCP::MXF::OPAtomIndexFooter::OPAtomIndexFooter() :
+ m_CurrentSegment(0), m_BytesPerEditUnit(0), m_BodySID(0),
+ m_ECOffset(0), m_Lookup(0)
{
- m_PacketList = new h__PacketList;
+ BodySID = 0;
+ IndexSID = 129;
}
-
-ASDCP::MXF::OPAtomIndexFooter::~OPAtomIndexFooter()
-{
-}
+ASDCP::MXF::OPAtomIndexFooter::~OPAtomIndexFooter() {}
ASDCP::Result_t
@@ -866,9 +932,60 @@ ASDCP::MXF::OPAtomIndexFooter::InitFromFile(const ASDCP::FileReader& Reader)
//
ASDCP::Result_t
-ASDCP::MXF::OPAtomIndexFooter::WriteToFile(ASDCP::FileWriter& Writer)
+ASDCP::MXF::OPAtomIndexFooter::WriteToFile(ASDCP::FileWriter& Writer, ui64_t duration)
{
- Result_t result = WriteKLToFile(Writer, s_MDD_Table[MDDindex_CompleteFooter].ul, 0);
+ ASDCP::FrameBuffer FooterBuffer;
+ ui32_t footer_size = m_PacketList->m_List.size() * MaxIndexSegmentSize; // segment-count * max-segment-size
+ Result_t result = FooterBuffer.Capacity(footer_size);
+ ui32_t iseg_count = 0;
+
+ if ( m_CurrentSegment != 0 )
+ {
+ m_CurrentSegment->IndexDuration = m_CurrentSegment->IndexEntryArray.size();
+ m_CurrentSegment = 0;
+ }
+
+ std::list<InterchangeObject*>::iterator pl_i = m_PacketList->m_List.begin();
+ for ( ; pl_i != m_PacketList->m_List.end() && ASDCP_SUCCESS(result); pl_i++ )
+ {
+ if ( (*pl_i)->IsA(OBJ_TYPE_ARGS(IndexTableSegment)) )
+ {
+ iseg_count++;
+ IndexTableSegment* Segment = (IndexTableSegment*)(*pl_i);
+
+ if ( m_BytesPerEditUnit != 0 )
+ {
+ if ( iseg_count != 1 )
+ return RESULT_STATE;
+
+ Segment->IndexDuration = duration;
+ }
+ }
+
+ InterchangeObject* object = *pl_i;
+ object->m_Lookup = m_Lookup;
+
+ ASDCP::FrameBuffer WriteWrapper;
+ WriteWrapper.SetData(FooterBuffer.Data() + FooterBuffer.Size(),
+ FooterBuffer.Capacity() - FooterBuffer.Size());
+ result = object->WriteToBuffer(WriteWrapper);
+ FooterBuffer.Size(FooterBuffer.Size() + WriteWrapper.Size());
+ }
+
+ if ( ASDCP_SUCCESS(result) )
+ {
+ IndexByteCount = FooterBuffer.Size();
+ UL FooterUL(Dict::ul(MDD_CompleteFooter));
+ result = Partition::WriteToFile(Writer, FooterUL);
+ }
+
+ if ( ASDCP_SUCCESS(result) )
+ {
+ ui32_t write_count;
+ Writer.Write(FooterBuffer.RoData(), FooterBuffer.Size(), &write_count);
+ assert(write_count == FooterBuffer.Size());
+ }
+
return result;
}
@@ -921,6 +1038,67 @@ ASDCP::MXF::OPAtomIndexFooter::Lookup(ui32_t frame_num, IndexTableSegment::Index
return RESULT_FAIL;
}
+//
+void
+ASDCP::MXF::OPAtomIndexFooter::SetIndexParamsCBR(IPrimerLookup* lookup, ui32_t size, const Rational& Rate)
+{
+ assert(lookup);
+ m_Lookup = lookup;
+ m_BytesPerEditUnit = size;
+ m_EditRate = Rate;
+
+ IndexTableSegment* Index = new IndexTableSegment;
+ AddChildObject(Index);
+ Index->EditUnitByteCount = m_BytesPerEditUnit;
+ Index->IndexEditRate = Rate;
+}
+
+//
+void
+ASDCP::MXF::OPAtomIndexFooter::SetIndexParamsVBR(IPrimerLookup* lookup, const Rational& Rate, fpos_t offset)
+{
+ assert(lookup);
+ m_Lookup = lookup;
+ m_BytesPerEditUnit = 0;
+ m_EditRate = Rate;
+ m_ECOffset = offset;
+}
+
+//
+void
+ASDCP::MXF::OPAtomIndexFooter::PushIndexEntry(const IndexTableSegment::IndexEntry& Entry)
+{
+ if ( m_BytesPerEditUnit != 0 ) // are we CBR? that's bad
+ {
+ DefaultLogSink().Error("Call to PushIndexEntry() failed: index is CBR\n");
+ return;
+ }
+
+ // do we have an available segment?
+ if ( m_CurrentSegment == 0 )
+ {
+ m_CurrentSegment = new IndexTableSegment;
+ assert(m_CurrentSegment);
+ AddChildObject(m_CurrentSegment);
+ m_CurrentSegment->DeltaEntryArray.push_back(IndexTableSegment::DeltaEntry());
+ m_CurrentSegment->IndexEditRate = m_EditRate;
+ m_CurrentSegment->IndexStartPosition = 0;
+ }
+ else if ( m_CurrentSegment->IndexEntryArray.size() >= 1486 ) // 1486 gets us 16K packets
+ {
+ m_CurrentSegment->IndexDuration = m_CurrentSegment->IndexEntryArray.size();
+ ui64_t StartPosition = m_CurrentSegment->IndexStartPosition + m_CurrentSegment->IndexDuration;
+
+ m_CurrentSegment = new IndexTableSegment;
+ assert(m_CurrentSegment);
+ AddChildObject(m_CurrentSegment);
+ m_CurrentSegment->DeltaEntryArray.push_back(IndexTableSegment::DeltaEntry());
+ m_CurrentSegment->IndexEditRate = m_EditRate;
+ m_CurrentSegment->IndexStartPosition = StartPosition;
+ }
+
+ m_CurrentSegment->IndexEntryArray.push_back(Entry);
+}
//------------------------------------------------------------------------------------------
//
@@ -930,27 +1108,63 @@ ASDCP::Result_t
ASDCP::MXF::InterchangeObject::InitFromTLVSet(TLVReader& TLVSet)
{
Result_t result = TLVSet.ReadObject(OBJ_READ_ARGS(InterchangeObject, InstanceUID));
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(GenerationInterchangeObject, GenerationUID));
+ if ( ASDCP_SUCCESS(result) )
+ result = TLVSet.ReadObject(OBJ_READ_ARGS(GenerationInterchangeObject, GenerationUID));
return result;
}
//
ASDCP::Result_t
-ASDCP::MXF::InterchangeObject::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
+ASDCP::MXF::InterchangeObject::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = TLVSet.WriteObject(OBJ_WRITE_ARGS(InterchangeObject, InstanceUID));
+ if ( ASDCP_SUCCESS(result) )
+ result = TLVSet.WriteObject(OBJ_WRITE_ARGS(GenerationInterchangeObject, GenerationUID));
+ return result;
+}
+
+//
+ASDCP::Result_t
+ASDCP::MXF::InterchangeObject::InitFromBuffer(const byte_t* p, ui32_t l)
{
- if ( Buffer.Capacity() < (Buffer.Size() + m_KLLength + m_ValueLength) )
+ ASDCP_TEST_NULL(p);
+ Result_t result;
+
+ if ( m_Typeinfo == 0 )
+ {
+ result = KLVPacket::InitFromBuffer(p, l);
+ }
+ else
{
- DefaultLogSink().Error("InterchangeObject::WriteToBuffer: Buffer too small\n");
- Dump();
- return RESULT_READFAIL;
+ result = KLVPacket::InitFromBuffer(p, l, m_Typeinfo->ul);
+
+ if ( ASDCP_SUCCESS(result) )
+ {
+ TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
+ result = InitFromTLVSet(MemRDR);
+ }
}
+
+ return result;
+}
+
+//
+ASDCP::Result_t
+ASDCP::MXF::InterchangeObject::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
+{
+ if ( m_Typeinfo == 0 )
+ return RESULT_STATE;
- Result_t result = WriteKLToBuffer(Buffer, m_KeyStart, m_ValueLength);
+ TLVWriter MemWRT(Buffer.Data() + kl_length, Buffer.Capacity() - kl_length, m_Lookup);
+ Result_t result = WriteToTLVSet(MemWRT);
if ( ASDCP_SUCCESS(result) )
{
- memcpy(Buffer.Data() + Buffer.Size(), m_ValueStart, m_ValueLength);
- Buffer.Size(Buffer.Size() + m_ValueLength);
+ ui32_t packet_length = MemWRT.Size();
+ result = WriteKLToBuffer(Buffer, m_Typeinfo->ul, packet_length);
+
+ if ( ASDCP_SUCCESS(result) )
+ Buffer.Size(Buffer.Size() + packet_length);
}
return result;
diff --git a/src/MXF.h b/src/MXF.h
index 74c64db..649d4d9 100755
--- a/src/MXF.h
+++ b/src/MXF.h
@@ -38,6 +38,8 @@ namespace ASDCP
{
namespace MXF
{
+ class InterchangeObject;
+
// seek an open file handle to the start of the RIP KLV packet
Result_t SeekToRIP(const FileReader&);
@@ -53,6 +55,9 @@ namespace ASDCP
ui32_t BodySID;
ui64_t ByteOffset;
+ Pair() : BodySID(0), ByteOffset(0) {}
+ Pair(ui32_t sid, ui64_t offset) : BodySID(sid), ByteOffset(offset) {}
+
ui32_t Size() { return sizeof(ui32_t) + sizeof(ui64_t); }
inline const char* ToString(char* str_buf) const {
@@ -61,7 +66,7 @@ namespace ASDCP
return str_buf;
}
- inline Result_t ReadFrom(ASDCP::MemIOReader& Reader) {
+ inline Result_t Unarchive(ASDCP::MemIOReader& Reader) {
Result_t result = Reader.ReadUi32BE(&BodySID);
if ( ASDCP_SUCCESS(result) )
@@ -70,7 +75,7 @@ namespace ASDCP
return result;
}
- inline Result_t WriteTo(ASDCP::MemIOWriter& Writer) {
+ inline Result_t Archive(ASDCP::MemIOWriter& Writer) {
Result_t result = Writer.WriteUi32BE(BodySID);
if ( ASDCP_SUCCESS(result) )
@@ -95,6 +100,10 @@ namespace ASDCP
{
ASDCP_NO_COPY_CONSTRUCT(Partition);
+ protected:
+ class h__PacketList;
+ mem_ptr<h__PacketList> m_PacketList;
+
public:
ui16_t MajorVersion;
ui16_t MinorVersion;
@@ -110,19 +119,21 @@ namespace ASDCP
UL OperationalPattern;
Batch<UL> EssenceContainers;
- Partition() {}
- virtual ~Partition() {}
+ Partition();
+ virtual ~Partition();
+ virtual void AddChildObject(InterchangeObject*);
virtual Result_t InitFromFile(const ASDCP::FileReader& Reader);
- virtual Result_t WriteToFile(ASDCP::FileWriter& Writer);
+ virtual Result_t WriteToFile(ASDCP::FileWriter& Writer, UL& PartitionLabel);
virtual void Dump(FILE* = 0);
};
//
- class Primer : public ASDCP::KLVPacket, public ASDCP::IPrimerLookup
+ class Primer : public ASDCP::KLVFilePacket, public ASDCP::IPrimerLookup
{
class h__PrimerLookup;
mem_ptr<h__PrimerLookup> m_Lookup;
+ ui8_t m_LocalTag;
ASDCP_NO_COPY_CONSTRUCT(Primer);
public:
@@ -139,27 +150,17 @@ namespace ASDCP
return str_buf;
}
- inline Result_t ReadFrom(ASDCP::MemIOReader& Reader) {
+ inline Result_t Unarchive(ASDCP::MemIOReader& Reader) {
Result_t result = Reader.ReadUi8(&Tag.a);
-
- if ( ASDCP_SUCCESS(result) )
- result = Reader.ReadUi8(&Tag.b);
-
- if ( ASDCP_SUCCESS(result) )
- result = UL.ReadFrom(Reader);
-
+ if ( ASDCP_SUCCESS(result) ) result = Reader.ReadUi8(&Tag.b);
+ if ( ASDCP_SUCCESS(result) ) result = UL.Unarchive(Reader);
return result;
}
- inline Result_t WriteTo(ASDCP::MemIOWriter& Writer) {
+ inline Result_t Archive(ASDCP::MemIOWriter& Writer) {
Result_t result = Writer.WriteUi8(Tag.a);
-
- if ( ASDCP_SUCCESS(result) )
- result = Writer.WriteUi8(Tag.b);
-
- if ( ASDCP_SUCCESS(result) )
- result = UL.WriteTo(Writer);
-
+ if ( ASDCP_SUCCESS(result) ) result = Writer.WriteUi8(Tag.b);
+ if ( ASDCP_SUCCESS(result) ) result = UL.Archive(Writer);
return result;
}
};
@@ -170,11 +171,12 @@ namespace ASDCP
virtual ~Primer();
virtual void ClearTagList();
- virtual Result_t InsertTag(const ASDCP::UL& Key, ASDCP::TagValue& Tag);
+ virtual Result_t InsertTag(const MDDEntry& Entry, ASDCP::TagValue& Tag);
virtual Result_t TagForKey(const ASDCP::UL& Key, ASDCP::TagValue& Tag);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
+ virtual Result_t WriteToFile(ASDCP::FileWriter& Writer);
virtual void Dump(FILE* = 0);
};
@@ -182,23 +184,28 @@ namespace ASDCP
//
class InterchangeObject : public ASDCP::KLVPacket
{
+ protected:
+ const MDDEntry* m_Typeinfo;
+
public:
IPrimerLookup* m_Lookup;
- UID InstanceUID;
+ UUID InstanceUID;
UUID GenerationUID;
- InterchangeObject() : m_Lookup(0) {}
+ InterchangeObject() : m_Typeinfo(0), m_Lookup(0) {}
virtual ~InterchangeObject() {}
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
virtual bool IsA(const byte_t* label);
+ virtual const char* ObjectName() { return "InterchangeObject"; }
virtual void Dump(FILE* stream = 0);
};
//
InterchangeObject* CreateObject(const byte_t* label);
-
//
class Preface : public InterchangeObject
{
@@ -209,20 +216,24 @@ namespace ASDCP
Timestamp LastModifiedDate;
ui16_t Version;
ui32_t ObjectModelVersion;
- UID PrimaryPackage;
- Batch<UID> Identifications;
- UID ContentStorage;
+ UUID PrimaryPackage;
+ Batch<UUID> Identifications;
+ UUID ContentStorage;
UL OperationalPattern;
Batch<UL> EssenceContainers;
Batch<UL> DMSchemes;
- Preface() {}
+ Preface() : Version(258), ObjectModelVersion(0) {}
virtual ~Preface() {}
- virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
- virtual Result_t WriteToBuffer(ASDCP::FrameBuffer& Buffer);
+ virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
+ virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
virtual void Dump(FILE* = 0);
};
+ const ui32_t MaxIndexSegmentSize = 65536;
+
//
class IndexTableSegment : public InterchangeObject
{
@@ -237,9 +248,10 @@ namespace ASDCP
ui8_t Slice;
ui32_t ElementData;
- Result_t ReadFrom(ASDCP::MemIOReader& Reader);
- Result_t WriteTo(ASDCP::MemIOWriter& Writer);
- inline const char* ToString(char* str_buf) const;
+ DeltaEntry() : PosTableIndex(-1), Slice(0), ElementData(0) {}
+ Result_t Unarchive(ASDCP::MemIOReader& Reader);
+ Result_t Archive(ASDCP::MemIOWriter& Writer);
+ const char* ToString(char* str_buf) const;
};
//
@@ -250,12 +262,12 @@ namespace ASDCP
i8_t KeyFrameOffset;
ui8_t Flags;
ui64_t StreamOffset;
- std::list<ui32_t> SliceOffset;
- Array<Rational> PosTable;
+ // std::list<ui32_t> SliceOffset;
+ // Array<Rational> PosTable;
- Result_t ReadFrom(ASDCP::MemIOReader& Reader);
- Result_t WriteTo(ASDCP::MemIOWriter& Writer);
- inline const char* ToString(char* str_buf) const;
+ Result_t Unarchive(ASDCP::MemIOReader& Reader);
+ Result_t Archive(ASDCP::MemIOWriter& Writer);
+ const char* ToString(char* str_buf) const;
};
Rational IndexEditRate;
@@ -271,8 +283,10 @@ namespace ASDCP
IndexTableSegment();
virtual ~IndexTableSegment();
+ virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
- virtual Result_t WriteToBuffer(ASDCP::FrameBuffer& Buffer);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
+ virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
virtual void Dump(FILE* = 0);
};
@@ -285,15 +299,14 @@ namespace ASDCP
//
class OPAtomHeader : public Partition
{
- mem_ptr<h__PacketList> m_PacketList;
ASDCP_NO_COPY_CONSTRUCT(OPAtomHeader);
public:
- ASDCP::MXF::RIP m_RIP;
- ASDCP::MXF::Primer m_Primer;
- InterchangeObject* m_Preface;
- ASDCP::FrameBuffer m_Buffer;
- bool m_HasRIP;
+ ASDCP::MXF::RIP m_RIP;
+ ASDCP::MXF::Primer m_Primer;
+ Preface* m_Preface;
+ ASDCP::FrameBuffer m_Buffer;
+ bool m_HasRIP;
OPAtomHeader();
virtual ~OPAtomHeader();
@@ -308,20 +321,27 @@ namespace ASDCP
//
class OPAtomIndexFooter : public Partition
{
- mem_ptr<h__PacketList> m_PacketList;
- ASDCP::FrameBuffer m_Buffer;
+ IndexTableSegment* m_CurrentSegment;
+ ASDCP::FrameBuffer m_Buffer;
+ ui32_t m_BytesPerEditUnit;
+ Rational m_EditRate;
+ ui32_t m_BodySID;
ASDCP_NO_COPY_CONSTRUCT(OPAtomIndexFooter);
public:
- IPrimerLookup* m_Lookup;
+ fpos_t m_ECOffset;
+ IPrimerLookup* m_Lookup;
OPAtomIndexFooter();
virtual ~OPAtomIndexFooter();
virtual Result_t InitFromFile(const ASDCP::FileReader& Reader);
- virtual Result_t WriteToFile(ASDCP::FileWriter& Writer);
+ virtual Result_t WriteToFile(ASDCP::FileWriter& Writer, ui64_t duration);
virtual void Dump(FILE* = 0);
virtual Result_t Lookup(ui32_t frame_num, IndexTableSegment::IndexEntry&);
+ virtual void PushIndexEntry(const IndexTableSegment::IndexEntry&);
+ virtual void SetIndexParamsCBR(IPrimerLookup* lookup, ui32_t size, const Rational& Rate);
+ virtual void SetIndexParamsVBR(IPrimerLookup* lookup, const Rational& Rate, fpos_t offset);
};
} // namespace MXF
diff --git a/src/MXFTypes.cpp b/src/MXFTypes.cpp
index 2a8949e..6001cf3 100755
--- a/src/MXFTypes.cpp
+++ b/src/MXFTypes.cpp
@@ -30,13 +30,130 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "MXFTypes.h"
+#include "FortunaRNG.h"
//------------------------------------------------------------------------------------------
//
+const ASDCP::UID&
+ASDCP::UID::operator=(const UMID& rhs)
+{
+ // TODO
+ return *this;
+}
+
+//
+void
+ASDCP::UMID::MakeUMID(int Type)
+{
+ UUID AssetID;
+ AssetID.GenRandomValue();
+ MakeUMID(Type, AssetID);
+}
+
+//
+void
+ASDCP::UMID::MakeUMID(int Type, const UUID& AssetID)
+{
+ // Set the non-varying base of the UMID
+ static const byte_t UMIDBase[10] = { 0x06, 0x0a, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 };
+ memcpy(m_Value, UMIDBase, 10);
+
+ // Correct to v5 dictionary for new (330M-2003) types
+ if( Type > 4 )
+ m_Value[7] = 5;
+
+ // Set the type
+ m_Value[10] = Type;
+
+ // We are using a GUID for material number, and no defined instance method
+ m_Value[11] = 0x20;
+
+ // Length of UMID "Value" is 19 bytes
+ m_Value[12] = 0x13;
+
+ // Set instance number to zero as this is the first instance of this material
+ m_Value[13] = m_Value[14] = m_Value[15] = 0;
+
+ memcpy(&m_Value[16], AssetID.Value(), AssetID.Size());
+}
+
+
+// Write the timestamp value to the given buffer in the form 2004-05-01 13:20:00.000
+// returns 0 if the buffer is smaller than DateTimeLen
+const char*
+ASDCP::UMID::ToString(char* str_buf) const
+{
+ assert(str_buf);
+
+ snprintf(str_buf, IdentBufferLen, "[%02x%02x%02x%02x.%02x%02x.%02x%02x.%02x%02x%02x%02x],%02x,%02x,%02x,%02x,",
+ m_Value[0], m_Value[1], m_Value[2], m_Value[3], m_Value[4], m_Value[5], m_Value[6], m_Value[7],
+ m_Value[8], m_Value[9], m_Value[10], m_Value[11], m_Value[12], m_Value[13], m_Value[14], m_Value[15]
+ );
+
+ ui32_t offset = strlen(str_buf);
+
+ if ( ( m_Value[8] & 0x80 ) == 0 )
+ {
+ // half-swapped UL, use [bbaa9988.ddcc.ffee.00010203.04050607]
+ snprintf(str_buf + offset, IdentBufferLen - offset,
+ "[%02x%02x%02x%02x.%02x%02x.%02x%02x.%02x%02x%02x%02x.%02x%02x%02x%02x]",
+ m_Value[24], m_Value[25], m_Value[26], m_Value[27], m_Value[28], m_Value[29], m_Value[30], m_Value[31],
+ m_Value[16], m_Value[17], m_Value[18], m_Value[19], m_Value[20], m_Value[21], m_Value[22], m_Value[23]
+ );
+ }
+ else
+ {
+ // UUID, use {00112233-4455-6677-8899-aabbccddeeff}
+ snprintf(str_buf + offset, IdentBufferLen - offset,
+ "{%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
+ m_Value[16], m_Value[17], m_Value[18], m_Value[19], m_Value[20], m_Value[21], m_Value[22], m_Value[23],
+ m_Value[24], m_Value[25], m_Value[26], m_Value[27], m_Value[28], m_Value[29], m_Value[30], m_Value[31]
+ );
+ }
+
+ return str_buf;
+}
+
+//
+void
+ASDCP::UUID::GenRandomValue()
+{
+ FortunaRNG RNG;
+ RNG.FillRandom(m_Value, UUIDlen);
+ m_Value[6] &= 0x0f; // clear bits 4-7
+ m_Value[6] |= 0x40; // set UUID version
+ m_Value[8] &= 0x3f; // clear bits 6&7
+ m_Value[8] |= 0x80; // set bit 7
+}
+
+
+//------------------------------------------------------------------------------------------
+//
+
+const ASDCP::MXF::UTF16String&
+ASDCP::MXF::UTF16String::operator=(const char* sz)
+{
+ if ( sz == 0 || *sz == 0 )
+ {
+ m_length = 0;
+ *m_buffer = 0;
+ }
+ else
+ {
+ ui32_t len = xmin((ui32_t)strlen(sz), (IdentBufferLen - 1));
+ m_length = len;
+ memcpy(m_buffer, sz, m_length);
+ m_buffer[m_length] = 0;
+ }
+
+ return *this;
+}
+
+
//
ASDCP::Result_t
-ASDCP::MXF::UTF16String::ReadFrom(ASDCP::MemIOReader& Reader)
+ASDCP::MXF::UTF16String::Unarchive(ASDCP::MemIOReader& Reader)
{
const byte_t* p = Reader.Data() + Reader.Offset();
/// cheating - for all use cases, we know the previous two bytes are the length
@@ -57,7 +174,7 @@ ASDCP::MXF::UTF16String::ReadFrom(ASDCP::MemIOReader& Reader)
//
ASDCP::Result_t
-ASDCP::MXF::UTF16String::WriteTo(ASDCP::MemIOWriter& Writer)
+ASDCP::MXF::UTF16String::Archive(ASDCP::MemIOWriter& Writer)
{
byte_t* p = Writer.Data() + Writer.Size();
ui32_t i = 0;
@@ -67,9 +184,7 @@ ASDCP::MXF::UTF16String::WriteTo(ASDCP::MemIOWriter& Writer)
for ( i = 0; i < m_length; i++ )
p[(i*2)+1] = m_buffer[i];
- m_buffer[i] = 0;
-
- Writer.AddOffset(m_length*2);
+ Writer.AddOffset(m_length * 2 );
return RESULT_OK;
}
@@ -77,6 +192,242 @@ ASDCP::MXF::UTF16String::WriteTo(ASDCP::MemIOWriter& Writer)
//------------------------------------------------------------------------------------------
//
+#ifdef WIN32
+
+#define TIMESTAMP_TO_SYSTIME(ts, t) \
+ (t)->wYear = (ts).Year; /* year */ \
+ (t)->wMonth = (ts).Month; /* month of year (1 - 12) */ \
+ (t)->wDay = (ts).Day; /* day of month (1 - 31) */ \
+ (t)->wHour = (ts).Hour; /* hours (0 - 23) */ \
+ (t)->wMinute = (ts).Minute; /* minutes (0 - 59) */ \
+ (t)->wSecond = (ts).Second; /* seconds (0 - 60) */ \
+ (t)->wDayOfWeek = 0; \
+ (t)->wMilliseconds = ((ts).Tick * 4);
+
+#define SYSTIME_TO_TIMESTAMP(t, ts) \
+ (ts).Year = (t)->wYear; /* year */ \
+ (ts).Month = (t)->wMonth; /* month of year (1 - 12) */ \
+ (ts).Day = (t)->wDay; /* day of month (1 - 31) */ \
+ (ts).Hour = (t)->wHour; /* hours (0 - 23) */ \
+ (ts).Minute = (t)->wMinute; /* minutes (0 - 59) */ \
+ (ts).Second = (t)->wSecond; /* seconds (0 - 60) */ \
+ (ts).Tick = (t)->wMilliseconds / 4;
+
+//
+ASDCP::MXF::Timestamp::Timestamp() :
+ Year(0), Month(0), Day(0), Hour(0), Minute(0), Second(0), Tick(0)
+{
+ SYSTEMTIME sys_time;
+ GetSystemTime(&sys_time);
+ SYSTIME_TO_TIMESTAMP(&sys_time, *this);
+}
+
+//
+bool
+ASDCP::MXF::Timestamp::operator<(const Timestamp& rhs) const
+{
+ SYSTEMTIME lhst, rhst;
+ FILETIME lft, rft;
+
+ TIMESTAMP_TO_SYSTIME(*this, &lhst);
+ TIMESTAMP_TO_SYSTIME(rhs, &rhst);
+ SystemTimeToFileTime(&lhst, &lft);
+ SystemTimeToFileTime(&rhst, &rft);
+ return ( CompareFileTime(&lft, &rft) == -1 );
+}
+
+inline ui64_t
+seconds_to_ns100(ui32_t seconds)
+{
+ return ((ui64_t)seconds * 10000000);
+}
+
+//
+void
+ASDCP::MXF::Timestamp::AddDays(i32_t days)
+{
+ SYSTEMTIME current_st;
+ FILETIME current_ft;
+ ULARGE_INTEGER current_ul;
+
+ if ( days != 0 )
+ {
+ TIMESTAMP_TO_SYSTIME(*this, &current_st);
+ SystemTimeToFileTime(&current_st, &current_ft);
+ memcpy(&current_ul, &current_ft, sizeof(current_ul));
+ current_ul.QuadPart += ( seconds_to_ns100(86400) * (ui64_t)days );
+ memcpy(&current_ft, &current_ul, sizeof(current_ft));
+ FileTimeToSystemTime(&current_ft, &current_st);
+ SYSTIME_TO_TIMESTAMP(&current_st, *this);
+ }
+}
+
+//
+void
+ASDCP::MXF::Timestamp::AddHours(i32_t hours)
+{
+ SYSTEMTIME current_st;
+ FILETIME current_ft;
+ ULARGE_INTEGER current_ul;
+
+ if ( hours != 0 )
+ {
+ TIMESTAMP_TO_SYSTIME(*this, &current_st);
+ SystemTimeToFileTime(&current_st, &current_ft);
+ memcpy(&current_ul, &current_ft, sizeof(current_ul));
+ current_ul.QuadPart += ( seconds_to_ns100(3600) * (ui64_t)hours );
+ memcpy(&current_ft, &current_ul, sizeof(current_ft));
+ FileTimeToSystemTime(&current_ft, &current_st);
+ SYSTIME_TO_TIMESTAMP(&current_st, *this);
+ }
+}
+
+#else // WM_WIN32
+
+#include <time.h>
+
+#define TIMESTAMP_TO_TM(ts, t) \
+ (t)->tm_year = (ts).Year - 1900; /* year - 1900 */ \
+ (t)->tm_mon = (ts).Month - 1; /* month of year (0 - 11) */ \
+ (t)->tm_mday = (ts).Day; /* day of month (1 - 31) */ \
+ (t)->tm_hour = (ts).Hour; /* hours (0 - 23) */ \
+ (t)->tm_min = (ts).Minute; /* minutes (0 - 59) */ \
+ (t)->tm_sec = (ts).Second; /* seconds (0 - 60) */
+
+#define TM_TO_TIMESTAMP(t, ts) \
+ (ts).Year = (t)->tm_year + 1900; /* year - 1900 */ \
+ (ts).Month = (t)->tm_mon + 1; /* month of year (0 - 11) */ \
+ (ts).Day = (t)->tm_mday; /* day of month (1 - 31) */ \
+ (ts).Hour = (t)->tm_hour; /* hours (0 - 23) */ \
+ (ts).Minute = (t)->tm_min; /* minutes (0 - 59) */ \
+ (ts).Second = (t)->tm_sec; /* seconds (0 - 60) */
+
+//
+ASDCP::MXF::Timestamp::Timestamp() :
+ Year(0), Month(0), Day(0), Hour(0), Minute(0), Second(0)
+{
+ time_t t_now = time(0);
+ struct tm* now = gmtime(&t_now);
+ TM_TO_TIMESTAMP(now, *this);
+}
+
+//
+bool
+ASDCP::MXF::Timestamp::operator<(const Timestamp& rhs) const
+{
+ struct tm lhtm, rhtm;
+ TIMESTAMP_TO_TM(*this, &lhtm);
+ TIMESTAMP_TO_TM(rhs, &rhtm);
+ return ( timegm(&lhtm) < timegm(&rhtm) );
+}
+
+//
+void
+ASDCP::MXF::Timestamp::AddDays(i32_t days)
+{
+ struct tm current;
+
+ if ( days != 0 )
+ {
+ TIMESTAMP_TO_TM(*this, &current);
+ time_t adj_time = timegm(&current);
+ adj_time += 86400 * days;
+ struct tm* now = gmtime(&adj_time);
+ TM_TO_TIMESTAMP(now, *this);
+ }
+}
+
+//
+void
+ASDCP::MXF::Timestamp::AddHours(i32_t hours)
+{
+ struct tm current;
+
+ if ( hours != 0 )
+ {
+ TIMESTAMP_TO_TM(*this, &current);
+ time_t adj_time = timegm(&current);
+ adj_time += 3600 * hours;
+ struct tm* now = gmtime(&adj_time);
+ TM_TO_TIMESTAMP(now, *this);
+ }
+}
+
+#endif // WM_WIN32
+
+
+ASDCP::MXF::Timestamp::Timestamp(const Timestamp& rhs)
+{
+ Year = rhs.Year;
+ Month = rhs.Month;
+ Day = rhs.Day;
+ Hour = rhs.Hour;
+ Minute = rhs.Minute;
+ Second = rhs.Second;
+}
+
+ASDCP::MXF::Timestamp::~Timestamp()
+{
+}
+
+//
+const ASDCP::MXF::Timestamp&
+ASDCP::MXF::Timestamp::operator=(const Timestamp& rhs)
+{
+ Year = rhs.Year;
+ Month = rhs.Month;
+ Day = rhs.Day;
+ Hour = rhs.Hour;
+ Minute = rhs.Minute;
+ Second = rhs.Second;
+ return *this;
+}
+
+//
+bool
+ASDCP::MXF::Timestamp::operator==(const Timestamp& rhs) const
+{
+ if ( Year == rhs.Year
+ && Month == rhs.Month
+ && Day == rhs.Day
+ && Hour == rhs.Hour
+ && Minute == rhs.Minute
+ && Second == rhs.Second )
+ return true;
+
+ return false;
+}
+
+//
+bool
+ASDCP::MXF::Timestamp::operator!=(const Timestamp& rhs) const
+{
+ if ( Year != rhs.Year
+ || Month != rhs.Month
+ || Day != rhs.Day
+ || Hour != rhs.Hour
+ || Minute != rhs.Minute
+ || Second != rhs.Second )
+ return true;
+
+ return false;
+}
+
+//
+const char*
+ASDCP::MXF::Timestamp::ToString(char* str_buf) const
+{
+ // 2004-05-01 13:20:00.000
+ snprintf(str_buf, IntBufferLen,
+ "%04hu-%02hu-%02hu %02hu:%02hu:%02hu.000",
+ Year, Month, Day, Hour, Minute, Second, Tick);
+
+ return str_buf;
+}
+
+//------------------------------------------------------------------------------------------
+//
+
ASDCP::MXF::TLVReader::TLVReader(const byte_t* p, ui32_t c, IPrimerLookup* PrimerLookup) :
MemIOReader(p, c), m_Lookup(PrimerLookup)
{
@@ -116,7 +467,7 @@ ASDCP::MXF::TLVReader::FindTL(const MDDEntry& Entry)
{
if ( m_Lookup == 0 )
{
- fprintf(stderr, "No Lookup service\n");
+ DefaultLogSink().Error("No Lookup service\n");
return false;
}
@@ -154,7 +505,7 @@ ASDCP::MXF::TLVReader::ReadObject(const MDDEntry& Entry, IArchive* Object)
ASDCP_TEST_NULL(Object);
if ( FindTL(Entry) )
- return Object->ReadFrom(*this);
+ return Object->Unarchive(*this);
return RESULT_FALSE;
}
@@ -220,15 +571,15 @@ ASDCP::MXF::TLVWriter::TLVWriter(byte_t* p, ui32_t c, IPrimerLookup* PrimerLooku
ASDCP::Result_t
ASDCP::MXF::TLVWriter::WriteTag(const MDDEntry& Entry)
{
- TagValue TmpTag;
-
if ( m_Lookup == 0 )
{
DefaultLogSink().Error("No Primer object available\n");
return RESULT_FAIL;
}
- if ( m_Lookup->InsertTag(Entry.ul, TmpTag) != RESULT_OK )
+ TagValue TmpTag;
+
+ if ( m_Lookup->InsertTag(Entry, TmpTag) != RESULT_OK )
{
DefaultLogSink().Error("No tag for entry %s\n", Entry.name);
return RESULT_FAIL;
@@ -256,7 +607,7 @@ ASDCP::MXF::TLVWriter::WriteObject(const MDDEntry& Entry, IArchive* Object)
if ( ASDCP_SUCCESS(result) )
{
ui32_t before = Size();
- result = Object->WriteTo(*this);
+ result = Object->Archive(*this);
if ( ASDCP_SUCCESS(result) )
i2p<ui16_t>(ASDCP_i16_BE( Size() - before), l_p);
@@ -283,7 +634,7 @@ ASDCP::MXF::TLVWriter::WriteUi16(const MDDEntry& Entry, ui16_t* value)
ASDCP_TEST_NULL(value);
Result_t result = WriteTag(Entry);
if ( ASDCP_SUCCESS(result) ) MemIOWriter::WriteUi16BE(sizeof(ui16_t));
- if ( ASDCP_SUCCESS(result) ) MemIOWriter::WriteUi8(*value);
+ if ( ASDCP_SUCCESS(result) ) MemIOWriter::WriteUi16BE(*value);
return result;
}
@@ -294,7 +645,7 @@ ASDCP::MXF::TLVWriter::WriteUi32(const MDDEntry& Entry, ui32_t* value)
ASDCP_TEST_NULL(value);
Result_t result = WriteTag(Entry);
if ( ASDCP_SUCCESS(result) ) MemIOWriter::WriteUi16BE(sizeof(ui32_t));
- if ( ASDCP_SUCCESS(result) ) MemIOWriter::WriteUi8(*value);
+ if ( ASDCP_SUCCESS(result) ) MemIOWriter::WriteUi32BE(*value);
return result;
}
@@ -305,10 +656,10 @@ ASDCP::MXF::TLVWriter::WriteUi64(const MDDEntry& Entry, ui64_t* value)
ASDCP_TEST_NULL(value);
Result_t result = WriteTag(Entry);
if ( ASDCP_SUCCESS(result) ) MemIOWriter::WriteUi16BE(sizeof(ui64_t));
- if ( ASDCP_SUCCESS(result) ) MemIOWriter::WriteUi8(*value);
+ if ( ASDCP_SUCCESS(result) ) MemIOWriter::WriteUi64BE(*value);
return result;
}
//
-// end
+// end MXFTypes.cpp
//
diff --git a/src/MXFTypes.h b/src/MXFTypes.h
index eb26096..d0638b1 100755
--- a/src/MXFTypes.h
+++ b/src/MXFTypes.h
@@ -41,12 +41,9 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// used with TLVReader::Read*
//
// these are used below to manufacture arguments
-#define OBJ_READ_ARGS(s,l) s_MDD_Table[MDDindex_##s##_##l], &l
-#define OBJ_READ_ARGS_R(s,l,r) s_MDD_Table[MDDindex_##s##_##l], &r
-
-#define OBJ_WRITE_ARGS(s,l) s_MDD_Table[MDDindex_##s##_##l], &l
-
-#define OBJ_TYPE_ARGS(t) s_MDD_Table[MDDindex_##t].ul
+#define OBJ_READ_ARGS(s,l) Dict::Type(MDD_##s##_##l), &l
+#define OBJ_WRITE_ARGS(s,l) Dict::Type(MDD_##s##_##l), &l
+#define OBJ_TYPE_ARGS(t) Dict::Type(MDD_##t).ul
namespace ASDCP
@@ -108,7 +105,7 @@ namespace ASDCP
~Batch() {}
//
- Result_t ReadFrom(ASDCP::MemIOReader& Reader) {
+ Result_t Unarchive(ASDCP::MemIOReader& Reader) {
Result_t result = Reader.ReadUi32BE(&ItemCount);
if ( ASDCP_SUCCESS(result) )
@@ -120,7 +117,7 @@ namespace ASDCP
for ( ui32_t i = 0; i < ItemCount && ASDCP_SUCCESS(result); i++ )
{
T Tmp;
- result = Tmp.ReadFrom(Reader);
+ result = Tmp.Unarchive(Reader);
if ( ASDCP_SUCCESS(result) )
push_back(Tmp);
@@ -130,7 +127,7 @@ namespace ASDCP
}
//
- Result_t WriteTo(ASDCP::MemIOWriter& Writer) {
+ Result_t Archive(ASDCP::MemIOWriter& Writer) {
Result_t result = Writer.WriteUi32BE(size());
if ( ASDCP_SUCCESS(result) )
@@ -138,7 +135,7 @@ namespace ASDCP
typename std::vector<T>::iterator l_i = begin();
for ( ; l_i != end() && ASDCP_SUCCESS(result); l_i++ )
- result = (*l_i).WriteTo(Writer);
+ result = (*l_i).Archive(Writer);
return result;
}
@@ -166,12 +163,12 @@ namespace ASDCP
~Array() {}
//
- Result_t ReadFrom(ASDCP::MemIOReader& Reader)
+ Result_t Unarchive(ASDCP::MemIOReader& Reader)
{
while ( Reader.Remainder() > 0 )
{
T Tmp;
- Tmp.ReadFrom(Reader);
+ Tmp.Unarchive(Reader);
push_back(Tmp);
}
@@ -179,12 +176,12 @@ namespace ASDCP
}
//
- Result_t WriteTo(ASDCP::MemIOWriter& Writer) {
+ Result_t Archive(ASDCP::MemIOWriter& Writer) {
Result_t result = RESULT_OK;
typename std::list<T>::iterator l_i = begin();
for ( ; l_i != end() && ASDCP_SUCCESS(result); l_i++ )
- result = (*l_i).WriteTo(Writer);
+ result = (*l_i).Archive(Writer);
return result;
}
@@ -213,22 +210,32 @@ namespace ASDCP
ui8_t Hour;
ui8_t Minute;
ui8_t Second;
- ui8_t mSec_4;
+ ui8_t Tick;
- Timestamp() :
- Year(0), Month(0), Day(0),
- Hour(0), Minute(0), Second(0), mSec_4(0) {}
+ Timestamp();
+ Timestamp(const Timestamp& rhs);
+ Timestamp(const char* datestr);
+ virtual ~Timestamp();
- //
- inline const char* ToString(char* str_buf) const {
- snprintf(str_buf, IdentBufferLen,
- "%04hu-%02hu-%02hu %02hu:%02hu:%02hu.%03hu",
- Year, Month, Day, Hour, Minute, Second, mSec_4);
- return str_buf;
- }
+ const Timestamp& operator=(const Timestamp& rhs);
+ bool operator<(const Timestamp& rhs) const;
+ bool operator==(const Timestamp& rhs) const;
+ bool operator!=(const Timestamp& rhs) const;
+
+ // decode and set value from string formatted by EncodeAsString
+ Result_t SetFromString(const char* datestr);
+
+ // add the given number of days or hours to the timestamp value. Values less than zero
+ // will cause the value to decrease
+ void AddDays(i32_t);
+ void AddHours(i32_t);
+
+ // Write the timestamp value to the given buffer in the form 2004-05-01 13:20:00.000
+ // returns 0 if the buffer is smaller than DateTimeLen
+ const char* ToString(char* str_buf) const;
//
- inline Result_t ReadFrom(ASDCP::MemIOReader& Reader) {
+ inline Result_t Unarchive(ASDCP::MemIOReader& Reader) {
Result_t result = Reader.ReadUi16BE(&Year);
if ( ASDCP_SUCCESS(result) )
@@ -238,7 +245,7 @@ namespace ASDCP
}
//
- inline Result_t WriteTo(ASDCP::MemIOWriter& Writer) {
+ inline Result_t Archive(ASDCP::MemIOWriter& Writer) {
Result_t result = Writer.WriteUi16BE(Year);
if ( ASDCP_SUCCESS(result) )
@@ -258,14 +265,16 @@ namespace ASDCP
UTF16String() : m_length(0) { *m_buffer = 0; }
~UTF16String() {}
+ const UTF16String& operator=(const char*);
+
//
const char* ToString(char* str_buf) const {
strncpy(str_buf, m_buffer, m_length+1);
return str_buf;
}
- Result_t ReadFrom(ASDCP::MemIOReader& Reader);
- Result_t WriteTo(ASDCP::MemIOWriter& Writer);
+ Result_t Unarchive(ASDCP::MemIOReader& Reader);
+ Result_t Archive(ASDCP::MemIOWriter& Writer);
};
//
@@ -275,13 +284,35 @@ namespace ASDCP
Rational() {}
~Rational() {}
+ Rational(const Rational& rhs) {
+ Numerator = rhs.Numerator;
+ Denominator = rhs.Denominator;
+ }
+
+ const Rational& operator=(const Rational& rhs) {
+ Numerator = rhs.Numerator;
+ Denominator = rhs.Denominator;
+ return *this;
+ }
+
+ Rational(const ASDCP::Rational& rhs) {
+ Numerator = rhs.Numerator;
+ Denominator = rhs.Denominator;
+ }
+
+ const Rational& operator=(const ASDCP::Rational& rhs) {
+ Numerator = rhs.Numerator;
+ Denominator = rhs.Denominator;
+ return *this;
+ }
+
//
const char* ToString(char* str_buf) const {
snprintf(str_buf, IdentBufferLen, "%lu/%lu", Numerator, Denominator);
return str_buf;
}
- Result_t ReadFrom(ASDCP::MemIOReader& Reader) {
+ Result_t Unarchive(ASDCP::MemIOReader& Reader) {
Result_t result = Reader.ReadUi32BE((ui32_t*)&Numerator);
if ( ASDCP_SUCCESS(result) )
@@ -290,7 +321,7 @@ namespace ASDCP
return result;
}
- Result_t WriteTo(ASDCP::MemIOWriter& Writer) {
+ Result_t Archive(ASDCP::MemIOWriter& Writer) {
Result_t result = Writer.WriteUi32BE((ui32_t)Numerator);
if ( ASDCP_SUCCESS(result) )
@@ -300,6 +331,91 @@ namespace ASDCP
}
};
+ //
+ class VersionType : public IArchive
+ {
+ ASDCP_NO_COPY_CONSTRUCT(VersionType);
+
+ public:
+ enum Release_t { RL_UNKNOWN, RM_RELEASE, RL_DEVELOPMENT, RL_PATCHED, RL_BETA, RL_PRIVATE };
+ ui16_t Major;
+ ui16_t Minor;
+ ui16_t Patch;
+ ui16_t Build;
+ ui16_t Release;
+
+ VersionType() : Major(0), Minor(0), Patch(0), Build(0), Release(RL_UNKNOWN) {}
+ ~VersionType() {}
+ void Dump(FILE* = 0);
+
+ const char* ToString(char* str_buf) const {
+ snprintf(str_buf, IdentBufferLen, "%hu.%hu.%hu.%hu.%hu", Major, Minor, Patch, Build, Release);
+ return str_buf;
+ }
+
+ Result_t Unarchive(ASDCP::MemIOReader& Reader) {
+ Result_t result = Reader.ReadUi16BE(&Major);
+ if ( ASDCP_SUCCESS(result) ) result = Reader.ReadUi16BE(&Minor);
+ if ( ASDCP_SUCCESS(result) ) result = Reader.ReadUi16BE(&Patch);
+ if ( ASDCP_SUCCESS(result) ) result = Reader.ReadUi16BE(&Build);
+ if ( ASDCP_SUCCESS(result) )
+ {
+ ui16_t tmp_release;
+ result = Reader.ReadUi16BE(&tmp_release);
+ Release = (Release_t)tmp_release;
+ }
+
+ return result;
+ }
+
+ Result_t Archive(ASDCP::MemIOWriter& Writer) {
+ Result_t result = Writer.WriteUi32BE(Major);
+ if ( ASDCP_SUCCESS(result) ) result = Writer.WriteUi32BE(Minor);
+ if ( ASDCP_SUCCESS(result) ) result = Writer.WriteUi32BE(Patch);
+ if ( ASDCP_SUCCESS(result) ) result = Writer.WriteUi32BE(Build);
+ if ( ASDCP_SUCCESS(result) ) result = Writer.WriteUi32BE((ui16_t)(Release & 0x0000ffffL));
+ return result;
+ }
+ };
+
+ //
+ class RGBLayout : public IArchive
+ {
+ public:
+ struct element {
+ ui8_t Code;
+ ui8_t Depth;
+ } PictureElement[8];
+ RGBLayout() { memset(PictureElement, 0, sizeof(PictureElement)); }
+
+ //
+ Result_t Unarchive(ASDCP::MemIOReader& Reader) { return RESULT_OK; }
+ Result_t Archive(ASDCP::MemIOWriter& Writer) { return RESULT_OK; }
+ inline const char* ToString(char* str_buf) const {
+ snprintf(str_buf, IdentBufferLen, "RGBLayout: <PictureElement[8]>\n");
+ return str_buf;
+ }
+ };
+
+ //
+ class Raw : public IArchive
+ {
+ ASDCP_NO_COPY_CONSTRUCT(Raw);
+
+ public:
+ byte_t* data;
+ Raw() {}
+ ~Raw() {}
+
+ //
+ Result_t Unarchive(ASDCP::MemIOReader& Reader) { return RESULT_OK; }
+ Result_t Archive(ASDCP::MemIOWriter& Writer) { return RESULT_OK; }
+ inline const char* ToString(char* str_buf) const {
+ snprintf(str_buf, IdentBufferLen, "RAW\n");
+ return str_buf;
+ }
+ };
+
} // namespace MXF
} // namespace ASDCP
diff --git a/src/Metadata.cpp b/src/Metadata.cpp
index b597303..00bf99e 100755
--- a/src/Metadata.cpp
+++ b/src/Metadata.cpp
@@ -31,10 +31,10 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "Metadata.h"
-#include "MDD.h"
#include "Mutex.h"
#include "hex_utils.h"
+const ui32_t kl_length = ASDCP::SMPTE_UL_LENGTH + ASDCP::MXF_BER_LENGTH;
//------------------------------------------------------------------------------------------
@@ -45,8 +45,10 @@ enum FLT_t
FLT_IndexTableSegment,
FLT_Identification,
FLT_ContentStorage,
+ FLT_EssenceContainerData,
FLT_MaterialPackage,
FLT_SourcePackage,
+ FLT_StaticTrack,
FLT_Track,
FLT_Sequence,
FLT_SourceClip,
@@ -59,6 +61,7 @@ enum FLT_t
FLT_JPEG2000PictureSubDescriptor,
FLT_CDCIEssenceDescriptor,
FLT_MPEG2VideoDescriptor,
+ FLT_DMSegment,
FLT_CryptographicFramework,
FLT_CryptographicContext,
};
@@ -103,26 +106,29 @@ ASDCP::MXF::CreateObject(const byte_t* label)
if ( s_FactoryList.empty() )
{
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_Preface].ul, FLT_Preface));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_IndexTableSegment].ul, FLT_IndexTableSegment));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_Identification].ul, FLT_Identification));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_ContentStorage].ul, FLT_ContentStorage));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_MaterialPackage].ul, FLT_MaterialPackage));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_SourcePackage].ul, FLT_SourcePackage));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_Track].ul, FLT_Track));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_Sequence].ul, FLT_Sequence));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_SourceClip].ul, FLT_SourceClip));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_TimecodeComponent].ul, FLT_TimecodeComponent));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_FileDescriptor].ul, FLT_FileDescriptor));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_GenericSoundEssenceDescriptor].ul, FLT_GenericSoundEssenceDescriptor));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_WaveAudioDescriptor].ul, FLT_WaveAudioDescriptor));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_GenericPictureEssenceDescriptor].ul, FLT_GenericPictureEssenceDescriptor));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_RGBAEssenceDescriptor].ul, FLT_RGBAEssenceDescriptor));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_JPEG2000PictureSubDescriptor].ul, FLT_JPEG2000PictureSubDescriptor));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_CDCIEssenceDescriptor].ul, FLT_CDCIEssenceDescriptor));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_MPEG2VideoDescriptor].ul, FLT_MPEG2VideoDescriptor));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_CryptographicFramework].ul, FLT_CryptographicFramework));
- s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_CryptographicContext].ul, FLT_CryptographicContext));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_Preface), FLT_Preface));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_IndexTableSegment), FLT_IndexTableSegment));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_Identification), FLT_Identification));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_ContentStorage), FLT_ContentStorage));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_EssenceContainerData), FLT_EssenceContainerData));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_MaterialPackage), FLT_MaterialPackage));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_SourcePackage), FLT_SourcePackage));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_StaticTrack), FLT_StaticTrack));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_Track), FLT_Track));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_Sequence), FLT_Sequence));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_SourceClip), FLT_SourceClip));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_TimecodeComponent), FLT_TimecodeComponent));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_FileDescriptor), FLT_FileDescriptor));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_GenericSoundEssenceDescriptor), FLT_GenericSoundEssenceDescriptor));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_WaveAudioDescriptor), FLT_WaveAudioDescriptor));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_GenericPictureEssenceDescriptor), FLT_GenericPictureEssenceDescriptor));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_RGBAEssenceDescriptor), FLT_RGBAEssenceDescriptor));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_JPEG2000PictureSubDescriptor), FLT_JPEG2000PictureSubDescriptor));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_CDCIEssenceDescriptor), FLT_CDCIEssenceDescriptor));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_MPEG2VideoDescriptor), FLT_MPEG2VideoDescriptor));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_DMSegment), FLT_DMSegment));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_CryptographicFramework), FLT_CryptographicFramework));
+ s_FactoryList.insert(FactoryList::value_type(Dict::ul(MDD_CryptographicContext), FLT_CryptographicContext));
}
FLi_t i = s_FactoryList.find(label);
@@ -136,8 +142,10 @@ ASDCP::MXF::CreateObject(const byte_t* label)
case FLT_IndexTableSegment: return new IndexTableSegment;
case FLT_Identification: return new Identification;
case FLT_ContentStorage: return new ContentStorage;
+ case FLT_EssenceContainerData: return new EssenceContainerData;
case FLT_MaterialPackage: return new MaterialPackage;
case FLT_SourcePackage: return new SourcePackage;
+ case FLT_StaticTrack: return new StaticTrack;
case FLT_Track: return new Track;
case FLT_Sequence: return new Sequence;
case FLT_SourceClip: return new SourceClip;
@@ -150,11 +158,12 @@ ASDCP::MXF::CreateObject(const byte_t* label)
case FLT_JPEG2000PictureSubDescriptor: return new JPEG2000PictureSubDescriptor;
case FLT_CDCIEssenceDescriptor: return new CDCIEssenceDescriptor;
case FLT_MPEG2VideoDescriptor: return new MPEG2VideoDescriptor;
+ case FLT_DMSegment: return new DMSegment;
case FLT_CryptographicFramework: return new CryptographicFramework;
case FLT_CryptographicContext: return new CryptographicContext;
}
-
- return new InterchangeObject;
+
+ return 0;
}
@@ -174,16 +183,33 @@ ASDCP::MXF::Identification::InitFromTLVSet(TLVReader& TLVSet)
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(Identification, ThisGenerationUID));
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(Identification, CompanyName));
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(Identification, ProductName));
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi16(OBJ_READ_ARGS(Identification, ProductVersion));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(Identification, ProductVersion));
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(Identification, VersionString));
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(Identification, ProductUID));
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(Identification, ModificationDate));
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi16(OBJ_READ_ARGS(Identification, ToolkitVersion));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(Identification, ToolkitVersion));
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(Identification, Platform));
return result;
}
//
+ASDCP::Result_t
+ASDCP::MXF::Identification::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = InterchangeObject::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Identification, ThisGenerationUID));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Identification, CompanyName));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Identification, ProductName));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Identification, ProductVersion));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Identification, VersionString));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Identification, ProductUID));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Identification, ModificationDate));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Identification, ToolkitVersion));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Identification, Platform));
+ return result;
+}
+
+//
void
ASDCP::MXF::Identification::Dump(FILE* stream)
{
@@ -197,11 +223,11 @@ ASDCP::MXF::Identification::Dump(FILE* stream)
fprintf(stream, " %22s = %s\n", "ThisGenerationUID", ThisGenerationUID.ToString(identbuf));
fprintf(stream, " %22s = %s\n", "CompanyName", CompanyName.ToString(identbuf));
fprintf(stream, " %22s = %s\n", "ProductName", ProductName.ToString(identbuf));
- fprintf(stream, " %22s = %d\n", "ProductVersion", ProductVersion);
+ fprintf(stream, " %22s = %s\n", "ProductVersion", ProductVersion.ToString(identbuf));
fprintf(stream, " %22s = %s\n", "VersionString", VersionString.ToString(identbuf));
fprintf(stream, " %22s = %s\n", "ProductUID", ProductUID.ToString(identbuf));
fprintf(stream, " %22s = %s\n", "ModificationDate", ModificationDate.ToString(identbuf));
- fprintf(stream, " %22s = %d\n", "ToolkitVersion", ToolkitVersion);
+ fprintf(stream, " %22s = %s\n", "ToolkitVersion", ToolkitVersion.ToString(identbuf));
fprintf(stream, " %22s = %s\n", "Platform", Platform.ToString(identbuf));
}
@@ -209,24 +235,16 @@ ASDCP::MXF::Identification::Dump(FILE* stream)
ASDCP::Result_t
ASDCP::MXF::Identification::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_Identification].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
-
- return result;
+ m_Typeinfo = &Dict::Type(MDD_Identification);
+ return InterchangeObject::InitFromBuffer(p, l);
}
//
ASDCP::Result_t
ASDCP::MXF::Identification::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_Identification].ul, 0);
+ m_Typeinfo = &Dict::Type(MDD_Identification);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//------------------------------------------------------------------------------------------
@@ -243,6 +261,16 @@ ASDCP::MXF::ContentStorage::InitFromTLVSet(TLVReader& TLVSet)
}
//
+ASDCP::Result_t
+ASDCP::MXF::ContentStorage::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = InterchangeObject::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(ContentStorage, Packages));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(ContentStorage, EssenceContainerData));
+ return result;
+}
+
+//
void
ASDCP::MXF::ContentStorage::Dump(FILE* stream)
{
@@ -253,9 +281,9 @@ ASDCP::MXF::ContentStorage::Dump(FILE* stream)
stream = stderr;
InterchangeObject::Dump(stream);
- fprintf(stream, " %s:\n", "Packages");
+ fprintf(stream, " %22s:\n", "Packages");
Packages.Dump(stream);
- fprintf(stream, " %s:\n", "EssenceContainerData");
+ fprintf(stream, " %22s:\n", "EssenceContainerData");
EssenceContainerData.Dump(stream);
}
@@ -263,24 +291,73 @@ ASDCP::MXF::ContentStorage::Dump(FILE* stream)
ASDCP::Result_t
ASDCP::MXF::ContentStorage::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
+ m_Typeinfo = &Dict::Type(MDD_ContentStorage);
+ return InterchangeObject::InitFromBuffer(p, l);
+}
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_ContentStorage].ul);
+//
+ASDCP::Result_t
+ASDCP::MXF::ContentStorage::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
+{
+ m_Typeinfo = &Dict::Type(MDD_ContentStorage);
+ return InterchangeObject::WriteToBuffer(Buffer);
+}
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
+//------------------------------------------------------------------------------------------
+// EssenceContainerData
+//
+ASDCP::Result_t
+ASDCP::MXF::EssenceContainerData::InitFromTLVSet(TLVReader& TLVSet)
+{
+ Result_t result = InterchangeObject::InitFromTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(EssenceContainerData, LinkedPackageUID));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi32(OBJ_READ_ARGS(EssenceContainerData, IndexSID));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi32(OBJ_READ_ARGS(EssenceContainerData, BodySID));
return result;
}
//
ASDCP::Result_t
-ASDCP::MXF::ContentStorage::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
+ASDCP::MXF::EssenceContainerData::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = InterchangeObject::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(EssenceContainerData, LinkedPackageUID));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(EssenceContainerData, IndexSID));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(EssenceContainerData, BodySID));
+ return result;
+}
+
+//
+void
+ASDCP::MXF::EssenceContainerData::Dump(FILE* stream)
+{
+ char identbuf[IdentBufferLen];
+ *identbuf = 0;
+
+ if ( stream == 0 )
+ stream = stderr;
+
+ InterchangeObject::Dump(stream);
+ fprintf(stream, " %22s = %s\n", "LinkedPackageUID", LinkedPackageUID.ToString(identbuf));
+ fprintf(stream, " %22s = %d\n", "IndexSID", IndexSID);
+ fprintf(stream, " %22s = %d\n", "BodySID", BodySID);
+}
+
+//
+ASDCP::Result_t
+ASDCP::MXF::EssenceContainerData::InitFromBuffer(const byte_t* p, ui32_t l)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_ContentStorage].ul, 0);
+ m_Typeinfo = &Dict::Type(MDD_EssenceContainerData);
+ return InterchangeObject::InitFromBuffer(p, l);
+}
+
+//
+ASDCP::Result_t
+ASDCP::MXF::EssenceContainerData::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
+{
+ m_Typeinfo = &Dict::Type(MDD_EssenceContainerData);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//------------------------------------------------------------------------------------------
@@ -300,6 +377,19 @@ ASDCP::MXF::GenericPackage::InitFromTLVSet(TLVReader& TLVSet)
}
//
+ASDCP::Result_t
+ASDCP::MXF::GenericPackage::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = InterchangeObject::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(GenericPackage, PackageUID));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(GenericPackage, Name));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(GenericPackage, PackageCreationDate));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(GenericPackage, PackageModifiedDate));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(GenericPackage, Tracks));
+ return result;
+}
+
+//
void
ASDCP::MXF::GenericPackage::Dump(FILE* stream)
{
@@ -314,7 +404,7 @@ ASDCP::MXF::GenericPackage::Dump(FILE* stream)
fprintf(stream, " %22s = %s\n", "Name", Name.ToString(identbuf));
fprintf(stream, " %22s = %s\n", "PackageCreationDate", PackageCreationDate.ToString(identbuf));
fprintf(stream, " %22s = %s\n", "PackageModifiedDate", PackageModifiedDate.ToString(identbuf));
- fprintf(stream, " %s:\n", "Tracks");
+ fprintf(stream, " %22s:\n", "Tracks");
Tracks.Dump(stream);
}
@@ -331,6 +421,14 @@ ASDCP::MXF::MaterialPackage::InitFromTLVSet(TLVReader& TLVSet)
}
//
+ASDCP::Result_t
+ASDCP::MXF::MaterialPackage::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = GenericPackage::WriteToTLVSet(TLVSet);
+ return result;
+}
+
+//
void
ASDCP::MXF::MaterialPackage::Dump(FILE* stream)
{
@@ -347,24 +445,16 @@ ASDCP::MXF::MaterialPackage::Dump(FILE* stream)
ASDCP::Result_t
ASDCP::MXF::MaterialPackage::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_MaterialPackage].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
-
- return result;
+ m_Typeinfo = &Dict::Type(MDD_MaterialPackage);
+ return InterchangeObject::InitFromBuffer(p, l);
}
//
ASDCP::Result_t
ASDCP::MXF::MaterialPackage::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_MaterialPackage].ul, 0);
+ m_Typeinfo = &Dict::Type(MDD_MaterialPackage);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//------------------------------------------------------------------------------------------
@@ -375,6 +465,16 @@ ASDCP::Result_t
ASDCP::MXF::SourcePackage::InitFromTLVSet(TLVReader& TLVSet)
{
Result_t result = GenericPackage::InitFromTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(SourcePackage, Descriptor));
+ return result;
+}
+
+//
+ASDCP::Result_t
+ASDCP::MXF::SourcePackage::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = GenericPackage::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(SourcePackage, Descriptor));
return result;
}
@@ -389,30 +489,23 @@ ASDCP::MXF::SourcePackage::Dump(FILE* stream)
stream = stderr;
GenericPackage::Dump(stream);
+ fprintf(stream, " %22s = %s\n", "Descriptor", Descriptor.ToString(identbuf));
}
//
ASDCP::Result_t
ASDCP::MXF::SourcePackage::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_SourcePackage].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
-
- return result;
+ m_Typeinfo = &Dict::Type(MDD_SourcePackage);
+ return InterchangeObject::InitFromBuffer(p, l);
}
//
ASDCP::Result_t
ASDCP::MXF::SourcePackage::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_SourcePackage].ul, 0);
+ m_Typeinfo = &Dict::Type(MDD_SourcePackage);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//------------------------------------------------------------------------------------------
@@ -431,6 +524,18 @@ ASDCP::MXF::GenericTrack::InitFromTLVSet(TLVReader& TLVSet)
}
//
+ASDCP::Result_t
+ASDCP::MXF::GenericTrack::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = InterchangeObject::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(GenericTrack, TrackID));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(GenericTrack, TrackNumber));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(GenericTrack, TrackName));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(GenericTrack, Sequence));
+ return result;
+}
+
+//
void
ASDCP::MXF::GenericTrack::Dump(FILE* stream)
{
@@ -449,6 +554,54 @@ ASDCP::MXF::GenericTrack::Dump(FILE* stream)
//------------------------------------------------------------------------------------------
+// StaticTrack
+
+//
+ASDCP::Result_t
+ASDCP::MXF::StaticTrack::InitFromTLVSet(TLVReader& TLVSet)
+{
+ Result_t result = GenericTrack::InitFromTLVSet(TLVSet);
+ return result;
+}
+
+//
+ASDCP::Result_t
+ASDCP::MXF::StaticTrack::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = GenericTrack::WriteToTLVSet(TLVSet);
+ return result;
+}
+
+//
+void
+ASDCP::MXF::StaticTrack::Dump(FILE* stream)
+{
+ char identbuf[IdentBufferLen];
+ *identbuf = 0;
+
+ if ( stream == 0 )
+ stream = stderr;
+
+ GenericTrack::Dump(stream);
+}
+
+//
+ASDCP::Result_t
+ASDCP::MXF::StaticTrack::InitFromBuffer(const byte_t* p, ui32_t l)
+{
+ m_Typeinfo = &Dict::Type(MDD_StaticTrack);
+ return InterchangeObject::InitFromBuffer(p, l);
+}
+
+//
+ASDCP::Result_t
+ASDCP::MXF::StaticTrack::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
+{
+ m_Typeinfo = &Dict::Type(MDD_StaticTrack);
+ return InterchangeObject::WriteToBuffer(Buffer);
+}
+
+//------------------------------------------------------------------------------------------
// Track
//
@@ -462,6 +615,16 @@ ASDCP::MXF::Track::InitFromTLVSet(TLVReader& TLVSet)
}
//
+ASDCP::Result_t
+ASDCP::MXF::Track::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = GenericTrack::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Track, EditRate));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi64(OBJ_WRITE_ARGS(Track, Origin));
+ return result;
+}
+
+//
void
ASDCP::MXF::Track::Dump(FILE* stream)
{
@@ -480,24 +643,16 @@ ASDCP::MXF::Track::Dump(FILE* stream)
ASDCP::Result_t
ASDCP::MXF::Track::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_Track].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
-
- return result;
+ m_Typeinfo = &Dict::Type(MDD_Track);
+ return InterchangeObject::InitFromBuffer(p, l);
}
//
ASDCP::Result_t
ASDCP::MXF::Track::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_Track].ul, 0);
+ m_Typeinfo = &Dict::Type(MDD_Track);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//------------------------------------------------------------------------------------------
@@ -514,6 +669,16 @@ ASDCP::MXF::StructuralComponent::InitFromTLVSet(TLVReader& TLVSet)
}
//
+ASDCP::Result_t
+ASDCP::MXF::StructuralComponent::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = InterchangeObject::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(StructuralComponent, DataDefinition));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi64(OBJ_WRITE_ARGS(StructuralComponent, Duration));
+ return result;
+}
+
+//
void
ASDCP::MXF::StructuralComponent::Dump(FILE* stream)
{
@@ -542,6 +707,15 @@ ASDCP::MXF::Sequence::InitFromTLVSet(TLVReader& TLVSet)
}
//
+ASDCP::Result_t
+ASDCP::MXF::Sequence::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = StructuralComponent::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(Sequence, StructuralComponents));
+ return result;
+}
+
+//
void
ASDCP::MXF::Sequence::Dump(FILE* stream)
{
@@ -552,7 +726,7 @@ ASDCP::MXF::Sequence::Dump(FILE* stream)
stream = stderr;
StructuralComponent::Dump(stream);
- fprintf(stream, " %s:\n", "StructuralComponents");
+ fprintf(stream, " %22s:\n", "StructuralComponents");
StructuralComponents.Dump(stream);
}
@@ -560,24 +734,16 @@ ASDCP::MXF::Sequence::Dump(FILE* stream)
ASDCP::Result_t
ASDCP::MXF::Sequence::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_Sequence].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
-
- return result;
+ m_Typeinfo = &Dict::Type(MDD_Sequence);
+ return InterchangeObject::InitFromBuffer(p, l);
}
//
ASDCP::Result_t
ASDCP::MXF::Sequence::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_Sequence].ul, 0);
+ m_Typeinfo = &Dict::Type(MDD_Sequence);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//------------------------------------------------------------------------------------------
@@ -595,6 +761,17 @@ ASDCP::MXF::SourceClip::InitFromTLVSet(TLVReader& TLVSet)
}
//
+ASDCP::Result_t
+ASDCP::MXF::SourceClip::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = StructuralComponent::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi64(OBJ_WRITE_ARGS(SourceClip, StartPosition));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(SourceClip, SourcePackageID));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(SourceClip, SourceTrackID));
+ return result;
+}
+
+//
void
ASDCP::MXF::SourceClip::Dump(FILE* stream)
{
@@ -614,24 +791,16 @@ ASDCP::MXF::SourceClip::Dump(FILE* stream)
ASDCP::Result_t
ASDCP::MXF::SourceClip::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_SourceClip].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
-
- return result;
+ m_Typeinfo = &Dict::Type(MDD_SourceClip);
+ return InterchangeObject::InitFromBuffer(p, l);
}
//
ASDCP::Result_t
ASDCP::MXF::SourceClip::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_SourceClip].ul, 0);
+ m_Typeinfo = &Dict::Type(MDD_SourceClip);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//------------------------------------------------------------------------------------------
@@ -649,6 +818,17 @@ ASDCP::MXF::TimecodeComponent::InitFromTLVSet(TLVReader& TLVSet)
}
//
+ASDCP::Result_t
+ASDCP::MXF::TimecodeComponent::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = StructuralComponent::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi16(OBJ_WRITE_ARGS(TimecodeComponent, RoundedTimecodeBase));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi64(OBJ_WRITE_ARGS(TimecodeComponent, StartTimecode));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi8(OBJ_WRITE_ARGS(TimecodeComponent, DropFrame));
+ return result;
+}
+
+//
void
ASDCP::MXF::TimecodeComponent::Dump(FILE* stream)
{
@@ -668,24 +848,16 @@ ASDCP::MXF::TimecodeComponent::Dump(FILE* stream)
ASDCP::Result_t
ASDCP::MXF::TimecodeComponent::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_TimecodeComponent].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
-
- return result;
+ m_Typeinfo = &Dict::Type(MDD_TimecodeComponent);
+ return InterchangeObject::InitFromBuffer(p, l);
}
//
ASDCP::Result_t
ASDCP::MXF::TimecodeComponent::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_TimecodeComponent].ul, 0);
+ m_Typeinfo = &Dict::Type(MDD_TimecodeComponent);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//------------------------------------------------------------------------------------------
@@ -702,6 +874,16 @@ ASDCP::MXF::GenericDescriptor::InitFromTLVSet(TLVReader& TLVSet)
}
//
+ASDCP::Result_t
+ASDCP::MXF::GenericDescriptor::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = InterchangeObject::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(GenericDescriptor, Locators));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(GenericDescriptor, SubDescriptors));
+ return result;
+}
+
+//
void
ASDCP::MXF::GenericDescriptor::Dump(FILE* stream)
{
@@ -712,9 +894,9 @@ ASDCP::MXF::GenericDescriptor::Dump(FILE* stream)
stream = stderr;
InterchangeObject::Dump(stream);
- fprintf(stream, " %s:\n", "Locators");
+ fprintf(stream, " %22s:\n", "Locators");
Locators.Dump(stream);
- fprintf(stream, " %s:\n", "SubDescriptors");
+ fprintf(stream, " %22s:\n", "SubDescriptors");
SubDescriptors.Dump(stream);
}
@@ -736,6 +918,19 @@ ASDCP::MXF::FileDescriptor::InitFromTLVSet(TLVReader& TLVSet)
}
//
+ASDCP::Result_t
+ASDCP::MXF::FileDescriptor::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = GenericDescriptor::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(FileDescriptor, LinkedTrackID));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(FileDescriptor, SampleRate));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi64(OBJ_WRITE_ARGS(FileDescriptor, ContainerDuration));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(FileDescriptor, EssenceContainer));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(FileDescriptor, Codec));
+ return result;
+}
+
+//
void
ASDCP::MXF::FileDescriptor::Dump(FILE* stream)
{
@@ -757,24 +952,16 @@ ASDCP::MXF::FileDescriptor::Dump(FILE* stream)
ASDCP::Result_t
ASDCP::MXF::FileDescriptor::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_FileDescriptor].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
-
- return result;
+ m_Typeinfo = &Dict::Type(MDD_FileDescriptor);
+ return InterchangeObject::InitFromBuffer(p, l);
}
//
ASDCP::Result_t
ASDCP::MXF::FileDescriptor::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_FileDescriptor].ul, 0);
+ m_Typeinfo = &Dict::Type(MDD_FileDescriptor);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//------------------------------------------------------------------------------------------
@@ -788,11 +975,23 @@ ASDCP::MXF::GenericSoundEssenceDescriptor::InitFromTLVSet(TLVReader& TLVSet)
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(GenericSoundEssenceDescriptor, AudioSamplingRate));
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi8(OBJ_READ_ARGS(GenericSoundEssenceDescriptor, Locked));
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi8(OBJ_READ_ARGS(GenericSoundEssenceDescriptor, AudioRefLevel));
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi8(OBJ_READ_ARGS(GenericSoundEssenceDescriptor, ElectroSpatialFormulation));
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi32(OBJ_READ_ARGS(GenericSoundEssenceDescriptor, ChannelCount));
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi32(OBJ_READ_ARGS(GenericSoundEssenceDescriptor, QuantizationBits));
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi8(OBJ_READ_ARGS(GenericSoundEssenceDescriptor, DialNorm));
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(GenericSoundEssenceDescriptor, SoundEssenceCompression));
+ return result;
+}
+
+//
+ASDCP::Result_t
+ASDCP::MXF::GenericSoundEssenceDescriptor::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = FileDescriptor::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(GenericSoundEssenceDescriptor, AudioSamplingRate));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi8(OBJ_WRITE_ARGS(GenericSoundEssenceDescriptor, Locked));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi8(OBJ_WRITE_ARGS(GenericSoundEssenceDescriptor, AudioRefLevel));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(GenericSoundEssenceDescriptor, ChannelCount));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(GenericSoundEssenceDescriptor, QuantizationBits));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi8(OBJ_WRITE_ARGS(GenericSoundEssenceDescriptor, DialNorm));
return result;
}
@@ -810,35 +1009,25 @@ ASDCP::MXF::GenericSoundEssenceDescriptor::Dump(FILE* stream)
fprintf(stream, " %22s = %s\n", "AudioSamplingRate", AudioSamplingRate.ToString(identbuf));
fprintf(stream, " %22s = %d\n", "Locked", Locked);
fprintf(stream, " %22s = %d\n", "AudioRefLevel", AudioRefLevel);
- fprintf(stream, " %22s = %d\n", "ElectroSpatialFormulation", ElectroSpatialFormulation);
fprintf(stream, " %22s = %d\n", "ChannelCount", ChannelCount);
fprintf(stream, " %22s = %d\n", "QuantizationBits", QuantizationBits);
fprintf(stream, " %22s = %d\n", "DialNorm", DialNorm);
- fprintf(stream, " %22s = %s\n", "SoundEssenceCompression", SoundEssenceCompression.ToString(identbuf));
}
//
ASDCP::Result_t
ASDCP::MXF::GenericSoundEssenceDescriptor::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_GenericSoundEssenceDescriptor].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
-
- return result;
+ m_Typeinfo = &Dict::Type(MDD_GenericSoundEssenceDescriptor);
+ return InterchangeObject::InitFromBuffer(p, l);
}
//
ASDCP::Result_t
ASDCP::MXF::GenericSoundEssenceDescriptor::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_GenericSoundEssenceDescriptor].ul, 0);
+ m_Typeinfo = &Dict::Type(MDD_GenericSoundEssenceDescriptor);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//------------------------------------------------------------------------------------------
@@ -856,6 +1045,17 @@ ASDCP::MXF::WaveAudioDescriptor::InitFromTLVSet(TLVReader& TLVSet)
}
//
+ASDCP::Result_t
+ASDCP::MXF::WaveAudioDescriptor::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = GenericSoundEssenceDescriptor::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi16(OBJ_WRITE_ARGS(WaveAudioDescriptor, BlockAlign));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi8(OBJ_WRITE_ARGS(WaveAudioDescriptor, SequenceOffset));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(WaveAudioDescriptor, AvgBps));
+ return result;
+}
+
+//
void
ASDCP::MXF::WaveAudioDescriptor::Dump(FILE* stream)
{
@@ -875,24 +1075,16 @@ ASDCP::MXF::WaveAudioDescriptor::Dump(FILE* stream)
ASDCP::Result_t
ASDCP::MXF::WaveAudioDescriptor::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_WaveAudioDescriptor].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
-
- return result;
+ m_Typeinfo = &Dict::Type(MDD_WaveAudioDescriptor);
+ return InterchangeObject::InitFromBuffer(p, l);
}
//
ASDCP::Result_t
ASDCP::MXF::WaveAudioDescriptor::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_WaveAudioDescriptor].ul, 0);
+ m_Typeinfo = &Dict::Type(MDD_WaveAudioDescriptor);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//------------------------------------------------------------------------------------------
@@ -906,11 +1098,19 @@ ASDCP::MXF::GenericPictureEssenceDescriptor::InitFromTLVSet(TLVReader& TLVSet)
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi8(OBJ_READ_ARGS(GenericPictureEssenceDescriptor, FrameLayout));
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi32(OBJ_READ_ARGS(GenericPictureEssenceDescriptor, StoredWidth));
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi32(OBJ_READ_ARGS(GenericPictureEssenceDescriptor, StoredHeight));
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi32(OBJ_READ_ARGS(GenericPictureEssenceDescriptor, DisplayWidth));
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi32(OBJ_READ_ARGS(GenericPictureEssenceDescriptor, DisplayHeight));
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(GenericPictureEssenceDescriptor, AspectRatio));
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(GenericPictureEssenceDescriptor, Gamma));
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(GenericPictureEssenceDescriptor, PictureEssenceCoding));
+ return result;
+}
+
+//
+ASDCP::Result_t
+ASDCP::MXF::GenericPictureEssenceDescriptor::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = FileDescriptor::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi8(OBJ_WRITE_ARGS(GenericPictureEssenceDescriptor, FrameLayout));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(GenericPictureEssenceDescriptor, StoredWidth));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(GenericPictureEssenceDescriptor, StoredHeight));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(GenericPictureEssenceDescriptor, AspectRatio));
return result;
}
@@ -928,35 +1128,23 @@ ASDCP::MXF::GenericPictureEssenceDescriptor::Dump(FILE* stream)
fprintf(stream, " %22s = %d\n", "FrameLayout", FrameLayout);
fprintf(stream, " %22s = %d\n", "StoredWidth", StoredWidth);
fprintf(stream, " %22s = %d\n", "StoredHeight", StoredHeight);
- fprintf(stream, " %22s = %d\n", "DisplayWidth", DisplayWidth);
- fprintf(stream, " %22s = %d\n", "DisplayHeight", DisplayHeight);
fprintf(stream, " %22s = %s\n", "AspectRatio", AspectRatio.ToString(identbuf));
- fprintf(stream, " %22s = %s\n", "Gamma", Gamma.ToString(identbuf));
- fprintf(stream, " %22s = %s\n", "PictureEssenceCoding", PictureEssenceCoding.ToString(identbuf));
}
//
ASDCP::Result_t
ASDCP::MXF::GenericPictureEssenceDescriptor::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_GenericPictureEssenceDescriptor].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
-
- return result;
+ m_Typeinfo = &Dict::Type(MDD_GenericPictureEssenceDescriptor);
+ return InterchangeObject::InitFromBuffer(p, l);
}
//
ASDCP::Result_t
ASDCP::MXF::GenericPictureEssenceDescriptor::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_GenericPictureEssenceDescriptor].ul, 0);
+ m_Typeinfo = &Dict::Type(MDD_GenericPictureEssenceDescriptor);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//------------------------------------------------------------------------------------------
@@ -974,6 +1162,17 @@ ASDCP::MXF::RGBAEssenceDescriptor::InitFromTLVSet(TLVReader& TLVSet)
}
//
+ASDCP::Result_t
+ASDCP::MXF::RGBAEssenceDescriptor::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = GenericPictureEssenceDescriptor::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(RGBAEssenceDescriptor, ComponentMaxRef));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(RGBAEssenceDescriptor, ComponentMinRef));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(RGBAEssenceDescriptor, PixelLayout));
+ return result;
+}
+
+//
void
ASDCP::MXF::RGBAEssenceDescriptor::Dump(FILE* stream)
{
@@ -993,24 +1192,16 @@ ASDCP::MXF::RGBAEssenceDescriptor::Dump(FILE* stream)
ASDCP::Result_t
ASDCP::MXF::RGBAEssenceDescriptor::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_RGBAEssenceDescriptor].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
-
- return result;
+ m_Typeinfo = &Dict::Type(MDD_RGBAEssenceDescriptor);
+ return InterchangeObject::InitFromBuffer(p, l);
}
//
ASDCP::Result_t
ASDCP::MXF::RGBAEssenceDescriptor::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_RGBAEssenceDescriptor].ul, 0);
+ m_Typeinfo = &Dict::Type(MDD_RGBAEssenceDescriptor);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//------------------------------------------------------------------------------------------
@@ -1038,6 +1229,27 @@ ASDCP::MXF::JPEG2000PictureSubDescriptor::InitFromTLVSet(TLVReader& TLVSet)
}
//
+ASDCP::Result_t
+ASDCP::MXF::JPEG2000PictureSubDescriptor::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = InterchangeObject::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi16(OBJ_WRITE_ARGS(JPEG2000PictureSubDescriptor, Rsize));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(JPEG2000PictureSubDescriptor, Xsize));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(JPEG2000PictureSubDescriptor, Ysize));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(JPEG2000PictureSubDescriptor, XOsize));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(JPEG2000PictureSubDescriptor, YOsize));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(JPEG2000PictureSubDescriptor, XTsize));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(JPEG2000PictureSubDescriptor, YTsize));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(JPEG2000PictureSubDescriptor, XTOsize));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(JPEG2000PictureSubDescriptor, YTOsize));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi16(OBJ_WRITE_ARGS(JPEG2000PictureSubDescriptor, Csize));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(JPEG2000PictureSubDescriptor, PictureComponentSizing));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(JPEG2000PictureSubDescriptor, CodingStyleDefault));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(JPEG2000PictureSubDescriptor, QuantizationDefault));
+ return result;
+}
+
+//
void
ASDCP::MXF::JPEG2000PictureSubDescriptor::Dump(FILE* stream)
{
@@ -1067,24 +1279,16 @@ ASDCP::MXF::JPEG2000PictureSubDescriptor::Dump(FILE* stream)
ASDCP::Result_t
ASDCP::MXF::JPEG2000PictureSubDescriptor::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_JPEG2000PictureSubDescriptor].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
-
- return result;
+ m_Typeinfo = &Dict::Type(MDD_JPEG2000PictureSubDescriptor);
+ return InterchangeObject::InitFromBuffer(p, l);
}
//
ASDCP::Result_t
ASDCP::MXF::JPEG2000PictureSubDescriptor::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_JPEG2000PictureSubDescriptor].ul, 0);
+ m_Typeinfo = &Dict::Type(MDD_JPEG2000PictureSubDescriptor);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//------------------------------------------------------------------------------------------
@@ -1099,10 +1303,18 @@ ASDCP::MXF::CDCIEssenceDescriptor::InitFromTLVSet(TLVReader& TLVSet)
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi32(OBJ_READ_ARGS(CDCIEssenceDescriptor, HorizontalSubsampling));
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi32(OBJ_READ_ARGS(CDCIEssenceDescriptor, VerticalSubsampling));
if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi8(OBJ_READ_ARGS(CDCIEssenceDescriptor, ColorSiting));
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi8(OBJ_READ_ARGS(CDCIEssenceDescriptor, ReversedByteOrder));
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi32(OBJ_READ_ARGS(CDCIEssenceDescriptor, BlackRefLevel));
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi32(OBJ_READ_ARGS(CDCIEssenceDescriptor, WhiteReflevel));
- if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi32(OBJ_READ_ARGS(CDCIEssenceDescriptor, ColorRange));
+ return result;
+}
+
+//
+ASDCP::Result_t
+ASDCP::MXF::CDCIEssenceDescriptor::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = GenericPictureEssenceDescriptor::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(CDCIEssenceDescriptor, ComponentDepth));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(CDCIEssenceDescriptor, HorizontalSubsampling));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(CDCIEssenceDescriptor, VerticalSubsampling));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi8(OBJ_WRITE_ARGS(CDCIEssenceDescriptor, ColorSiting));
return result;
}
@@ -1121,34 +1333,22 @@ ASDCP::MXF::CDCIEssenceDescriptor::Dump(FILE* stream)
fprintf(stream, " %22s = %d\n", "HorizontalSubsampling", HorizontalSubsampling);
fprintf(stream, " %22s = %d\n", "VerticalSubsampling", VerticalSubsampling);
fprintf(stream, " %22s = %d\n", "ColorSiting", ColorSiting);
- fprintf(stream, " %22s = %d\n", "ReversedByteOrder", ReversedByteOrder);
- fprintf(stream, " %22s = %d\n", "BlackRefLevel", BlackRefLevel);
- fprintf(stream, " %22s = %d\n", "WhiteReflevel", WhiteReflevel);
- fprintf(stream, " %22s = %d\n", "ColorRange", ColorRange);
}
//
ASDCP::Result_t
ASDCP::MXF::CDCIEssenceDescriptor::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_CDCIEssenceDescriptor].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
-
- return result;
+ m_Typeinfo = &Dict::Type(MDD_CDCIEssenceDescriptor);
+ return InterchangeObject::InitFromBuffer(p, l);
}
//
ASDCP::Result_t
ASDCP::MXF::CDCIEssenceDescriptor::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_CDCIEssenceDescriptor].ul, 0);
+ m_Typeinfo = &Dict::Type(MDD_CDCIEssenceDescriptor);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//------------------------------------------------------------------------------------------
@@ -1167,6 +1367,18 @@ ASDCP::MXF::MPEG2VideoDescriptor::InitFromTLVSet(TLVReader& TLVSet)
}
//
+ASDCP::Result_t
+ASDCP::MXF::MPEG2VideoDescriptor::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = CDCIEssenceDescriptor::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi8(OBJ_WRITE_ARGS(MPEG2VideoDescriptor, CodedContentType));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi8(OBJ_WRITE_ARGS(MPEG2VideoDescriptor, LowDelay));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi32(OBJ_WRITE_ARGS(MPEG2VideoDescriptor, BitRate));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi8(OBJ_WRITE_ARGS(MPEG2VideoDescriptor, ProfileAndLevel));
+ return result;
+}
+
+//
void
ASDCP::MXF::MPEG2VideoDescriptor::Dump(FILE* stream)
{
@@ -1187,24 +1399,73 @@ ASDCP::MXF::MPEG2VideoDescriptor::Dump(FILE* stream)
ASDCP::Result_t
ASDCP::MXF::MPEG2VideoDescriptor::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
+ m_Typeinfo = &Dict::Type(MDD_MPEG2VideoDescriptor);
+ return InterchangeObject::InitFromBuffer(p, l);
+}
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_MPEG2VideoDescriptor].ul);
+//
+ASDCP::Result_t
+ASDCP::MXF::MPEG2VideoDescriptor::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
+{
+ m_Typeinfo = &Dict::Type(MDD_MPEG2VideoDescriptor);
+ return InterchangeObject::WriteToBuffer(Buffer);
+}
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
+//------------------------------------------------------------------------------------------
+// DMSegment
+//
+ASDCP::Result_t
+ASDCP::MXF::DMSegment::InitFromTLVSet(TLVReader& TLVSet)
+{
+ Result_t result = InterchangeObject::InitFromTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadUi64(OBJ_READ_ARGS(DMSegment, EventStartPosition));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(DMSegment, EventComment));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.ReadObject(OBJ_READ_ARGS(DMSegment, DMFramework));
return result;
}
//
ASDCP::Result_t
-ASDCP::MXF::MPEG2VideoDescriptor::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
+ASDCP::MXF::DMSegment::WriteToTLVSet(TLVWriter& TLVSet)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_MPEG2VideoDescriptor].ul, 0);
+ Result_t result = InterchangeObject::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteUi64(OBJ_WRITE_ARGS(DMSegment, EventStartPosition));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(DMSegment, EventComment));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(DMSegment, DMFramework));
+ return result;
+}
+
+//
+void
+ASDCP::MXF::DMSegment::Dump(FILE* stream)
+{
+ char identbuf[IdentBufferLen];
+ *identbuf = 0;
+
+ if ( stream == 0 )
+ stream = stderr;
+
+ InterchangeObject::Dump(stream);
+ fprintf(stream, " %22s = %s\n", "EventStartPosition", i64sz(EventStartPosition, identbuf));
+ fprintf(stream, " %22s = %s\n", "EventComment", EventComment.ToString(identbuf));
+ fprintf(stream, " %22s = %s\n", "DMFramework", DMFramework.ToString(identbuf));
+}
+
+//
+ASDCP::Result_t
+ASDCP::MXF::DMSegment::InitFromBuffer(const byte_t* p, ui32_t l)
+{
+ m_Typeinfo = &Dict::Type(MDD_DMSegment);
+ return InterchangeObject::InitFromBuffer(p, l);
+}
+
+//
+ASDCP::Result_t
+ASDCP::MXF::DMSegment::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
+{
+ m_Typeinfo = &Dict::Type(MDD_DMSegment);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//------------------------------------------------------------------------------------------
@@ -1220,6 +1481,15 @@ ASDCP::MXF::CryptographicFramework::InitFromTLVSet(TLVReader& TLVSet)
}
//
+ASDCP::Result_t
+ASDCP::MXF::CryptographicFramework::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = InterchangeObject::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(CryptographicFramework, ContextSR));
+ return result;
+}
+
+//
void
ASDCP::MXF::CryptographicFramework::Dump(FILE* stream)
{
@@ -1237,24 +1507,16 @@ ASDCP::MXF::CryptographicFramework::Dump(FILE* stream)
ASDCP::Result_t
ASDCP::MXF::CryptographicFramework::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_CryptographicFramework].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
-
- return result;
+ m_Typeinfo = &Dict::Type(MDD_CryptographicFramework);
+ return InterchangeObject::InitFromBuffer(p, l);
}
//
ASDCP::Result_t
ASDCP::MXF::CryptographicFramework::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_CryptographicFramework].ul, 0);
+ m_Typeinfo = &Dict::Type(MDD_CryptographicFramework);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//------------------------------------------------------------------------------------------
@@ -1274,6 +1536,19 @@ ASDCP::MXF::CryptographicContext::InitFromTLVSet(TLVReader& TLVSet)
}
//
+ASDCP::Result_t
+ASDCP::MXF::CryptographicContext::WriteToTLVSet(TLVWriter& TLVSet)
+{
+ Result_t result = InterchangeObject::WriteToTLVSet(TLVSet);
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(CryptographicContext, ContextID));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(CryptographicContext, SourceEssenceContainer));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(CryptographicContext, CipherAlgorithm));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(CryptographicContext, MICAlgorithm));
+ if ( ASDCP_SUCCESS(result) ) result = TLVSet.WriteObject(OBJ_WRITE_ARGS(CryptographicContext, CryptographicKeyID));
+ return result;
+}
+
+//
void
ASDCP::MXF::CryptographicContext::Dump(FILE* stream)
{
@@ -1295,24 +1570,16 @@ ASDCP::MXF::CryptographicContext::Dump(FILE* stream)
ASDCP::Result_t
ASDCP::MXF::CryptographicContext::InitFromBuffer(const byte_t* p, ui32_t l)
{
- ASDCP_TEST_NULL(p);
-
- Result_t result = KLVPacket::InitFromBuffer(p, l, s_MDD_Table[MDDindex_CryptographicContext].ul);
-
- if ( ASDCP_SUCCESS(result) )
- {
- TLVReader MemRDR(m_ValueStart, m_ValueLength, m_Lookup);
- result = InitFromTLVSet(MemRDR);
- }
-
- return result;
+ m_Typeinfo = &Dict::Type(MDD_CryptographicContext);
+ return InterchangeObject::InitFromBuffer(p, l);
}
//
ASDCP::Result_t
ASDCP::MXF::CryptographicContext::WriteToBuffer(ASDCP::FrameBuffer& Buffer)
{
- return WriteKLToBuffer(Buffer, s_MDD_Table[MDDindex_CryptographicContext].ul, 0);
+ m_Typeinfo = &Dict::Type(MDD_CryptographicContext);
+ return InterchangeObject::WriteToBuffer(Buffer);
}
//
diff --git a/src/Metadata.h b/src/Metadata.h
index 8630d18..eb89061 100755
--- a/src/Metadata.h
+++ b/src/Metadata.h
@@ -38,43 +38,6 @@ namespace ASDCP
{
namespace MXF
{
- // Types
- class RGBLayout : public IArchive
- {
- public:
- struct element {
- ui8_t Code;
- ui8_t Depth;
- } PictureElement[8];
- RGBLayout() { memset(PictureElement, 0, sizeof(PictureElement)); }
-
- //
- Result_t ReadFrom(ASDCP::MemIOReader& Reader) { return RESULT_OK; }
- Result_t WriteTo(ASDCP::MemIOWriter& Writer) { return RESULT_OK; }
- inline const char* ToString(char* str_buf) const {
- snprintf(str_buf, IdentBufferLen, "RGBLayout: <PictureElement[8]>\n");
- return str_buf;
- }
- };
-
- class Raw : public IArchive
- {
- ASDCP_NO_COPY_CONSTRUCT(Raw);
-
- public:
- byte_t* data;
- Raw() {}
- ~Raw() {}
-
- //
- Result_t ReadFrom(ASDCP::MemIOReader& Reader) { return RESULT_OK; }
- Result_t WriteTo(ASDCP::MemIOWriter& Writer) { return RESULT_OK; }
- inline const char* ToString(char* str_buf) const {
- snprintf(str_buf, IdentBufferLen, "RAW\n");
- return str_buf;
- }
- };
-
//
//
@@ -86,16 +49,18 @@ namespace ASDCP
UUID ThisGenerationUID;
UTF16String CompanyName;
UTF16String ProductName;
- ui16_t ProductVersion;
+ VersionType ProductVersion;
UTF16String VersionString;
UUID ProductUID;
Timestamp ModificationDate;
- ui16_t ToolkitVersion;
+ VersionType ToolkitVersion;
UTF16String Platform;
- Identification() : ProductVersion(0), ToolkitVersion(0) {}
+ Identification() {}
virtual ~Identification() {}
+ virtual const char* HasName() { return "Identification"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
@@ -112,7 +77,29 @@ namespace ASDCP
ContentStorage() {}
virtual ~ContentStorage() {}
+ virtual const char* HasName() { return "ContentStorage"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
+ virtual void Dump(FILE* = 0);
+ virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
+ virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
+ };
+
+ //
+ class EssenceContainerData : public InterchangeObject
+ {
+ ASDCP_NO_COPY_CONSTRUCT(EssenceContainerData);
+
+ public:
+ UMID LinkedPackageUID;
+ ui32_t IndexSID;
+ ui32_t BodySID;
+
+ EssenceContainerData() : IndexSID(0), BodySID(0) {}
+ virtual ~EssenceContainerData() {}
+ virtual const char* HasName() { return "EssenceContainerData"; }
+ virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
@@ -128,11 +115,13 @@ namespace ASDCP
UTF16String Name;
Timestamp PackageCreationDate;
Timestamp PackageModifiedDate;
- Batch<UID> Tracks;
+ Batch<UUID> Tracks;
GenericPackage() {}
virtual ~GenericPackage() {}
+ virtual const char* HasName() { return "GenericPackage"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
};
@@ -145,7 +134,9 @@ namespace ASDCP
MaterialPackage() {}
virtual ~MaterialPackage() {}
+ virtual const char* HasName() { return "MaterialPackage"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
@@ -157,10 +148,13 @@ namespace ASDCP
ASDCP_NO_COPY_CONSTRUCT(SourcePackage);
public:
+ UUID Descriptor;
SourcePackage() {}
virtual ~SourcePackage() {}
+ virtual const char* HasName() { return "SourcePackage"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
@@ -179,8 +173,27 @@ namespace ASDCP
GenericTrack() : TrackID(0), TrackNumber(0) {}
virtual ~GenericTrack() {}
+ virtual const char* HasName() { return "GenericTrack"; }
+ virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
+ virtual void Dump(FILE* = 0);
+ };
+
+ //
+ class StaticTrack : public GenericTrack
+ {
+ ASDCP_NO_COPY_CONSTRUCT(StaticTrack);
+
+ public:
+
+ StaticTrack() {}
+ virtual ~StaticTrack() {}
+ virtual const char* HasName() { return "StaticTrack"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
+ virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
+ virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
};
//
@@ -194,7 +207,9 @@ namespace ASDCP
Track() : Origin(0) {}
virtual ~Track() {}
+ virtual const char* HasName() { return "Track"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
@@ -211,7 +226,9 @@ namespace ASDCP
StructuralComponent() : Duration(0) {}
virtual ~StructuralComponent() {}
+ virtual const char* HasName() { return "StructuralComponent"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
};
@@ -221,11 +238,13 @@ namespace ASDCP
ASDCP_NO_COPY_CONSTRUCT(Sequence);
public:
- Batch<UID> StructuralComponents;
+ Batch<UUID> StructuralComponents;
Sequence() {}
virtual ~Sequence() {}
+ virtual const char* HasName() { return "Sequence"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
@@ -243,7 +262,9 @@ namespace ASDCP
SourceClip() : StartPosition(0), SourceTrackID(0) {}
virtual ~SourceClip() {}
+ virtual const char* HasName() { return "SourceClip"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
@@ -261,7 +282,9 @@ namespace ASDCP
TimecodeComponent() : RoundedTimecodeBase(0), StartTimecode(0), DropFrame(0) {}
virtual ~TimecodeComponent() {}
+ virtual const char* HasName() { return "TimecodeComponent"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
@@ -278,7 +301,9 @@ namespace ASDCP
GenericDescriptor() {}
virtual ~GenericDescriptor() {}
+ virtual const char* HasName() { return "GenericDescriptor"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
};
@@ -296,7 +321,9 @@ namespace ASDCP
FileDescriptor() : LinkedTrackID(0), ContainerDuration(0) {}
virtual ~FileDescriptor() {}
+ virtual const char* HasName() { return "FileDescriptor"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
@@ -311,15 +338,15 @@ namespace ASDCP
Rational AudioSamplingRate;
ui8_t Locked;
ui8_t AudioRefLevel;
- ui8_t ElectroSpatialFormulation;
ui32_t ChannelCount;
ui32_t QuantizationBits;
ui8_t DialNorm;
- UL SoundEssenceCompression;
- GenericSoundEssenceDescriptor() : Locked(0), AudioRefLevel(0), ElectroSpatialFormulation(0), ChannelCount(0), QuantizationBits(0), DialNorm(0) {}
+ GenericSoundEssenceDescriptor() : Locked(0), AudioRefLevel(0), ChannelCount(0), QuantizationBits(0), DialNorm(0) {}
virtual ~GenericSoundEssenceDescriptor() {}
+ virtual const char* HasName() { return "GenericSoundEssenceDescriptor"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
@@ -337,7 +364,9 @@ namespace ASDCP
WaveAudioDescriptor() : BlockAlign(0), SequenceOffset(0), AvgBps(0) {}
virtual ~WaveAudioDescriptor() {}
+ virtual const char* HasName() { return "WaveAudioDescriptor"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
@@ -352,15 +381,13 @@ namespace ASDCP
ui8_t FrameLayout;
ui32_t StoredWidth;
ui32_t StoredHeight;
- ui32_t DisplayWidth;
- ui32_t DisplayHeight;
Rational AspectRatio;
- UL Gamma;
- UL PictureEssenceCoding;
- GenericPictureEssenceDescriptor() : FrameLayout(0), StoredWidth(0), StoredHeight(0), DisplayWidth(0), DisplayHeight(0) {}
+ GenericPictureEssenceDescriptor() : FrameLayout(0), StoredWidth(0), StoredHeight(0) {}
virtual ~GenericPictureEssenceDescriptor() {}
+ virtual const char* HasName() { return "GenericPictureEssenceDescriptor"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
@@ -378,7 +405,9 @@ namespace ASDCP
RGBAEssenceDescriptor() : ComponentMaxRef(0), ComponentMinRef(0) {}
virtual ~RGBAEssenceDescriptor() {}
+ virtual const char* HasName() { return "RGBAEssenceDescriptor"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
@@ -406,7 +435,9 @@ namespace ASDCP
JPEG2000PictureSubDescriptor() : Rsize(0), Xsize(0), Ysize(0), XOsize(0), YOsize(0), XTsize(0), YTsize(0), XTOsize(0), YTOsize(0), Csize(0) {}
virtual ~JPEG2000PictureSubDescriptor() {}
+ virtual const char* HasName() { return "JPEG2000PictureSubDescriptor"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
@@ -422,14 +453,12 @@ namespace ASDCP
ui32_t HorizontalSubsampling;
ui32_t VerticalSubsampling;
ui8_t ColorSiting;
- ui8_t ReversedByteOrder;
- ui32_t BlackRefLevel;
- ui32_t WhiteReflevel;
- ui32_t ColorRange;
- CDCIEssenceDescriptor() : ComponentDepth(0), HorizontalSubsampling(0), VerticalSubsampling(0), ColorSiting(0), ReversedByteOrder(0), BlackRefLevel(0), WhiteReflevel(0), ColorRange(0) {}
+ CDCIEssenceDescriptor() : ComponentDepth(0), HorizontalSubsampling(0), VerticalSubsampling(0), ColorSiting(0) {}
virtual ~CDCIEssenceDescriptor() {}
+ virtual const char* HasName() { return "CDCIEssenceDescriptor"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
@@ -448,7 +477,29 @@ namespace ASDCP
MPEG2VideoDescriptor() : CodedContentType(0), LowDelay(0), BitRate(0), ProfileAndLevel(0) {}
virtual ~MPEG2VideoDescriptor() {}
+ virtual const char* HasName() { return "MPEG2VideoDescriptor"; }
+ virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
+ virtual void Dump(FILE* = 0);
+ virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
+ virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
+ };
+
+ //
+ class DMSegment : public InterchangeObject
+ {
+ ASDCP_NO_COPY_CONSTRUCT(DMSegment);
+
+ public:
+ ui64_t EventStartPosition;
+ UTF16String EventComment;
+ UUID DMFramework;
+
+ DMSegment() : EventStartPosition(0) {}
+ virtual ~DMSegment() {}
+ virtual const char* HasName() { return "DMSegment"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
@@ -464,7 +515,9 @@ namespace ASDCP
CryptographicFramework() {}
virtual ~CryptographicFramework() {}
+ virtual const char* HasName() { return "CryptographicFramework"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
@@ -484,7 +537,9 @@ namespace ASDCP
CryptographicContext() {}
virtual ~CryptographicContext() {}
+ virtual const char* HasName() { return "CryptographicContext"; }
virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
+ virtual Result_t WriteToTLVSet(TLVWriter& TLVSet);
virtual void Dump(FILE* = 0);
virtual Result_t InitFromBuffer(const byte_t* p, ui32_t l);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
diff --git a/src/asdcp-test.cpp b/src/asdcp-test.cpp
index 92dfd39..83fbb15 100755
--- a/src/asdcp-test.cpp
+++ b/src/asdcp-test.cpp
@@ -221,7 +221,7 @@ public:
const char* file_root; // filename pre for files written by the extract mode
const char* out_file; // name of mxf file created by create mode
byte_t key_value[KeyLen]; // value of given encryption key (when key_flag is true)
- byte_t key_id_value[KeyIDlen];// value of given key ID (when key_id_flag is true)
+ byte_t key_id_value[UUIDlen];// value of given key ID (when key_id_flag is true)
const char* filenames[MAX_IN_FILES]; // list of filenames to be processed
//
@@ -244,14 +244,15 @@ public:
CommandOptions(int argc, const char** argv) :
error_flag(true), info_flag(false), create_flag(false),
extract_flag(false), genkey_flag(false), genid_flag(false), gop_start_flag(false),
- key_flag(false), encrypt_header_flag(true), write_hmac(true), read_hmac(false), split_wav(false),
+ key_flag(false), key_id_flag(false), encrypt_header_flag(true),
+ write_hmac(true), read_hmac(false), split_wav(false),
verbose_flag(false), fb_dump_size(0), showindex_flag(false), showheader_flag(false),
no_write_flag(false), version_flag(false), help_flag(false), start_frame(0),
duration(0xffffffff), duration_flag(false), do_repeat(false), picture_rate(24),
fb_size(FRAME_BUFFER_SIZE), file_count(0), file_root(0), out_file(0)
{
memset(key_value, 0, KeyLen);
- memset(key_id_value, 0, KeyIDlen);
+ memset(key_id_value, 0, UUIDlen);
for ( int i = 1; i < argc; i++ )
{
@@ -306,11 +307,11 @@ public:
TEST_EXTRA_ARG(i, 'j');
{
ui32_t length;
- hex2bin(argv[i], key_id_value, KeyIDlen, &length);
+ hex2bin(argv[i], key_id_value, UUIDlen, &length);
- if ( length != KeyIDlen )
+ if ( length != UUIDlen )
{
- fprintf(stderr, "Unexpected key ID length: %lu, expecting %lu characters.\n", KeyIDlen, length);
+ fprintf(stderr, "Unexpected key ID length: %lu, expecting %lu characters.\n", UUIDlen, length);
return;
}
}
@@ -429,9 +430,9 @@ write_MPEG2_file(CommandOptions& Options)
Info.EncryptedEssence = true;
if ( Options.key_id_flag )
- memcpy(Info.CryptographicKeyID, Options.key_id_value, KeyIDlen);
+ memcpy(Info.CryptographicKeyID, Options.key_id_value, UUIDlen);
else
- RNG.FillRandom(Info.CryptographicKeyID, KeyIDlen);
+ RNG.FillRandom(Info.CryptographicKeyID, UUIDlen);
Context = new AESEncContext;
result = Context->InitKey(Options.key_value);
@@ -672,9 +673,9 @@ write_JP2K_file(CommandOptions& Options)
Info.EncryptedEssence = true;
if ( Options.key_id_flag )
- memcpy(Info.CryptographicKeyID, Options.key_id_value, KeyIDlen);
+ memcpy(Info.CryptographicKeyID, Options.key_id_value, UUIDlen);
else
- RNG.FillRandom(Info.CryptographicKeyID, KeyIDlen);
+ RNG.FillRandom(Info.CryptographicKeyID, UUIDlen);
Context = new AESEncContext;
result = Context->InitKey(Options.key_value);
@@ -869,9 +870,9 @@ write_PCM_file(CommandOptions& Options)
Info.EncryptedEssence = true;
if ( Options.key_id_flag )
- memcpy(Info.CryptographicKeyID, Options.key_id_value, KeyIDlen);
+ memcpy(Info.CryptographicKeyID, Options.key_id_value, UUIDlen);
else
- RNG.FillRandom(Info.CryptographicKeyID, KeyIDlen);
+ RNG.FillRandom(Info.CryptographicKeyID, UUIDlen);
Context = new AESEncContext;
result = Context->InitKey(Options.key_value);
@@ -1252,8 +1253,6 @@ main(int argc, const char** argv)
}
else if ( Options.create_flag )
{
- fprintf(stderr, "ATTENTION! This version of asdcplib does not support writing MXF files.\n");
-
if ( Options.do_repeat && ! Options.duration_flag )
{
fputs("Option -R requires -d <duration>\n", stderr);
diff --git a/src/h__Reader.cpp b/src/h__Reader.cpp
index 4c1cf12..95c510c 100755
--- a/src/h__Reader.cpp
+++ b/src/h__Reader.cpp
@@ -31,8 +31,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "AS_DCP_internal.h"
#include "KLV.h"
-#include "MDD.h"
-#include <assert.h>
using namespace ASDCP;
using namespace ASDCP::MXF;
@@ -95,6 +93,7 @@ ASDCP::h__Reader::InitInfo(WriterInfo& Info)
Result_t
ASDCP::h__Reader::OpenMXFRead(const char* filename)
{
+ m_LastPosition = 0;
Result_t result = m_File.OpenRead(filename);
if ( ASDCP_SUCCESS(result) )
@@ -145,6 +144,9 @@ ASDCP::h__Reader::InitMXFIndex()
result = m_FooterPart.InitFromFile(m_File);
}
+ if ( ASDCP_SUCCESS(result) )
+ m_File.Seek(m_EssenceStart);
+
return result;
}
@@ -164,10 +166,15 @@ ASDCP::h__Reader::ReadEKLVPacket(ui32_t FrameNum, ASDCP::FrameBuffer& FrameBuf,
}
// get frame position and go read the frame's key and length
+ Result_t result = RESULT_OK;
ASDCP::KLVReader Reader;
ASDCP::fpos_t FilePosition = m_EssenceStart + TmpEntry.StreamOffset;
- Result_t result = m_File.Seek(FilePosition);
+ if ( FilePosition != m_LastPosition )
+ {
+ m_LastPosition = FilePosition;
+ result = m_File.Seek(FilePosition);
+ }
if ( ASDCP_SUCCESS(result) )
result = Reader.ReadKLFromFile(m_File);
@@ -179,6 +186,7 @@ ASDCP::h__Reader::ReadEKLVPacket(ui32_t FrameNum, ASDCP::FrameBuffer& FrameBuf,
UL InteropRef(CryptEssenceUL_Data);
UL SMPTERef(CryptEssenceUL_Data);
ui64_t PacketLength = Reader.Length();
+ m_LastPosition = m_LastPosition + Reader.KLLength() + PacketLength;
if ( Key == InteropRef || Key == SMPTERef )
{
diff --git a/src/h__Writer.cpp b/src/h__Writer.cpp
index 7af5710..cd51391 100755
--- a/src/h__Writer.cpp
+++ b/src/h__Writer.cpp
@@ -33,14 +33,19 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "MemIO.h"
#include "Timecode.h"
#include "KLV.h"
-#include "MDD.h"
-#include <assert.h>
using namespace ASDCP;
using namespace ASDCP::MXF;
+// a magic number identifying asdcplib
+#ifndef WM_BUILD_NUMBER
+#define WM_BUILD_NUMBER 0x4A48
+#endif
+
+
-ASDCP::h__Writer::h__Writer() : m_FramesWritten(0), m_StreamOffset(0)
+//
+ASDCP::h__Writer::h__Writer() : m_EssenceDescriptor(0), m_FramesWritten(0), m_StreamOffset(0)
{
}
@@ -48,200 +53,264 @@ ASDCP::h__Writer::~h__Writer()
{
}
-// standard method of writing the header of a new MXF file
-Result_t
-ASDCP::h__Writer::WriteMXFHeader(EssenceType_t EssenceType, ASDCP::Rational& EditRate,
- ui32_t TCFrameRate, ui32_t BytesPerEditUnit)
-{
-#if 0
- // write the stream metadata
- m_Metadata = new Metadata();
- assert(m_Metadata);
- assert(m_Metadata->m_Object);
- if ( m_Info.EncryptedEssence )
- {
- UL DMSUL(CryptoFrameworkUL_Data);
- m_Metadata->AddDMScheme(DMSUL);
- }
+const byte_t PictDD_Data[SMPTE_UL_LENGTH] = {
+ 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01,
+ 0x01, 0x03, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00 };
- // Set the OP label
- // If we are writing OP-Atom we write the header as OP1a initially as another process
- // may try to read the file before it is complete and then it will NOT be a valid OP-Atom file
- m_Metadata->SetOP(OP1aUL);
+const byte_t SoundDD_Data[SMPTE_UL_LENGTH] = {
+ 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01,
+ 0x01, 0x03, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00 };
- // Build the Material Package
- // DRAGONS: We should really try and determine the UMID type rather than cop-out!
- UMID PackageUMID;
- PackageUMID.MakeUMID(0x0d); // mixed type
+const byte_t TCDD_Data[SMPTE_UL_LENGTH] = {
+ 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01,
+ 0x01, 0x03, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00 };
- m_MaterialPackage = m_Metadata->AddMaterialPackage("AS-DCP Material Package", PackageUMID);
- m_Metadata->SetPrimaryPackage(m_MaterialPackage); // This will be overwritten for OP-Atom
-
- TrackPtr MPTimecodeTrack = m_MaterialPackage->AddTimecodeTrack(EditRate);
- m_MPTimecode = MPTimecodeTrack->AddTimecodeComponent(TCFrameRate, 0, 0);
+const byte_t DMDD_Data[SMPTE_UL_LENGTH] = {
+ 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01,
+ 0x01, 0x03, 0x02, 0x01, 0x10, 0x00, 0x00, 0x00 };
- TrackPtr FPTimecodeTrack = 0;
- mxflib::UUID assetUUID(m_Info.AssetUUID);
- UMID EssenceUMID;
+//
+// add DMS CryptographicFramework entry to source package
+void
+AddDMScrypt(Partition& HeaderPart, SourcePackage& Package, WriterInfo& Descr, const UL& WrappingUL)
+{
+ // Essence Track
+ StaticTrack* NewTrack = new StaticTrack;
+ HeaderPart.AddChildObject(NewTrack);
+ Package.Tracks.push_back(NewTrack->InstanceUID);
+ NewTrack->TrackName = "Descriptive Track";
+ NewTrack->TrackID = 3;
+
+ Sequence* Seq = new Sequence;
+ HeaderPart.AddChildObject(Seq);
+ NewTrack->Sequence = Seq->InstanceUID;
+ Seq->DataDefinition = UL(DMDD_Data);
+
+ DMSegment* Segment = new DMSegment;
+ HeaderPart.AddChildObject(Segment);
+ Seq->StructuralComponents.push_back(Segment->InstanceUID);
+ Segment->EventComment = "AS-DCP KLV Encryption";
- switch ( EssenceType )
- {
- case ESS_MPEG2_VES:
- PackageUMID.MakeUMID(0x0f, assetUUID);
- m_FilePackage = m_Metadata->AddFilePackage(1, MPEG_PACKAGE_LABEL, PackageUMID);
- m_MPTrack = m_MaterialPackage->AddPictureTrack(EditRate);
- m_FPTrack = m_FilePackage->AddPictureTrack(0, EditRate);
- break;
-
- case ESS_JPEG_2000:
- PackageUMID.MakeUMID(0x0f, assetUUID);
- m_FilePackage = m_Metadata->AddFilePackage(1, JP2K_PACKAGE_LABEL, PackageUMID);
- m_MPTrack = m_MaterialPackage->AddPictureTrack(EditRate);
- m_FPTrack = m_FilePackage->AddPictureTrack(0, EditRate);
- break;
-
- case ESS_PCM_24b_48k:
- PackageUMID.MakeUMID(0x0f, assetUUID);
- m_FilePackage = m_Metadata->AddFilePackage(1, PCM_PACKAGE_LABEL, PackageUMID);
- m_MPTrack = m_MaterialPackage->AddSoundTrack(EditRate);
- m_FPTrack = m_FilePackage->AddSoundTrack(0, EditRate);
- break;
-
- default: return RESULT_RAW_ESS;
- }
+ CryptographicFramework* CFW = new CryptographicFramework;
+ HeaderPart.AddChildObject(CFW);
+ Segment->DMFramework = CFW->InstanceUID;
+
+ CryptographicContext* Context = new CryptographicContext;
+ HeaderPart.AddChildObject(Context);
+ CFW->ContextSR = Context->InstanceUID;
+
+ Context->ContextID.Set(Descr.ContextID);
+ Context->SourceEssenceContainer = WrappingUL; // ??????
+ Context->CipherAlgorithm.Set(CipherAlgorithm_AES);
+ Context->MICAlgorithm.Set( Descr.UsesHMAC ? MICAlgorithm_HMAC_SHA1 : MICAlgorithm_NONE );
+ Context->CryptographicKeyID.Set(Descr.CryptographicKeyID);
+}
- // Add an essence element
- FPTimecodeTrack = m_FilePackage->AddTimecodeTrack(EditRate);
- m_FPTimecode = FPTimecodeTrack->AddTimecodeComponent(TCFrameRate, 0/* NDF */,
- tc_to_frames(TCFrameRate, 1, 0, 0, 0) );
-
- // Add a single Component to this Track of the Material Package
- m_MPClip = m_MPTrack->AddSourceClip();
-
- // Add a single Component to this Track of the File Package
- m_FPClip = m_FPTrack->AddSourceClip();
- const byte_t* SourceEssenceContainerLabel = 0;
+//
+Result_t
+ASDCP::h__Writer::WriteMXFHeader(const std::string& PackageLabel, const UL& WrappingUL,
+ const MXF::Rational& EditRate,
+ ui32_t TCFrameRate, ui32_t BytesPerEditUnit)
+{
+ ASDCP_TEST_NULL(m_EssenceDescriptor);
- // Frame wrapping
- if ( m_Info.EncryptedEssence )
- {
- switch ( EssenceType )
- {
- case ESS_MPEG2_VES:
- SourceEssenceContainerLabel = WrappingUL_Data_MPEG2_VES;
- break;
-
- case ESS_JPEG_2000:
- SourceEssenceContainerLabel = WrappingUL_Data_JPEG_2000;
- break;
-
- case ESS_PCM_24b_48k:
- SourceEssenceContainerLabel = WrappingUL_Data_PCM_24b_48k;
- break;
-
- default:
- return RESULT_RAW_ESS;
- }
- }
+ m_HeaderPart.m_Primer.ClearTagList();
+ m_HeaderPart.m_Preface = new Preface;
+ m_HeaderPart.AddChildObject(m_HeaderPart.m_Preface);
- mem_ptr<UL> WrappingUL;
- switch ( EssenceType )
- {
- case ESS_MPEG2_VES:
- WrappingUL = new UL(WrappingUL_Data_MPEG2_VES); // memchk TESTED
- break;
-
- case ESS_JPEG_2000:
- WrappingUL = new UL(WrappingUL_Data_JPEG_2000); // memchk TESTED
- break;
-
- case ESS_PCM_24b_48k:
- WrappingUL = new UL(WrappingUL_Data_PCM_24b_48k); // memchk TESTED
- break;
-
- default:
- return RESULT_RAW_ESS;
- }
- assert(!WrappingUL.empty());
- m_EssenceDescriptor->SetValue("EssenceContainer", DataChunk(klv_key_size, WrappingUL->GetValue()));
-
- // Write a File Descriptor only on the internally ref'ed Track
- m_EssenceDescriptor->SetUint("LinkedTrackID", m_FPTrack->GetUint("TrackID"));
- m_FilePackage->AddChild("Descriptor")->MakeLink(*m_EssenceDescriptor);
+ // Set the Operational Pattern label -- we're just starting and have no RIP or index,
+ // so we tell the world by using OP1a
+ m_HeaderPart.m_Preface->OperationalPattern = UL(OP1aUL);
+ m_HeaderPart.OperationalPattern = m_HeaderPart.m_Preface->OperationalPattern;
+ m_HeaderPart.m_RIP.PairArray.push_back(RIP::Pair(1, 0)); // First RIP Entry
- UL CryptEssenceUL(WrappingUL_Data_Crypt);
+ //
+ // Identification
+ //
+ Identification* Ident = new Identification;
+ m_HeaderPart.AddChildObject(Ident);
+ m_HeaderPart.m_Preface->Identifications.push_back(Ident->InstanceUID);
+
+ Ident->ThisGenerationUID.GenRandomValue();
+ Ident->CompanyName = m_Info.CompanyName.c_str();
+ Ident->ProductName = m_Info.ProductName.c_str();
+ Ident->VersionString = m_Info.ProductVersion.c_str();
+ Ident->ProductUID.Set(m_Info.ProductUUID);
+ // Ident->Platform = WM_PLATFORM;
+ Ident->ToolkitVersion.Release = VersionType::RL_DEVELOPMENT;
+ Ident->ToolkitVersion.Major = VERSION_MAJOR;
+ Ident->ToolkitVersion.Minor = VERSION_APIMINOR;
+ Ident->ToolkitVersion.Patch = VERSION_IMPMINOR;
+ Ident->ToolkitVersion.Build = WM_BUILD_NUMBER;
+
+ //
+ ContentStorage* Storage = new ContentStorage;
+ m_HeaderPart.AddChildObject(Storage);
+ m_HeaderPart.m_Preface->ContentStorage = Storage->InstanceUID;
+ EssenceContainerData* ECD = new EssenceContainerData;
+ m_HeaderPart.AddChildObject(ECD);
+ Storage->EssenceContainerData.push_back(ECD->InstanceUID);
+ ECD->IndexSID = 129;
+ ECD->BodySID = 1;
+
+ //
+ // Material Package
+ //
+ UMID PackageUMID;
+ PackageUMID.MakeUMID(0x0d); // Using mixed type. What is the actual type?
+
+ m_MaterialPackage = new MaterialPackage;
+ m_MaterialPackage->Name = "AS-DCP Material Package";
+ m_MaterialPackage->PackageUID = PackageUMID;
+
+ m_HeaderPart.AddChildObject(m_MaterialPackage);
+ Storage->Packages.push_back(m_MaterialPackage->InstanceUID);
+
+ // Timecode Track
+ Track* NewTrack = new Track;
+ m_HeaderPart.AddChildObject(NewTrack);
+ NewTrack->EditRate = EditRate;
+ m_MaterialPackage->Tracks.push_back(NewTrack->InstanceUID);
+ NewTrack->TrackID = 1;
+ NewTrack->TrackName = "Timecode Track";
+
+ Sequence* Seq = new Sequence;
+ m_HeaderPart.AddChildObject(Seq);
+ NewTrack->Sequence = Seq->InstanceUID;
+ Seq->DataDefinition = UL(TCDD_Data);
+
+ m_MPTimecode = new TimecodeComponent;
+ m_HeaderPart.AddChildObject(m_MPTimecode);
+ Seq->StructuralComponents.push_back(m_MPTimecode->InstanceUID);
+ m_MPTimecode->RoundedTimecodeBase = TCFrameRate;
+ m_MPTimecode->StartTimecode = ui64_C(0);
+ m_MPTimecode->DataDefinition = UL(TCDD_Data);
+
+ // Essence Track
+ NewTrack = new Track;
+ m_HeaderPart.AddChildObject(NewTrack);
+ NewTrack->EditRate = EditRate;
+ m_MaterialPackage->Tracks.push_back(NewTrack->InstanceUID);
+ NewTrack->TrackID = 2;
+ NewTrack->TrackName = "Essence Track";
+
+ Seq = new Sequence;
+ m_HeaderPart.AddChildObject(Seq);
+ NewTrack->Sequence = Seq->InstanceUID;
+
+ m_MPClip = new SourceClip;
+ m_HeaderPart.AddChildObject(m_MPClip);
+ Seq->StructuralComponents.push_back(m_MPClip->InstanceUID);
+
+ //
+ // File (Source) Package
+ //
+ UUID assetUUID(m_Info.AssetUUID);
+ PackageUMID.MakeUMID(0x0f, assetUUID);
+
+ m_FilePackage = new SourcePackage;
+ m_FilePackage->Name = PackageLabel.c_str();
+ m_FilePackage->PackageUID = PackageUMID;
+ ECD->LinkedPackageUID = PackageUMID;
+ m_MPClip->SourcePackageID = PackageUMID;
+ m_MPClip->SourceTrackID = 1;
+
+ m_HeaderPart.AddChildObject(m_FilePackage);
+ Storage->Packages.push_back(m_FilePackage->InstanceUID);
+
+ // Timecode Track
+ NewTrack = new Track;
+ m_HeaderPart.AddChildObject(NewTrack);
+ NewTrack->EditRate = EditRate;
+ m_FilePackage->Tracks.push_back(NewTrack->InstanceUID);
+ NewTrack->TrackID = 1;
+ NewTrack->TrackName = "Timecode Track";
+
+ Seq = new Sequence;
+ m_HeaderPart.AddChildObject(Seq);
+ NewTrack->Sequence = Seq->InstanceUID;
+ Seq->DataDefinition = UL(TCDD_Data);
+
+ m_FPTimecode = new TimecodeComponent;
+ m_HeaderPart.AddChildObject(m_FPTimecode);
+ Seq->StructuralComponents.push_back(m_FPTimecode->InstanceUID);
+ m_FPTimecode->RoundedTimecodeBase = TCFrameRate;
+ m_FPTimecode->StartTimecode = ui64_C(86400); // 01:00:00:00
+ m_FPTimecode->DataDefinition = UL(TCDD_Data);
+
+ // Essence Track
+ NewTrack = new Track;
+ m_HeaderPart.AddChildObject(NewTrack);
+ NewTrack->EditRate = EditRate;
+ m_FilePackage->Tracks.push_back(NewTrack->InstanceUID);
+ NewTrack->TrackID = 2;
+ NewTrack->TrackName = "Essence Track";
+
+ Seq = new Sequence;
+ m_HeaderPart.AddChildObject(Seq);
+ NewTrack->Sequence = Seq->InstanceUID;
+
+ m_FPClip = new SourceClip;
+ m_HeaderPart.AddChildObject(m_FPClip);
+ Seq->StructuralComponents.push_back(m_FPClip->InstanceUID);
+
+ //
+ // Essence Descriptor
+ //
+ m_EssenceDescriptor->EssenceContainer = WrappingUL;
+ m_EssenceDescriptor->LinkedTrackID = NewTrack->TrackID;
+
+ // link the Material Package to the File Package ?????????????????????????????????
+ Seq->StructuralComponents.push_back(NewTrack->InstanceUID);
+ m_HeaderPart.m_Preface->PrimaryPackage = m_FilePackage->InstanceUID;
+
+ //
+ // Encryption Descriptor
+ //
if ( m_Info.EncryptedEssence )
{
- m_Metadata->AddEssenceType(CryptEssenceUL);
+ UL CryptEssenceUL(WrappingUL_Data_Crypt);
+ m_HeaderPart.EssenceContainers.push_back(CryptEssenceUL);
+ m_HeaderPart.m_Preface->EssenceContainers.push_back(CryptEssenceUL);
+ m_HeaderPart.m_Preface->DMSchemes.push_back(UL(CryptoFrameworkUL_Data));
+ AddDMScrypt(m_HeaderPart, *m_FilePackage, m_Info, WrappingUL);
}
else
{
UL GCUL(GCMulti_Data);
- m_Metadata->AddEssenceType(GCUL);
- m_Metadata->AddEssenceType(*WrappingUL);
+ m_HeaderPart.EssenceContainers.push_back(GCUL);
+ m_HeaderPart.EssenceContainers.push_back(WrappingUL);
+ m_HeaderPart.m_Preface->EssenceContainers = m_HeaderPart.EssenceContainers;
}
- // Link the MP to the FP
- m_MPClip->MakeLink(m_FPTrack, 0);
+ m_HeaderPart.AddChildObject(m_EssenceDescriptor);
+ m_FilePackage->Descriptor = m_EssenceDescriptor->InstanceUID;
+
+ // Write the header partition
+ Result_t result = m_HeaderPart.WriteToFile(m_File, HeaderPadding);
//
- // ** Write out the header **
+ // Body Partition
//
- m_HeaderPart = new Partition("OpenHeader");
- assert(m_HeaderPart);
- m_HeaderPart->SetKAG(1); // Everything else can stay at default
- m_HeaderPart->SetUint("BodySID", 1);
-
- m_HeaderPart->AddMetadata(m_Metadata);
-
- // Build an Ident set describing us and link into the metadata
- MDObject* Ident = new MDObject("Identification");
- assert(Ident);
- Ident->SetString("CompanyName", m_Info.CompanyName);
- Ident->SetString("ProductName", m_Info.ProductName);
- Ident->SetString("VersionString", m_Info.ProductVersion);
- UUID ProductUID(m_Info.ProductUUID);
- Ident->SetValue("ProductUID", DataChunk(UUIDlen, ProductUID.GetValue()));
-
- // TODO: get Oliver to show me how this works
- // Ident->SetString("ToolkitVersion", ?);
- m_Metadata->UpdateGenerations(*Ident);
+ //
+ // Index setup
+ //
+ fpos_t ECoffset = m_File.Tell();
- if ( m_Info.EncryptedEssence )
- AddDMScrypt(m_FilePackage, m_Info, SourceEssenceContainerLabel);
+ if ( BytesPerEditUnit == 0 )
+ m_FooterPart.SetIndexParamsVBR(&m_HeaderPart.m_Primer, EditRate, ECoffset);
+ else
+ m_FooterPart.SetIndexParamsCBR(&m_HeaderPart.m_Primer, BytesPerEditUnit, EditRate);
- // Write the header partition
- m_File->WritePartition(*m_HeaderPart, HeaderPadding);
-
- // set up the index
- switch ( EssenceType )
- {
- case ESS_MPEG2_VES:
- case ESS_JPEG_2000:
- m_IndexMan = new IndexManager(0, 0);
- m_IndexMan->SetPosTableIndex(0, -1);
- break;
-
- case ESS_PCM_24b_48k:
- m_IndexMan = new IndexManager(0, BytesPerEditUnit);
- break;
-
- case ESS_UNKNOWN:
- return RESULT_INIT;
- }
+ return result;
+}
- m_IndexMan->SetBodySID(1);
- m_IndexMan->SetIndexSID(129);
- m_IndexMan->SetEditRate(EditRate);
-#endif
- return RESULT_OK;
-}
// standard method of writing a plaintext or encrypted frame
Result_t
@@ -357,96 +426,41 @@ ASDCP::h__Writer::WriteEKLVPacket(const ASDCP::FrameBuffer& FrameBuf, const byte
// standard method of writing the header and footer of a completed MXF file
//
Result_t
-ASDCP::h__Writer::WriteMXFFooter(EssenceType_t EssenceType)
+ASDCP::h__Writer::WriteMXFFooter()
{
-#if 0
- // write the index
- DataChunk IndexChunk;
- ui32_t IndexSID = 0;
-
- // Find all essence container data sets so we can update "IndexSID"
- MDObjectListPtr ECDataSets = 0;
- MDObject* Ptr = (*m_Metadata)["ContentStorage"];
- if ( Ptr )
- Ptr = Ptr->GetLink();
- if ( Ptr )
- Ptr = (*Ptr)["EssenceContainerData"];
- if ( Ptr )
- ECDataSets = Ptr->ChildList("EssenceContainer");
-
- // ** Handle full index tables next **
- // ***********************************
-
- // Make an index table containing all available entries
- IndexTablePtr Index = m_IndexMan->MakeIndex();
- m_IndexMan->AddEntriesToIndex(Index);
-
- // Write the index table
- Index->WriteIndex(IndexChunk);
-
- // Record the IndexSID for when the index is written
- IndexSID = Index->IndexSID;
-
- // Update IndexSID in essence container data set
- MDObjectList::iterator ECD_it = ECDataSets->begin();
- while(ECD_it != ECDataSets->end())
- {
- if((*ECD_it)->GetLink())
- {
- if((*ECD_it)->GetLink()->GetUint("BodySID") == m_IndexMan->GetBodySID())
- {
- (*ECD_it)->GetLink()->SetUint("IndexSID", m_IndexMan->GetIndexSID());
- break;
- }
- }
-
- ECD_it++;
- }
-
- // If we are writing OP-Atom this is the first place we can claim it
- m_Metadata->SetOP(OPAtomUL);
-
// Set top-level file package correctly for OP-Atom
- m_Metadata->SetPrimaryPackage(m_FilePackage);
-
- m_Metadata->SetTime();
- m_MPTimecode->SetDuration(m_FramesWritten);
-
- m_MPClip->SetDuration(m_FramesWritten);
- m_FPTimecode->SetDuration(m_FramesWritten);
- m_FPClip->SetDuration(m_FramesWritten);
- m_EssenceDescriptor->SetInt64("ContainerDuration", m_FramesWritten);
-
- // Turn the header or body partition into a footer
- m_HeaderPart->ChangeType("CompleteFooter");
- m_HeaderPart->SetUint("IndexSID", IndexSID);
+ m_MPTimecode->Duration = m_FramesWritten;
+ m_MPClip->Duration = m_FramesWritten;
+ m_FPTimecode->Duration = m_FramesWritten;
+ m_FPClip->Duration = m_FramesWritten;
+ m_EssenceDescriptor->ContainerDuration = m_FramesWritten;
+
+ fpos_t here = m_File.Tell();
+ m_HeaderPart.m_RIP.PairArray.push_back(RIP::Pair(1, here)); // Third RIP Entry
+ m_HeaderPart.FooterPartition = here;
+ m_HeaderPart.BodySID = 1;
+ m_HeaderPart.IndexSID = m_FooterPart.IndexSID;
+ m_HeaderPart.OperationalPattern = UL(OPAtomUL);
+ m_HeaderPart.m_Preface->OperationalPattern = m_HeaderPart.OperationalPattern;
+
+ m_FooterPart.OperationalPattern = m_HeaderPart.OperationalPattern;
+ m_FooterPart.EssenceContainers = m_HeaderPart.EssenceContainers;
+ m_FooterPart.FooterPartition = here;
+ m_FooterPart.ThisPartition = here;
+
+ Result_t result = m_FooterPart.WriteToFile(m_File, m_FramesWritten);
- // Make sure any new sets are linked in
- m_HeaderPart->UpdateMetadata(m_Metadata);
-
- // Actually write the footer
- m_File.WritePartitionWithIndex(*m_HeaderPart, &IndexChunk, false);
-
- // Add a RIP
- m_File.WriteRIP();
+ if ( ASDCP_SUCCESS(result) )
+ result = m_HeaderPart.m_RIP.WriteToFile(m_File);
- //
- // ** Update the header **
- //
- // For generalized OPs update the value of "FooterPartition" in the header pack
- // For OP-Atom re-write the entire header
- //
- ASDCP::fpos_t FooterPos = m_HeaderPart->GetUint64("FooterPartition");
- m_File.Seek(0);
+ if ( ASDCP_SUCCESS(result) )
+ result = m_File.Seek(0);
- m_HeaderPart->ChangeType("ClosedCompleteHeader");
- m_HeaderPart->SetUint64("FooterPartition", FooterPos);
- m_HeaderPart->SetUint64("BodySID", 1);
+ if ( ASDCP_SUCCESS(result) )
+ result = m_HeaderPart.WriteToFile(m_File, HeaderPadding);
- m_File.ReWritePartition(*m_HeaderPart);
m_File.Close();
-#endif
- return RESULT_OK;
+ return result;
}
//
diff --git a/src/klvwalk.cpp b/src/klvwalk.cpp
index 0f3bac5..5db8fac 100755
--- a/src/klvwalk.cpp
+++ b/src/klvwalk.cpp
@@ -84,7 +84,7 @@ main(int argc, char** argv)
result = Header.InitFromFile(Reader);
// if ( ASDCP_SUCCESS(result) )
- Header.Dump();
+ Header.Dump(stdout);
if ( ASDCP_SUCCESS(result) )
{
@@ -98,7 +98,7 @@ main(int argc, char** argv)
}
if ( ASDCP_SUCCESS(result) )
- Index.Dump();
+ Index.Dump(stdout);
}
}
else if ( rewrite_mxf )
@@ -148,7 +148,7 @@ main(int argc, char** argv)
while ( ASDCP_SUCCESS(result) )
{
- KP.Dump(stderr, true);
+ KP.Dump(stdout, true);
result = KP.InitFromFile(Reader);
}
@@ -156,7 +156,7 @@ main(int argc, char** argv)
result = RESULT_OK;
}
- if ( result != RESULT_OK )
+ if ( ASDCP_FAILURE(result) )
{
fputs("Program stopped on error.\n", stderr);
@@ -176,13 +176,3 @@ main(int argc, char** argv)
//
// end klvwalk.cpp
//
-
-
-
-
-
-
-
-
-
-