More logging for DCP import.
authorCarl Hetherington <cth@carlh.net>
Sat, 10 Nov 2018 00:38:19 +0000 (00:38 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 10 Nov 2018 00:38:19 +0000 (00:38 +0000)
src/lib/dcp.cc

index 28e5c4fd28a0b4da3b9012f50552dd20b8cc49cb..fa9f5f721d04d09bd76eb5729b402dbe7cee554c 100644 (file)
@@ -20,6 +20,9 @@
 
 #include "dcp.h"
 #include "config.h"
+#include "film.h"
+#include "log.h"
+#include "compose.hpp"
 #include "dcp_content.h"
 #include <dcp/dcp.h>
 #include <dcp/decrypted_kdm.h>
@@ -32,6 +35,8 @@ using std::list;
 using std::string;
 using boost::shared_ptr;
 
+#define LOG_GENERAL(...) _dcp_content->film()->log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_GENERAL);
+
 /** Find all the CPLs in our directories, cross-add assets and return the CPLs */
 list<shared_ptr<dcp::CPL> >
 DCP::cpls () const
@@ -43,6 +48,7 @@ DCP::cpls () const
                shared_ptr<dcp::DCP> dcp (new dcp::DCP (i));
                dcp->read (false, 0, true);
                dcps.push_back (dcp);
+               LOG_GENERAL ("Reading DCP %1: %2 CPLs", i.string(), dcp->cpls().size());
                BOOST_FOREACH (shared_ptr<dcp::CPL> i, dcp->cpls()) {
                        cpls.push_back (i);
                }