-//
-//
-//
+/*
+Copyright (c) 2005-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 MXF.h
+ \version $Id$
+ \brief MXF objects
+*/
#ifndef _MXF_H_
#define _MXF_H_
inline const char* ToString(char* str_buf) const {
char intbuf[IntBufferLen];
- sprintf(str_buf, "%-6lu: %s", BodySID, ui64sz(ByteOffset, intbuf));
+ snprintf(str_buf, IdentBufferLen, "%-6lu: %s", BodySID, ui64sz(ByteOffset, intbuf));
return str_buf;
}
ASDCP::UL UL;
inline const char* ToString(char* str_buf) const {
- sprintf(str_buf, "%02x %02x: ", Tag.a, Tag.b);
+ snprintf(str_buf, IdentBufferLen, "%02x %02x: ", Tag.a, Tag.b);
UL.ToString(str_buf + strlen(str_buf));
return str_buf;
}
public:
IPrimerLookup* m_Lookup;
UID InstanceUID;
+ UUID GenerationUID;
InterchangeObject() : m_Lookup(0) {}
virtual ~InterchangeObject() {}
+ virtual Result_t InitFromTLVSet(TLVReader& TLVSet);
virtual Result_t WriteToBuffer(ASDCP::FrameBuffer&);
virtual bool IsA(const byte_t* label);
-
- virtual void Dump(FILE* stream = 0) {
- KLVPacket::Dump(stream, true);
- }
+ virtual void Dump(FILE* stream = 0);
};
//
//
class h__PacketList; // See MXF.cpp
class Identification;
+ class SourcePackage;
//
class OPAtomHeader : public Partition
virtual Result_t WriteToFile(ASDCP::FileWriter& Writer, ui32_t HeaderLength = 16384);
virtual void Dump(FILE* = 0);
virtual Result_t GetMDObjectByType(const byte_t*, InterchangeObject** = 0);
- Identification* GetIdentification();
+ Identification* GetIdentification();
+ SourcePackage* GetSourcePackage();
};
//