-//
-// Identifier.h
-//
+/*
+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 Identifier.h
+ \version $Id$
+ \brief strings of bytes that identify things
+*/
#ifndef _IDENTIFIER_H_
#define _IDENTIFIER_H_
-//
-//
-//
+/*
+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 Index.h
+ \version $Id$
+ \brief MXF index segment objects
+*/
#ifndef _INDEX_H_
#define _INDEX_H_
/*
-Copyright (c) 2005, John Hurst
+Copyright (c) 2005-2006, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
picture track file formats proposed by the SMPTE working
group DC-28.20.
-This work was funded by Digital Cinema Initiatives, LLC
-and others.
+This work was originally funded by Digital Cinema
+Initiatives, LLC. Subsequent efforts have been funded by
+Deluxe Laboratories, Doremi Labs, and others.
**The asdcplib project is housed on SourceForge. The project
home page is at http://sourceforge.net/projects/asdcplib.
The project used to depend upon the mxflib project. Because
of the focus on covering the whole of the MXF spscifications,
-mxflib is considerably larger and more complex that what we
-require for this application. For this reason we have forked
-mxflib and have simplified its implementation to better suit
-our application. Thanks to Matt Beard and Oliver Morgan for
-their great work and support.
-
-OpenSSL is also required if you want to read and write
-encrypted AS-DCP files. See http://www.openssl.org
+mxflib is considerably larger and more complex that what I
+require for this application. For this reason I have created
+a dedicated MXF interface that is now part of this library.
+Special thanks to Matt Beard and Oliver Morgan for their great
+work and support.
Thanks also to the members of the SMPTE DC-28.20 packaging
ad-hoc group and the members of the MXF Interop Initiative
GNU make is required to build asdcplib. The makefile will
work on win32 systems that have Cygwin. Other win32 gmake
packages may or may not work depending upon the availability
-of standard POSIX shell commands.
+of standard POSIX shell commands. You will need gcc to rebuild
+the dep.make file.
+
+OpenSSL is required if you want to read and write encrypted
+AS-DCP files. See http://www.openssl.org
-If you are building on win32 or a unix with no OpenSSL
-library support, you will have to also obtain and build
-OpenSSL (I'm using 0.9.7d). Unpack it into the same
-parent directory as asdcplib/, and rename the directory
-as (or make a sym link named) 'openssl':
+If you are building on win32 or a unix with no OpenSSL library
+support, you will have to also obtain and build OpenSSL (I'm
+using 0.9.7d on win32). Unpack it into the same parent directory
+as asdcplib/, and rename the directory as (or make a sym link
+named) 'openssl':
myhost$ ls -l
total 1761
Change History
+2005.00.00 - A New Hope
+ o The temporary mxf-lite has been removed. MXF files are now
+ managed via the objects in KLV.h, MXFTypes.h MXF.h and
+ Metadata.h. This release does not support writing MXF files.
+ o Fixed a header interpretation error in the Wav parser.
+
+
2005.00.00 - The Reformation
o Removed mxflib as a dependency by forking the necessary
functions and placing them in the mxf-lite subdirectory.
// 1.0.1. If changes were also required in AS_DCP.h, the new version would be 1.1.1.
const ui32_t VERSION_MAJOR = 1;
const ui32_t VERSION_APIMINOR = 0;
- const ui32_t VERSION_IMPMINOR = 3;
+ const ui32_t VERSION_IMPMINOR = 4;
const char* Version();
// UUIDs are passed around as strings of UUIDlen bytes
// misc subroutines
-// helper class for XXX below
-//
-class PathSplitter
-{
-public:
- char* Root;
- char* SubPath;
-
- PathSplitter(const std::string Str)
- {
- Root = strdup(Str.c_str());
- assert(Root);
-
- // sub-path exists?
- SubPath = strchr(Root, OBJECT_PATH_SEPARATOR);
-
- if ( SubPath )
- {
- while ( SubPath[1] == OBJECT_PATH_SEPARATOR )
- SubPath++;
-
- *SubPath++ = 0;
-
- if ( *SubPath == 0 )
- SubPath = 0;
- }
- }
-
- ~PathSplitter() {
- free(Root);
- }
-};
-
//
void
ASDCP::WriterInfoDump(const WriterInfo& Info, FILE* stream)
-//
-// Index.cpp
-//
+/*
+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 Index.cpp
+ \version $Id$
+ \brief MXF index segment objects
+*/
#include "MDD.h"
#include "MXF.h"
fprintf(stream, " PosTableCount = %hu\n", PosTableCount);
fprintf(stream, " DeltaEntryArray:\n"); DeltaEntryArray.Dump(stream);
- fprintf(stream, " IndexEntryArray:\n"); IndexEntryArray.Dump(stream);
+
+ if ( IndexEntryArray.size() < 100 )
+ {
+ fprintf(stream, " IndexEntryArray:\n");
+ IndexEntryArray.Dump(stream);
+ }
+ else
+ {
+ fprintf(stream, " IndexEntryArray: %lu entries\n", IndexEntryArray.size());
+ }
fputs("==========================================================================\n", stream);
}
/*
-Copyright (c) 2005, John Hurst
+Copyright (c) 2005-2006, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
-//
-// KLV.cpp
-//
+/*! \file KLV.cpp
+ \version $Id$
+ \brief KLV objects
+*/
#include "KLV.h"
#include <hex_utils.h>
/*
-Copyright (c) 2005, John Hurst
+Copyright (c) 2005-2006, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
(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 KLV.h
+ \version $Id$
+ \brief KLV objects
+*/
#ifndef _KLV_H_
#define _KLV_H_
-//
-// MDD.h
-//
+/*
+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 MDD.h
+ \version $Id$
+ \brief MXF constants
+*/
#ifndef _MDD_H_
#define _MDD_H_
#define ASDCP_DECLARE_MDD
#include "MDD.h"
-
+#include "Mutex.h"
#include "MXF.h"
#include "Metadata.h"
#include <hex_utils.h>
return m_PacketList->GetMDObjectByType(ObjectID, Object);
}
+//
ASDCP::MXF::Identification*
ASDCP::MXF::OPAtomHeader::GetIdentification()
{
return 0;
}
+//
+ASDCP::MXF::SourcePackage*
+ASDCP::MXF::OPAtomHeader::GetSourcePackage()
+{
+ InterchangeObject* Object;
+
+ if ( ASDCP_SUCCESS(GetMDObjectByType(OBJ_TYPE_ARGS(SourcePackage), &Object)) )
+ return (SourcePackage*)Object;
+
+ return 0;
+}
+
//
ASDCP::Result_t
ASDCP::MXF::OPAtomHeader::WriteToFile(ASDCP::FileWriter& Writer, ui32_t HeaderSize)
};
//
-typedef std::map<ASDCP::UL, FLT_t> FactoryList;
-#define SETUP_IDX(t) const ui32_t FLT_##t = v;
+typedef std::map<ASDCP::UL, FLT_t>::iterator FLi_t;
+
+class FactoryList : public std::map<ASDCP::UL, FLT_t>
+{
+ ASDCP::Mutex m_Lock;
+public:
+ FactoryList() {}
+ ~FactoryList() {}
+
+ bool Empty() {
+ ASDCP::AutoMutex BlockLock(m_Lock);
+ return empty();
+ }
+
+ FLi_t Find(const byte_t* label) {
+ ASDCP::AutoMutex BlockLock(m_Lock);
+ return find(label);
+ }
+
+ FLi_t End() {
+ ASDCP::AutoMutex BlockLock(m_Lock);
+ return end();
+ }
+
+};
+
+//
static FactoryList s_FactoryList;
+
+#define SETUP_IDX(t) const ui32_t FLT_##t = v;
#define SETUP_FACTORY(t) s_FactoryList.insert(FactoryList::value_type(s_MDD_Table[MDDindex_##t].ul, FLT_##t));
#define CASE_FACTORY(t) case FLT_##t: return new t
SETUP_FACTORY(CryptographicContext);
}
- FactoryList::iterator i = s_FactoryList.find(label);
+ FLi_t i = s_FactoryList.find(label);
if ( i == s_FactoryList.end() )
return new InterchangeObject;
-//
-//
-//
+/*
+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_
//
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();
};
//
+/*
+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 MXFTypes.cpp
+ \version $Id$
+ \brief MXF objects
+*/
#include "MXFTypes.h"
{
if ( Entry.tag.a == 0 )
{
- DefaultLogSink().Error("No such UL in this TL list: %s (%02x %02x)\n",
- Entry.name, Entry.tag.a, Entry.tag.b);
+ DefaultLogSink().Info("No such UL in this TL list: %s (%02x %02x)\n",
+ Entry.name, Entry.tag.a, Entry.tag.b);
return false;
}
return true;
}
- // DefaultLogSink().Warn("Not Found (%02x %02x): %s\n", TmpTag.a, TmpTag.b, Entry.name);
+ DefaultLogSink().Info("Not Found (%02x %02x): %s\n", TmpTag.a, TmpTag.b, Entry.name);
return false;
}
-//
-// MXFTypes.h
-//
+/*
+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 MXFTypes.h
+ \version $Id$
+ \brief MXF objects
+*/
#ifndef _MXFTYPES_H_
#define _MXFTYPES_H_
-
-
-#endif //_MXFTYPES_H_
-
#include "KLV.h"
#include <list>
#include <vector>
} // namespace ASDCP
+#endif //_MXFTYPES_H_
+
//
// end MXFTypes.h
//
-//
-//
-// TODO: constructor initializers for all member variables
-//
+/*
+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 Metadata.h
+ \version $Id$
+ \brief MXF metadata objects
+*/
#ifndef _METADATA_H_
#define _METADATA_H_
MPEG2::VideoDescriptorDump(*this, stream);
}
};
-#if 0
+
class MyPictureDescriptor : public JP2K::PictureDescriptor
{
public:
PCM::AudioDescriptorDump(*this, stream);
}
};
-#endif
+
// MSVC didn't like the function template, so now it's a static class method
template<class ReaderT, class DescriptorT>
fputs("File essence type is MPEG2 video.\n", stdout);
FileInfoWrapper<ASDCP::MPEG2::MXFReader, MyVideoDescriptor>::file_info(Options);
}
-#if 0
else if ( EssenceType == ESS_PCM_24b_48k )
{
fputs("File essence type is PCM audio.\n", stdout);
fputs("File essence type is JPEG 2000 pictures.\n", stdout);
FileInfoWrapper<ASDCP::JP2K::MXFReader, MyPictureDescriptor>::file_info(Options);
}
-#endif
else
{
fprintf(stderr, "File is not AS-DCP: %s\n", Options.filenames[0]);
if ( ASDCP_SUCCESS(result) )
{
+ TestHeader.Partition::Dump();
+
if ( MXF::Identification* ID = TestHeader.GetIdentification() )
- {
- TestHeader.Dump();
- ID->Dump();
- // show OP
- // show
- }
+ ID->Dump();
else
- {
- fputs("File contains no Identification object.\n", stdout);
- }
+ fputs("File contains no Identification object.\n", stdout);
+
+ if ( MXF::SourcePackage* SP = TestHeader.GetSourcePackage() )
+ SP->Dump();
+ else
+ fputs("File contains no SourcePackage object.\n", stdout);
}
else
{
}
else if ( Options.create_flag )
{
+ fprintf(stderr, "ATTENTION! This version of asdcplib does not support writing MXF files.\n");
+
+#if 0
if ( Options.do_repeat && ! Options.duration_flag )
{
fputs("Option -R requires -d <duration>\n", stderr);
#ifdef SMPTE_LABELS
fprintf(stderr, "ATTENTION! Writing SMPTE Universal Labels\n");
#endif
-#if 0
if ( ASDCP_SUCCESS(result) )
{
switch ( EssenceType )
+/*
+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 jp2k-test.cpp
+ \version $Id$
+ \brief JP2K parser test
+*/
#include <AS_DCP.h>
#include <FileIO.h>
-//
-// klvwalk.cpp
-//
+/*
+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 klvwalk.cpp
+ \version $Id$
+ \brief KLV+MXF test
+*/
#include <AS_DCP.h>
#include <MXF.h>