/*
-Copyright (c) 2011-2015, John Hurst
+Copyright (c) 2011-2016, John Hurst
All rights reserved.
UL body_ul(m_Dict->ul(MDD_ClosedCompleteBodyPartition));
Partition body_part(m_Dict);
body_part.BodySID = 1;
+ body_part.MajorVersion = m_HeaderPart.MajorVersion;
+ body_part.MinorVersion = m_HeaderPart.MinorVersion;
body_part.OperationalPattern = m_HeaderPart.OperationalPattern;
body_part.EssenceContainers = m_HeaderPart.EssenceContainers;
body_part.ThisPartition = m_ECStart;
UL body_ul(m_Dict->ul(MDD_ClosedCompleteBodyPartition));
Partition body_part(m_Dict);
body_part.BodySID = 1;
+ body_part.MajorVersion = m_HeaderPart.MajorVersion;
+ body_part.MinorVersion = m_HeaderPart.MinorVersion;
body_part.OperationalPattern = m_HeaderPart.OperationalPattern;
body_part.EssenceContainers = m_HeaderPart.EssenceContainers;
body_part.ThisPartition = m_File.Tell();
static UL GenericStream_DataElement(m_Dict->ul(MDD_GenericStream_DataElement));
ASDCP::MXF::Partition GSPart(m_Dict);
+ GSPart.MajorVersion = m_HeaderPart.MajorVersion;
+ GSPart.MinorVersion = m_HeaderPart.MinorVersion;
GSPart.ThisPartition = here;
GSPart.PreviousPartition = m_RIP.PairArray.back().ByteOffset;
GSPart.OperationalPattern = m_HeaderPart.OperationalPattern;
assert(m_Dict);
ASDCP::MXF::Partition partition(m_Dict);
+ partition.MajorVersion = m_HeaderPart.MajorVersion;
+ partition.MinorVersion = m_HeaderPart.MinorVersion;
partition.ThisPartition = here;
partition.BodySID = 0;
partition.IndexSID = 129;
static UL GenericStream_DataElement(m_Dict->ul(MDD_GenericStream_DataElement));
ASDCP::MXF::Partition GSPart(m_Dict);
+ GSPart.MajorVersion = m_HeaderPart.MajorVersion;
+ GSPart.MinorVersion = m_HeaderPart.MinorVersion;
GSPart.ThisPartition = here;
GSPart.PreviousPartition = m_RIP.PairArray.back().ByteOffset;
GSPart.BodySID = m_EssenceStreamID;
/*
-Copyright (c) 2011-2015, Robert Scheler, Heiko Sparenberg Fraunhofer IIS,
+Copyright (c) 2011-2016, Robert Scheler, Heiko Sparenberg Fraunhofer IIS,
John Hurst
All rights reserved.
UL body_ul(this->m_Dict->ul(MDD_ClosedCompleteBodyPartition));
Partition body_part(this->m_Dict);
body_part.BodySID = 1;
+ body_part.MajorVersion = this->m_HeaderPart.MajorVersion;
+ body_part.MinorVersion = this->m_HeaderPart.MinorVersion;
body_part.OperationalPattern = this->m_HeaderPart.OperationalPattern;
body_part.EssenceContainers = this->m_HeaderPart.EssenceContainers;
body_part.ThisPartition = this->m_ECStart;
this->m_HeaderPart.FooterPartition = here;
assert(this->m_Dict);
+ footer_part.MajorVersion = this->m_HeaderPart.MajorVersion;
+ footer_part.MinorVersion = this->m_HeaderPart.MinorVersion;
footer_part.OperationalPattern = this->m_HeaderPart.OperationalPattern;
footer_part.EssenceContainers = this->m_HeaderPart.EssenceContainers;
footer_part.FooterPartition = here;
#include <mach-o/dyld.h>
#endif
+#if defined(__OpenBSD__)
+#include <sys/sysctl.h>
+#endif
+
using namespace Kumu;
#ifdef KM_WIN32
size_t size = X_BUFSIZE;
ssize_t rc = readlink("/proc/self/exe", path, size);
success = ( rc != -1 );
-#elif defined(__OpenBSD__) || defined(__FreeBSD__)
- size_t size = X_BUFSIZE;
- ssize_t rc = readlink("/proc/curproc/file", path, size);
- success = ( rc != -1 );
+#elif defined(__OpenBSD__)
+ // This fails if the CWD changes after the program has started but before the
+ // call to GetExecutablePath(). For least surprise, call GetExecutablePath()
+ // immediately in main() and save the value for later use.
+ const, char* p = getenv("_");
+ if ( p )
+ {
+ return Kumu::PathMakeAbsolute(p);
+ }
#elif defined(__FreeBSD__)
+ // requires procfs
size_t size = X_BUFSIZE;
ssize_t rc = readlink("/proc/curproc/file", path, size);
success = ( rc != -1 );
#elif defined(__NetBSD__)
size_t size = X_BUFSIZE;
- ssize_t rc = readlink("/proc/curproc/file", path, size);
+ ssize_t rc = readlink("/proc/curproc/exe", path, size);
success = ( rc != -1 );
#elif defined(__sun) && defined(__SVR4)
size_t size = X_BUFSIZE;
/*
-Copyright (c) 2011-2013, Robert Scheler, Heiko Sparenberg Fraunhofer IIS,
+Copyright (c) 2011-2016, Robert Scheler, Heiko Sparenberg Fraunhofer IIS,
John Hurst
All rights reserved.
UL body_ul(m_Dict->ul(MDD_ClosedCompleteBodyPartition));
Partition body_part(m_Dict);
+ body_part.MajorVersion = m_HeaderPart.MajorVersion;
+ body_part.MinorVersion = m_HeaderPart.MinorVersion;
body_part.BodySID = 1;
body_part.OperationalPattern = m_HeaderPart.OperationalPattern;
body_part.EssenceContainers = m_HeaderPart.EssenceContainers;