Forgot to commit this.
authormsheby <msheby@cinecert.com>
Fri, 11 Jul 2008 01:19:41 +0000 (01:19 +0000)
committermsheby <>
Fri, 11 Jul 2008 01:19:41 +0000 (01:19 +0000)
src/AS_DCP_MXF.cpp

index 192965d78416c8f4d905a4cb8328bf8589594429..334d253754286e542a86e330d54ec799af6e4485 100755 (executable)
@@ -35,12 +35,40 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "JP2K.h"
 #include "MPEG.h"
 #include "Wav.h"
+#include <iostream>
+#include <iomanip>
 
 
 //------------------------------------------------------------------------------------------
 // misc subroutines
 
 
+//
+std::ostream&
+ASDCP::operator << (std::ostream& strm, const WriterInfo& Info)
+{
+  char str_buf[40];
+
+  strm << "       ProductUUID: " << UUID(Info.ProductUUID).EncodeHex(str_buf, 40) << std::endl;
+  strm << "    ProductVersion: " << Info.ProductVersion << std::endl;
+  strm << "       CompanyName: " << Info.CompanyName << std::endl;
+  strm << "       ProductName: " << Info.ProductName << std::endl;
+  strm << "  EncryptedEssence: " << (Info.EncryptedEssence ? "Yes" : "No") << std::endl;
+
+  if ( Info.EncryptedEssence )
+    {
+      strm << "              HMAC: " << (Info.UsesHMAC ? "Yes" : "No") << std::endl;
+      strm << "         ContextID: " << UUID(Info.ContextID).EncodeHex(str_buf, 40) << std::endl;
+      strm << "CryptographicKeyID: " << UUID(Info.CryptographicKeyID).EncodeHex(str_buf, 40) << std::endl;
+    }
+
+  strm << "         AssetUUID: " << UUID(Info.AssetUUID).EncodeHex(str_buf, 40) << std::endl;
+  strm << "    Label Set Type: " << (Info.LabelSetType == LS_MXF_SMPTE ? "SMPTE" :
+                                    (Info.LabelSetType == LS_MXF_INTEROP ? "MXF Interop" :
+                                     "Unknown")) << std::endl;
+  return strm;
+}
+
 //
 void
 ASDCP::WriterInfoDump(const WriterInfo& Info, FILE* stream)