summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormilla <marc.illa@dolby.com>2021-05-26 13:59:19 +0200
committermilla <marc.illa@dolby.com>2021-06-03 14:05:45 +0200
commitfdd28f8bb3608978e75b27c5410db447396f361b (patch)
tree4fd3e9ff4fa808993214956dd5753f950a6a1e47 /src
parentf9d7fbc33aa571c547d916b145712469efd9f4b8 (diff)
Put definitions inside their corresponding namespaces
Diffstat (limited to 'src')
-rwxr-xr-xsrc/AS_DCP_JP2K.cpp11
-rwxr-xr-xsrc/AS_DCP_MPEG2.cpp6
-rwxr-xr-xsrc/AS_DCP_internal.h6
-rw-r--r--src/CMakeLists.txt16
-rw-r--r--src/CRC16.cpp (renamed from src/CRC16.c)4
-rw-r--r--src/CRC16.h8
-rwxr-xr-xsrc/JP2K_Sequence_Parser.cpp8
-rw-r--r--src/KM_fileio.cpp5
-rw-r--r--src/KM_tai.cpp5
-rwxr-xr-xsrc/KM_util.cpp4
-rwxr-xr-xsrc/MPEG2_Parser.cpp9
-rwxr-xr-xsrc/MXF.cpp44
-rw-r--r--src/SyncEncoder.cpp (renamed from src/SyncEncoder.c)10
-rw-r--r--src/SyncEncoder.h9
-rw-r--r--src/UUIDInformation.cpp (renamed from src/UUIDInformation.c)11
-rw-r--r--src/UUIDInformation.h8
-rwxr-xr-xsrc/Wav.cpp5
17 files changed, 116 insertions, 53 deletions
diff --git a/src/AS_DCP_JP2K.cpp b/src/AS_DCP_JP2K.cpp
index 39aaa2a..73b0494 100755
--- a/src/AS_DCP_JP2K.cpp
+++ b/src/AS_DCP_JP2K.cpp
@@ -513,7 +513,10 @@ ASDCP::MD_to_JP2K_PDesc(const ASDCP::MXF::GenericPictureEssenceDescriptor& Esse
//
// hidden, internal implementation of JPEG 2000 reader
+namespace ASDCP {
+namespace JP2K
+{
class lh__Reader : public ASDCP::h__ASDCPReader
{
RGBAEssenceDescriptor* m_EssenceDescriptor;
@@ -535,6 +538,8 @@ public:
Result_t OpenRead(const std::string&, EssenceType_t);
Result_t ReadFrame(ui32_t, JP2K::FrameBuffer&, AESDecContext*, HMACContext*);
};
+} // namespace JP2K
+} // namespace asdcp
//
@@ -1131,6 +1136,10 @@ ASDCP::JP2K::MXFSReader::Close() const
//
+namespace ASDCP {
+
+namespace JP2K
+{
class lh__Writer : public ASDCP::h__ASDCPWriter
{
ASDCP_NO_COPY_CONSTRUCT(lh__Writer);
@@ -1154,6 +1163,8 @@ public:
Result_t WriteFrame(const JP2K::FrameBuffer&, bool add_index, AESEncContext*, HMACContext*);
Result_t Finalize();
};
+} // namespace JP2K
+} // namespace asdcp
// Open the file for writing. The file must not exist. Returns error if
// the operation cannot be completed.
diff --git a/src/AS_DCP_MPEG2.cpp b/src/AS_DCP_MPEG2.cpp
index 0608abd..3fd979c 100755
--- a/src/AS_DCP_MPEG2.cpp
+++ b/src/AS_DCP_MPEG2.cpp
@@ -39,6 +39,10 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
static std::string MPEG_PACKAGE_LABEL = "File Package: SMPTE 381M frame wrapping of MPEG2 video elementary stream";
static std::string PICT_DEF_LABEL = "Picture Track";
+namespace ASDCP {
+
+namespace MPEG2
+{
//
ASDCP::Result_t
MD_to_MPEG2_VDesc(MXF::MPEG2VideoDescriptor* VDescObj, MPEG2::VideoDescriptor& VDesc)
@@ -111,6 +115,8 @@ MPEG2_VDesc_to_MD(MPEG2::VideoDescriptor& VDesc, MXF::MPEG2VideoDescriptor* VDes
VDescObj->ProfileAndLevel = VDesc.ProfileAndLevel;
return RESULT_OK;
}
+} // namespace MPEG2
+} // namespace asdcp
//
std::ostream&
diff --git a/src/AS_DCP_internal.h b/src/AS_DCP_internal.h
index 5626058..9c92911 100755
--- a/src/AS_DCP_internal.h
+++ b/src/AS_DCP_internal.h
@@ -47,6 +47,8 @@ using namespace ASDCP::MXF;
#endif
+namespace ASDCP {
+
// uncomment to remove MXFGCGenericEssenceMultipleMappings from your AS-02 files
// #define ASDCP_GCMULTI_PATCH
@@ -61,10 +63,6 @@ extern MXF::OPAtomIndexFooter *g_OPAtomIndexFooter;
extern MXF::RIP *g_RIP;
#endif
-
-namespace ASDCP
-{
-
//
static std::vector<int>
version_split(const char* str)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 26b0d89..57b8d84 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -41,6 +41,7 @@ else()
endif()
# ----------libkumu----------
+
# source
set(kumu_src KM_fileio.cpp KM_log.cpp KM_util.cpp KM_tai.cpp KM_prng.cpp KM_aes.cpp KM_xml.cpp KM_sha1.cpp)
@@ -48,6 +49,7 @@ set(kumu_src KM_fileio.cpp KM_log.cpp KM_util.cpp KM_tai.cpp KM_prng.cpp KM_aes.
set(kumu_src ${kumu_src} KM_fileio.h KM_log.h KM_prng.h KM_util.h KM_tai.h KM_error.h KM_memio.h KM_mutex.h KM_platform.h dirent_win.h KM_aes.h KM_xml.h KM_sha1.h)
# ----------libasdcp----------
+
# source
set(asdcp_src MPEG2_Parser.cpp MPEG.cpp JP2K_Codestream_Parser.cpp
JP2K_Sequence_Parser.cpp JP2K.cpp PCM_Parser.cpp Wav.cpp
@@ -55,7 +57,7 @@ set(asdcp_src MPEG2_Parser.cpp MPEG.cpp JP2K_Codestream_Parser.cpp
h__Reader.cpp h__Writer.cpp AS_DCP_MPEG2.cpp AS_DCP_JP2K.cpp
AS_DCP_PCM.cpp AS_DCP_TimedText.cpp PCMParserList.cpp MDD.cpp
AS_DCP_ATMOS.cpp AS_DCP_DCData.cpp DCData_ByteStream_Parser.cpp DCData_Sequence_Parser.cpp AtmosSyncChannel_Generator.cpp
- AtmosSyncChannel_Mixer.cpp PCMDataProviders.cpp SyncEncoder.c CRC16.c UUIDInformation.c
+ AtmosSyncChannel_Mixer.cpp PCMDataProviders.cpp SyncEncoder.cpp CRC16.cpp UUIDInformation.cpp
)
if (HAVE_OPENSSL)
@@ -67,7 +69,11 @@ if (USE_ASDCP_JXS)
endif()
# header for deployment (install target)
-set(asdcp_deploy_header AS_DCP.h AS_DCP_JXS.h PCMParserList.h AS_DCP_internal.h KM_error.h KM_fileio.h KM_util.h KM_memio.h KM_tai.h KM_platform.h KM_log.h KM_mutex.h dirent_win.h)
+
+set(asdcp_deploy_header AS_DCP.h AS_DCP_JXS.h PCMParserList.h AS_DCP_internal.h KM_error.h KM_fileio.h KM_util.h KM_memio.h KM_tai.h KM_platform.h KM_log.h KM_mutex.h)
+if (WIN32)
+ list(APPEND asdcp_deploy_header dirent_win.h)
+endif()
# header
set(asdcp_src ${asdcp_src} Wav.h WavFileWriter.h MXF.h Metadata.h JP2K.h
@@ -77,6 +83,7 @@ JXS.h AS_DCP.h AS_DCP_JXS.h AS_DCP_internal.h KLV.h MPEG.h MXFTypes.h MDD.h
)
# ----------as02----------
+
# source
set(as02_src h__02_Reader.cpp h__02_Writer.cpp AS_02_ISXD.cpp AS_02_JP2K.cpp
AS_02_JXS.cpp AS_02_PCM.cpp ST2052_TextParser.cpp AS_02_TimedText.cpp AS_02_ACES.cpp ACES_Codestream_Parser.cpp ACES_Sequence_Parser.cpp ACES.cpp AS_02_IAB.cpp ST2052_TextParser.cpp)
@@ -85,8 +92,7 @@ AS_02_JXS.cpp AS_02_PCM.cpp ST2052_TextParser.cpp AS_02_TimedText.cpp AS_02_ACES
set(as02_deploy_header AS_02.h AS_02_JXS.h Metadata.h MXF.h MXFTypes.h KLV.h MDD.h AS_02_ACES.h ACES.h AS_02_IAB.h AS_02_internal.h)
# header
-set(as02_src ${as02_src} AS_02.h AS_02_JXS.h AS_02_internal.h AS_02_ACES.h ACES.h AS_02_IAB.h)
-
+set(as02_src ${as02_src} AS_02.h AS_02_JXS.h AS_02_internal.h AS_02_ACES.h ACES.h AS_02_IAB.h AS_02_PHDR.h)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
@@ -230,4 +236,4 @@ set(install_targets blackwave wavesplit klvwalk asdcp-test asdcp-wrap asdcp-unwr
install(TARGETS ${install_targets} RUNTIME DESTINATION bin)
install(FILES ${as02_deploy_header} ${asdcp_deploy_header} DESTINATION include)
-install(EXPORT asdcplibtargets DESTINATION targets)
+install(EXPORT asdcplibtargets DESTINATION targets) \ No newline at end of file
diff --git a/src/CRC16.c b/src/CRC16.cpp
index 3e2f09e..302953d 100644
--- a/src/CRC16.c
+++ b/src/CRC16.cpp
@@ -31,6 +31,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "CRC16.h"
+namespace ASDCP {
+
static const unsigned short g_aushCRC16tab[256]= {
0x0000,0x1021,0x2042,0x3063,0x4084,0x50a5,0x60c6,0x70e7,
0x8108,0x9129,0xa14a,0xb16b,0xc18c,0xd1ad,0xe1ce,0xf1ef,
@@ -84,3 +86,5 @@ unsigned short CRC16(const void *pData, int ilength)
return ushCRC;
}
+
+} // namespace asdcp
diff --git a/src/CRC16.h b/src/CRC16.h
index 6d3beb3..150afc1 100644
--- a/src/CRC16.h
+++ b/src/CRC16.h
@@ -32,14 +32,10 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CRC_16_H_
#define _CRC_16_H_
-#ifdef __cplusplus
-extern "C" {
-#endif
+namespace ASDCP {
unsigned short CRC16(const void *pData, int ilength);
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
+} // namespace asdcp
#endif
diff --git a/src/JP2K_Sequence_Parser.cpp b/src/JP2K_Sequence_Parser.cpp
index a8de925..ad8f0e9 100755
--- a/src/JP2K_Sequence_Parser.cpp
+++ b/src/JP2K_Sequence_Parser.cpp
@@ -42,7 +42,9 @@ using namespace ASDCP;
//------------------------------------------------------------------------------------------
-
+
+namespace ASDCP {
+
class FileList : public std::list<std::string>
{
std::string m_DirName;
@@ -89,6 +91,7 @@ public:
return result;
}
};
+} // namespace asdcp
//------------------------------------------------------------------------------------------
@@ -191,6 +194,8 @@ ASDCP::JP2K::SequenceParser::h__SequenceParser::OpenRead(const std::list<std::st
}
+namespace ASDCP {
+
//
bool
operator==(const ASDCP::JP2K::ImageComponent_t& lhs, const ASDCP::JP2K::ImageComponent_t& rhs)
@@ -334,6 +339,7 @@ operator==(const ASDCP::JP2K::PictureDescriptor& lhs, const ASDCP::JP2K::Picture
return true;
}
+} // namespace asdcp
//
ASDCP::Result_t
diff --git a/src/KM_fileio.cpp b/src/KM_fileio.cpp
index b24c7db..a8b5f3f 100644
--- a/src/KM_fileio.cpp
+++ b/src/KM_fileio.cpp
@@ -1690,6 +1690,9 @@ Kumu::DeleteFile(const std::string& filename)
return RESULT_FAIL;
}
+namespace Kumu
+{
+
//
Result_t
h__DeletePath(const std::string& pathname)
@@ -1751,6 +1754,8 @@ h__DeletePath(const std::string& pathname)
return result;
}
+} // namespace KUMU
+
//
Result_t
Kumu::DeletePath(const std::string& pathname)
diff --git a/src/KM_tai.cpp b/src/KM_tai.cpp
index 00a1231..47039e6 100644
--- a/src/KM_tai.cpp
+++ b/src/KM_tai.cpp
@@ -55,6 +55,10 @@ The libtai source code is in the public domain.
#include <sys/time.h>
#endif
+namespace Kumu
+{
+
+
//
void
caldate_frommjd(Kumu::TAI::caldate* cd, i32_t day)
@@ -216,6 +220,7 @@ Kumu::TAI::caltime::operator=(const Kumu::TAI::tai& rhs)
return *this;
}
+} // namespace Kumu
//
// end KM_tai.cpp
diff --git a/src/KM_util.cpp b/src/KM_util.cpp
index da8d732..4c59c78 100755
--- a/src/KM_util.cpp
+++ b/src/KM_util.cpp
@@ -244,6 +244,9 @@ Kumu::DTrace_t::~DTrace_t()
//------------------------------------------------------------------------------------------
+namespace Kumu
+{
+
const char fill = '=';
const char* base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@@ -283,6 +286,7 @@ const byte_t decode_map[] =
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
+} // namespace Kumu
// Convert a binary string to NULL-terminated UTF-8 hexadecimal, returns the buffer
// if the binary buffer was large enough to hold the result. If the output buffer
diff --git a/src/MPEG2_Parser.cpp b/src/MPEG2_Parser.cpp
index 8b79d51..3eefc96 100755
--- a/src/MPEG2_Parser.cpp
+++ b/src/MPEG2_Parser.cpp
@@ -44,6 +44,11 @@ const ui32_t VESReadSize = 4 * Kumu::Kilobyte;
//------------------------------------------------------------------------------------------
+namespace ASDCP {
+
+namespace MPEG2
+{
+
//
enum ParserState_t {
ST_INIT,
@@ -365,7 +370,7 @@ public:
// - any frame that begins with a picture header is either an I, B or P frame
// and is assumed to contain a complete picture header and picture data
-class ASDCP::MPEG2::Parser::h__Parser
+class Parser::h__Parser
{
StreamParams m_ParamsDelegate;
FrameParser m_ParserDelegate;
@@ -388,6 +393,8 @@ public:
Result_t FillVideoDescriptor(VideoDescriptor&);
};
+} // namespace MPEG2
+} // namespace asdcp
//
Result_t
diff --git a/src/MXF.cpp b/src/MXF.cpp
index 94c94ad..5fcc0a6 100755
--- a/src/MXF.cpp
+++ b/src/MXF.cpp
@@ -552,8 +552,8 @@ ASDCP::MXF::Primer::InsertTag(const MDDEntry& Entry, ASDCP::TagValue& Tag)
ASDCP::Result_t
ASDCP::MXF::Primer::TagForKey(const ASDCP::UL& Key, ASDCP::TagValue& Tag)
{
- assert(m_Lookup);
- if ( m_Lookup.empty() )
+
+ if ( !m_Lookup || m_Lookup.empty() )
{
DefaultLogSink().Error("Primer lookup is empty\n");
return RESULT_FAIL;
@@ -1509,26 +1509,35 @@ ASDCP::MXF::InterchangeObject::IsA(const byte_t* label)
//------------------------------------------------------------------------------------------
-struct FactoryCompareUL
+namespace ASDCP {
+namespace MXF
{
- bool operator()(const ASDCP::UL& lhs, const ASDCP::UL& rhs) const
+ struct FactoryCompareUL
{
- ui32_t test_size = lhs.Size() < rhs.Size() ? lhs.Size() : rhs.Size();
-
- for (ui32_t i = 0; i < test_size; i++)
+ bool operator()(const ASDCP::UL& lhs, const ASDCP::UL& rhs) const
{
- if (i == 7) continue; // skip version to be symmetrical with UL::operator==
- if (lhs.Value()[i] != rhs.Value()[i])
- return lhs.Value()[i] < rhs.Value()[i];
- }
+ ui32_t test_size = lhs.Size() < rhs.Size() ? lhs.Size() : rhs.Size();
- return false;
- }
-};
+ for (ui32_t i = 0; i < test_size; i++)
+ {
+ if (i == 7) continue; // skip version to be symmetrical with UL::operator==
+ if (lhs.Value()[i] != rhs.Value()[i])
+ return lhs.Value()[i] < rhs.Value()[i];
+ }
-typedef std::map<ASDCP::UL, ASDCP::MXF::MXFObjectFactory_t, FactoryCompareUL>FactoryMap_t;
+ return false;
+ }
+ };
+}
+} // namespace asdcp
+
+typedef std::map<ASDCP::UL, ASDCP::MXF::MXFObjectFactory_t, ASDCP::MXF::FactoryCompareUL>FactoryMap_t;
typedef FactoryMap_t::iterator FLi_t;
+namespace ASDCP {
+
+namespace MXF
+{
//
class FactoryList : public FactoryMap_t
{
@@ -1559,8 +1568,11 @@ public:
}
};
+} // namespace MXF
+} // namespace asdcp
+
//
-static FactoryList s_FactoryList;
+static ASDCP::MXF::FactoryList s_FactoryList;
static Kumu::Mutex s_InitLock;
static bool s_TypesInit = false;
diff --git a/src/SyncEncoder.c b/src/SyncEncoder.cpp
index c553509..11c74ed 100644
--- a/src/SyncEncoder.c
+++ b/src/SyncEncoder.cpp
@@ -34,9 +34,13 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <memory.h>
+using namespace ASDCP;
+
+static
void ConstructFrame(LPSYNCENCODER pSyncEncoder,
INT iFrameIndex);
+static
FLOAT SEWriteBits( INT iSampleRate, /* In: Sample rate of signal */
FLOAT *pfAudioBuffer, /* Out: Audio buffer containing signal */
INT iBits, /* In: Number of bits to write */
@@ -45,7 +49,7 @@ FLOAT SEWriteBits( INT iSampleRate, /* In: Sample rate of signal */
-INT SyncEncoderInit(LPSYNCENCODER pSyncEncoder, /* Out: SYNCENCODER structure to be initialized */
+INT ASDCP::SyncEncoderInit(LPSYNCENCODER pSyncEncoder, /* Out: SYNCENCODER structure to be initialized */
INT iSampleRate, /* In: Signal sample rate */
INT iFrameRate, /* In: frame rate */
LPUUIDINFORMATION pUUID) /* In: UUID */
@@ -142,7 +146,7 @@ INT SyncEncoderInit(LPSYNCENCODER pSyncEncoder, /* Out: SYNCENCODER structure t
return pSyncEncoder->iError;
}
-INT GetSyncEncoderAudioBufferLength(LPSYNCENCODER pSyncEncoder) /* In: Sync encoder structure */
+INT ASDCP::GetSyncEncoderAudioBufferLength(LPSYNCENCODER pSyncEncoder) /* In: Sync encoder structure */
{
if(pSyncEncoder->iError != SYNC_ENCODER_ERROR_NONE){
return pSyncEncoder->iError;
@@ -153,7 +157,7 @@ INT GetSyncEncoderAudioBufferLength(LPSYNCENCODER pSyncEncoder) /* In: Sync enco
-INT EncodeSync( LPSYNCENCODER pSyncEncoder, /* In: Sync encoder structure */
+INT ASDCP::EncodeSync( LPSYNCENCODER pSyncEncoder, /* In: Sync encoder structure */
INT iBufferLength, /* In: Length of audio buffer */
FLOAT *pfAudioBuffer, /* Out: Audio buffer with signal */
INT iFrameIndex) /* In: Frame Index */
diff --git a/src/SyncEncoder.h b/src/SyncEncoder.h
index 4b97f5a..fc84ebf 100644
--- a/src/SyncEncoder.h
+++ b/src/SyncEncoder.h
@@ -35,9 +35,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "SyncCommon.h"
#include "UUIDInformation.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+namespace ASDCP {
+
typedef struct SyncEncoder{
INT iSampleRate; /* Signal sample rate */
@@ -78,9 +77,7 @@ INT EncodeSync( LPSYNCENCODER pSyncEncoder, /* In: Sync encoder structure */
FLOAT *pfAudioBuffer, /* Out: Audio buffer with signal */
INT iFrameIndex); /* In: Frame Index */
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
+} // namespace asdcp
#endif
diff --git a/src/UUIDInformation.c b/src/UUIDInformation.cpp
index 4c5eec9..335e532 100644
--- a/src/UUIDInformation.c
+++ b/src/UUIDInformation.cpp
@@ -32,8 +32,9 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "UUIDInformation.h"
#include <stdlib.h>
+using namespace ASDCP;
-void UUIDSynthesize(LPUUIDINFORMATION pUUID)
+void ASDCP::UUIDSynthesize(LPUUIDINFORMATION pUUID)
{
INT n;
@@ -48,8 +49,8 @@ void UUIDSynthesize(LPUUIDINFORMATION pUUID)
pUUID->abyUUIDBytes[8] |= 0xA0;
}
-void UUIDPrint( FILE *pFilePtr,
- LPUUIDINFORMATION pUUID)
+void ASDCP::UUIDPrint( FILE *pFilePtr,
+ LPUUIDINFORMATION pUUID)
{
if(pFilePtr != NULL){
INT n;
@@ -67,8 +68,8 @@ void UUIDPrint( FILE *pFilePtr,
}
}
-void UUIDPrintFormated( FILE *pFilePtr,
- LPUUIDINFORMATION pUUID)
+void ASDCP::UUIDPrintFormated( FILE *pFilePtr,
+ LPUUIDINFORMATION pUUID)
{
if(pFilePtr != NULL){
INT n;
diff --git a/src/UUIDInformation.h b/src/UUIDInformation.h
index 4bd0ff4..804104b 100644
--- a/src/UUIDInformation.h
+++ b/src/UUIDInformation.h
@@ -35,9 +35,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "SyncCommon.h"
#include <stdio.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+namespace ASDCP {
typedef struct UUIInformation{
BYTE abyUUIDBytes[16];
@@ -51,8 +49,6 @@ void UUIDPrint( FILE *pFilePtr,
void UUIDPrintFormated( FILE *pFilePtr,
LPUUIDINFORMATION pUUID);
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
+} // namespace asdcp
#endif
diff --git a/src/Wav.cpp b/src/Wav.cpp
index 8f510eb..a703836 100755
--- a/src/Wav.cpp
+++ b/src/Wav.cpp
@@ -206,6 +206,9 @@ ASDCP::Wav::SimpleWaveHeader::ReadFromBuffer(const byte_t* buf, ui32_t buf_len,
//------------------------------------------------------------------------------------------
// conversion algorithms from http://www.borg.com/~jglatt/tech/aiff.htm
+namespace ASDCP {
+
+
//
void
Rat_to_extended(ASDCP::Rational rate, byte_t* buf)
@@ -256,6 +259,8 @@ extended_to_Rat(const byte_t* buf)
return ASDCP::Rational(mantissa, 1);
}
+} // namespace asdcp
+
//
void
ASDCP::AIFF::SimpleAIFFHeader::FillADesc(ASDCP::PCM::AudioDescriptor& ADesc, ASDCP::Rational PictureRate) const