summaryrefslogtreecommitdiff
path: root/src/AS_DCP_PCM.cpp
diff options
context:
space:
mode:
authormsheby <msheby@cinecert.com>2008-07-11 01:04:24 +0000
committermsheby <>2008-07-11 01:04:24 +0000
commit8fad4cc485b8791abb93ec97fe6bff7b7aa3834b (patch)
treebe23e6b1bce0e9ef0d9bab1c11da86807c9ce993 /src/AS_DCP_PCM.cpp
parentc10e0c7be537d3bb949d2c200f508a1b6bab1e0d (diff)
Use iostreams instead of file descriptors for dumping.
Diffstat (limited to 'src/AS_DCP_PCM.cpp')
-rwxr-xr-xsrc/AS_DCP_PCM.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/AS_DCP_PCM.cpp b/src/AS_DCP_PCM.cpp
index 5e03d1d..a50f24b 100755
--- a/src/AS_DCP_PCM.cpp
+++ b/src/AS_DCP_PCM.cpp
@@ -31,6 +31,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "AS_DCP_internal.h"
#include <map>
+#include <iostream>
+#include <iomanip>
//------------------------------------------------------------------------------------------
@@ -72,6 +74,24 @@ MD_to_PCM_ADesc(MXF::WaveAudioDescriptor* ADescObj, PCM::AudioDescriptor& ADesc)
return RESULT_OK;
}
+//
+std::ostream&
+ASDCP::PCM::operator << (std::ostream& strm, const AudioDescriptor& ADesc)
+{
+ strm << " SampleRate: " << ADesc.SampleRate.Numerator << "/" << ADesc.SampleRate.Denominator << std::endl;
+ strm << " AudioSamplingRate: " << ADesc.AudioSamplingRate.Numerator << "/" << ADesc.AudioSamplingRate.Denominator << std::endl;
+ strm << " Locked: " << (unsigned) ADesc.Locked << std::endl;
+ strm << " ChannelCount: " << (unsigned) ADesc.ChannelCount << std::endl;
+ strm << " QuantizationBits: " << (unsigned) ADesc.QuantizationBits << std::endl;
+ strm << " BlockAlign: " << (unsigned) ADesc.BlockAlign << std::endl;
+ strm << " AvgBps: " << (unsigned) ADesc.AvgBps << std::endl;
+ strm << " LinkedTrackID: " << (unsigned) ADesc.LinkedTrackID << std::endl;
+ strm << " ContainerDuration: " << (unsigned) ADesc.ContainerDuration << std::endl;
+
+ return strm;
+}
+
+//
void
ASDCP::PCM::AudioDescriptorDump(const AudioDescriptor& ADesc, FILE* stream)
{