#include "types.h"
#include "compose.hpp"
#include "dcpomatic_assert.h"
+#include "warnings.h"
#include <dcp/raw_convert.h>
#include <dcp/cpl.h>
#include <dcp/dcp.h>
#include <dcp/reel_mxf.h>
#include <dcp/reel_asset.h>
+DCPOMATIC_DISABLE_WARNINGS
#include <libxml++/libxml++.h>
+DCPOMATIC_ENABLE_WARNINGS
#include <libcxml/cxml.h>
#include <boost/foreach.hpp>
: dcp_directory (p.leaf().string())
{
dcp::DCP dcp (p);
+
list<dcp::VerificationNote> notes;
dcp.read (¬es);
- if (!notes.empty()) {
- throw dcp::DCPReadError(dcp::note_to_string(notes.front()));
+ BOOST_FOREACH (dcp::VerificationNote i, notes) {
+ if (i.code() != dcp::VerificationNote::EXTERNAL_ASSET) {
+ /* It's not just a warning about this DCP being a VF */
+ throw dcp::ReadError(dcp::note_to_string(i));
+ }
}
cpl_id = dcp.cpls().front()->id();
last_write_time = boost::filesystem::last_write_time (p);
}
+
+
+bool operator== (NamedChannel const& a, NamedChannel const& b)
+{
+ return a.name == b.name && a.index == b.index;
+}
+
+
+string
+video_range_to_string (VideoRange r)
+{
+ switch (r) {
+ case VIDEO_RANGE_FULL:
+ return "full";
+ case VIDEO_RANGE_VIDEO:
+ return "video";
+ default:
+ DCPOMATIC_ASSERT (false);
+ }
+}
+
+
+VideoRange
+string_to_video_range (string s)
+{
+ if (s == "full") {
+ return VIDEO_RANGE_FULL;
+ } else if (s == "video") {
+ return VIDEO_RANGE_VIDEO;
+ }
+
+ DCPOMATIC_ASSERT (false);
+ return VIDEO_RANGE_FULL;
+}
+