summaryrefslogtreecommitdiff
path: root/src/AS_DCP_MPEG2.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_MPEG2.cpp
parentc10e0c7be537d3bb949d2c200f508a1b6bab1e0d (diff)
Use iostreams instead of file descriptors for dumping.
Diffstat (limited to 'src/AS_DCP_MPEG2.cpp')
-rwxr-xr-xsrc/AS_DCP_MPEG2.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/AS_DCP_MPEG2.cpp b/src/AS_DCP_MPEG2.cpp
index bd2709e..9a81b9f 100755
--- a/src/AS_DCP_MPEG2.cpp
+++ b/src/AS_DCP_MPEG2.cpp
@@ -30,6 +30,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "AS_DCP_internal.h"
+#include <iostream>
+#include <iomanip>
//------------------------------------------------------------------------------------------
@@ -93,6 +95,27 @@ MPEG2_VDesc_to_MD(MPEG2::VideoDescriptor& VDesc, MXF::MPEG2VideoDescriptor* VDes
return RESULT_OK;
}
+//
+std::ostream&
+ASDCP::MPEG2::operator << (std::ostream& strm, const VideoDescriptor& VDesc)
+{
+ strm << " SampleRate: " << VDesc.SampleRate.Numerator << "/" << VDesc.SampleRate.Denominator << std::endl;
+ strm << " FrameLayout: " << (unsigned) VDesc.FrameLayout << std::endl;
+ strm << " StoredWidth: " << (unsigned) VDesc.StoredWidth << std::endl;
+ strm << " StoredHeight: " << (unsigned) VDesc.StoredHeight << std::endl;
+ strm << " AspectRatio: " << VDesc.AspectRatio.Numerator << "/" << VDesc.AspectRatio.Denominator << std::endl;
+ strm << " ComponentDepth: " << (unsigned) VDesc.ComponentDepth << std::endl;
+ strm << " HorizontalSubsmpl: " << (unsigned) VDesc.HorizontalSubsampling << std::endl;
+ strm << " VerticalSubsmpl: " << (unsigned) VDesc.VerticalSubsampling << std::endl;
+ strm << " ColorSiting: " << (unsigned) VDesc.ColorSiting << std::endl;
+ strm << " CodedContentType: " << (unsigned) VDesc.CodedContentType << std::endl;
+ strm << " LowDelay: " << (unsigned) VDesc.LowDelay << std::endl;
+ strm << " BitRate: " << (unsigned) VDesc.BitRate << std::endl;
+ strm << " ProfileAndLevel: " << (unsigned) VDesc.ProfileAndLevel << std::endl;
+ strm << " ContainerDuration: " << (unsigned) VDesc.ContainerDuration << std::endl;
+
+ return strm;
+}
//
void