summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2005-12-20 19:16:21 +0000
committerjhurst <>2005-12-20 19:16:21 +0000
commitc6900386fb66832781456838804ed7e28c535d63 (patch)
tree3c387a66aec432229d1d987b9209e819bb80c5c3 /src
parentd440dbd72e7b3395c589a72e391eb33b6d2109f4 (diff)
pre-release commit
Diffstat (limited to 'src')
-rwxr-xr-xsrc/AS_DCP.h2
-rwxr-xr-xsrc/AS_DCP_MXF.cpp33
-rwxr-xr-xsrc/Index.cpp44
-rwxr-xr-xsrc/KLV.cpp10
-rwxr-xr-xsrc/KLV.h7
-rwxr-xr-xsrc/MDD.h33
-rwxr-xr-xsrc/MXF.cpp48
-rwxr-xr-xsrc/MXF.h37
-rwxr-xr-xsrc/MXFTypes.cpp36
-rwxr-xr-xsrc/MXFTypes.h39
-rwxr-xr-xsrc/Metadata.h34
-rwxr-xr-xsrc/asdcp-test.cpp28
-rwxr-xr-xsrc/j2c-test.cpp30
-rwxr-xr-xsrc/klvwalk.cpp33
14 files changed, 327 insertions, 87 deletions
diff --git a/src/AS_DCP.h b/src/AS_DCP.h
index 06ff8b9..d76c702 100755
--- a/src/AS_DCP.h
+++ b/src/AS_DCP.h
@@ -143,7 +143,7 @@ namespace ASDCP {
// 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
diff --git a/src/AS_DCP_MXF.cpp b/src/AS_DCP_MXF.cpp
index a7cb1e3..03b9b54 100755
--- a/src/AS_DCP_MXF.cpp
+++ b/src/AS_DCP_MXF.cpp
@@ -41,39 +41,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// 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)
diff --git a/src/Index.cpp b/src/Index.cpp
index 9d1791a..96c81ed 100755
--- a/src/Index.cpp
+++ b/src/Index.cpp
@@ -1,6 +1,33 @@
-//
-// 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"
@@ -108,7 +135,16 @@ ASDCP::MXF::IndexTableSegment::Dump(FILE* stream)
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);
}
diff --git a/src/KLV.cpp b/src/KLV.cpp
index b57e805..062fd74 100755
--- a/src/KLV.cpp
+++ b/src/KLV.cpp
@@ -1,5 +1,5 @@
/*
-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
@@ -24,10 +24,10 @@ 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.
*/
-
-//
-// KLV.cpp
-//
+/*! \file KLV.cpp
+ \version $Id$
+ \brief KLV objects
+*/
#include "KLV.h"
#include <hex_utils.h>
diff --git a/src/KLV.h b/src/KLV.h
index 587bbe8..d940ff3 100755
--- a/src/KLV.h
+++ b/src/KLV.h
@@ -1,5 +1,5 @@
/*
-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
@@ -24,7 +24,10 @@ 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 KLV.h
+ \version $Id$
+ \brief KLV objects
+*/
#ifndef _KLV_H_
#define _KLV_H_
diff --git a/src/MDD.h b/src/MDD.h
index 493e30d..bcf0a98 100755
--- a/src/MDD.h
+++ b/src/MDD.h
@@ -1,6 +1,33 @@
-//
-// 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_
diff --git a/src/MXF.cpp b/src/MXF.cpp
index 45570bb..a04cfe2 100755
--- a/src/MXF.cpp
+++ b/src/MXF.cpp
@@ -31,7 +31,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define ASDCP_DECLARE_MDD
#include "MDD.h"
-
+#include "Mutex.h"
#include "MXF.h"
#include "Metadata.h"
#include <hex_utils.h>
@@ -673,6 +673,7 @@ ASDCP::MXF::OPAtomHeader::GetMDObjectByType(const byte_t* ObjectID, InterchangeO
return m_PacketList->GetMDObjectByType(ObjectID, Object);
}
+//
ASDCP::MXF::Identification*
ASDCP::MXF::OPAtomHeader::GetIdentification()
{
@@ -685,6 +686,18 @@ ASDCP::MXF::OPAtomHeader::GetIdentification()
}
//
+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)
{
@@ -974,10 +987,37 @@ enum FLT_t
};
//
-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
@@ -1010,7 +1050,7 @@ ASDCP::MXF::CreateObject(const byte_t* label)
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;
diff --git a/src/MXF.h b/src/MXF.h
index fc0d996..caaecae 100755
--- a/src/MXF.h
+++ b/src/MXF.h
@@ -1,6 +1,33 @@
-//
-//
-//
+/*
+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_
@@ -254,6 +281,7 @@ namespace ASDCP
//
class h__PacketList; // See MXF.cpp
class Identification;
+ class SourcePackage;
//
class OPAtomHeader : public Partition
@@ -274,7 +302,8 @@ namespace ASDCP
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();
};
//
diff --git a/src/MXFTypes.cpp b/src/MXFTypes.cpp
index ca65bdf..2a8949e 100755
--- a/src/MXFTypes.cpp
+++ b/src/MXFTypes.cpp
@@ -1,3 +1,33 @@
+/*
+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"
@@ -96,8 +126,8 @@ ASDCP::MXF::TLVReader::FindTL(const MDDEntry& Entry)
{
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;
}
@@ -113,7 +143,7 @@ ASDCP::MXF::TLVReader::FindTL(const MDDEntry& Entry)
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;
}
diff --git a/src/MXFTypes.h b/src/MXFTypes.h
index 02efbb1..4667588 100755
--- a/src/MXFTypes.h
+++ b/src/MXFTypes.h
@@ -1,14 +1,37 @@
-//
-// 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>
@@ -280,6 +303,8 @@ namespace ASDCP
} // namespace ASDCP
+#endif //_MXFTYPES_H_
+
//
// end MXFTypes.h
//
diff --git a/src/Metadata.h b/src/Metadata.h
index 0a04790..deb1abd 100755
--- a/src/Metadata.h
+++ b/src/Metadata.h
@@ -1,7 +1,33 @@
-//
-//
-// 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_
diff --git a/src/asdcp-test.cpp b/src/asdcp-test.cpp
index c034626..12d8feb 100755
--- a/src/asdcp-test.cpp
+++ b/src/asdcp-test.cpp
@@ -1100,7 +1100,7 @@ class MyVideoDescriptor : public MPEG2::VideoDescriptor
MPEG2::VideoDescriptorDump(*this, stream);
}
};
-#if 0
+
class MyPictureDescriptor : public JP2K::PictureDescriptor
{
public:
@@ -1124,7 +1124,7 @@ class MyAudioDescriptor : public PCM::AudioDescriptor
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>
@@ -1181,7 +1181,6 @@ show_file_info(CommandOptions& Options)
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);
@@ -1192,7 +1191,6 @@ show_file_info(CommandOptions& Options)
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]);
@@ -1206,17 +1204,17 @@ show_file_info(CommandOptions& Options)
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
{
@@ -1307,6 +1305,9 @@ 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 0
if ( Options.do_repeat && ! Options.duration_flag )
{
fputs("Option -R requires -d <duration>\n", stderr);
@@ -1318,7 +1319,6 @@ main(int argc, const char** argv)
#ifdef SMPTE_LABELS
fprintf(stderr, "ATTENTION! Writing SMPTE Universal Labels\n");
#endif
-#if 0
if ( ASDCP_SUCCESS(result) )
{
switch ( EssenceType )
diff --git a/src/j2c-test.cpp b/src/j2c-test.cpp
index 98c7cf4..cfced0c 100755
--- a/src/j2c-test.cpp
+++ b/src/j2c-test.cpp
@@ -1,3 +1,33 @@
+/*
+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>
diff --git a/src/klvwalk.cpp b/src/klvwalk.cpp
index 3704f10..96d31e4 100755
--- a/src/klvwalk.cpp
+++ b/src/klvwalk.cpp
@@ -1,6 +1,33 @@
-//
-// 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>