From 8fad4cc485b8791abb93ec97fe6bff7b7aa3834b Mon Sep 17 00:00:00 2001 From: msheby Date: Fri, 11 Jul 2008 01:04:24 +0000 Subject: Use iostreams instead of file descriptors for dumping. --- src/AS_DCP_PCM.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/AS_DCP_PCM.cpp') 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 +#include +#include //------------------------------------------------------------------------------------------ @@ -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) { -- cgit v1.2.3