using std::cout;
using std::string;
using std::list;
-using boost::shared_ptr;
+using std::shared_ptr;
using boost::optional;
static void
int
main (int argc, char* argv[])
{
+ dcp::init ();
+
int option_index = 0;
optional<boost::filesystem::path> output;
while (true) {
/* Try to read it and report errors */
dcp::DCP dcp (dcp_dir);
- dcp::DCP::ReadErrors errors;
+ list<dcp::VerificationNote> notes;
try {
- dcp.read (true, &errors, true);
- } catch (dcp::DCPReadError& e) {
+ dcp.read (¬es, true);
+ } catch (dcp::ReadError& e) {
cout << "Error:" << e.what() << "\n";
}
- BOOST_FOREACH (shared_ptr<dcp::DCPReadError> i, errors) {
- cout << "Error: " << i->what() << "\n";
+ BOOST_FOREACH (dcp::VerificationNote i, notes) {
+ cout << "Error: " << dcp::note_to_string(i) << "\n";
}
/* Look for a CPL */
if (i->path().extension() == ".xml") {
try {
cpl.reset(new dcp::CPL(i->path()));
- } catch (dcp::DCPReadError& e) {
+ } catch (dcp::ReadError& e) {
cout << "Error: " << e.what() << "\n";
} catch (xmlpp::parse_error& e) {
cout << "Error: " << e.what() << "\n";
asset->hash (&progress);
cout << "100% \n";
assets.push_back (asset);
- } catch (dcp::DCPReadError& e) {
+ } catch (dcp::ReadError& e) {
cout << "Error: " << e.what() << "\n";
}
}