/*
- Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2018-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
#include <getopt.h>
#include <libxml++/libxml++.h>
#include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
#include <iostream>
using std::cerr;
using std::cout;
using std::string;
-using std::list;
-using boost::shared_ptr;
+using std::shared_ptr;
+using std::vector;
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);
- list<dcp::VerificationNote> notes;
+ vector<dcp::VerificationNote> notes;
try {
dcp.read (¬es, true);
} catch (dcp::ReadError& e) {
cout << "Error:" << e.what() << "\n";
}
- BOOST_FOREACH (dcp::VerificationNote i, notes) {
+ for (auto i: notes) {
cout << "Error: " << dcp::note_to_string(i) << "\n";
}
}
/* Read all MXF assets */
- list<shared_ptr<dcp::Asset> > assets;
+ vector<shared_ptr<dcp::Asset>> assets;
for (boost::filesystem::directory_iterator i(dcp_dir); i != boost::filesystem::directory_iterator(); ++i) {
if (i->path().extension() == ".mxf") {
try {
dcp::DCP fixed (*output);
fixed.add (cpl);
fixed.resolve_refs (assets);
- fixed.write_xml (dcp::INTEROP);
+ fixed.write_xml (dcp::Standard::INTEROP);
cout << "Fixed XML files written to " << output->string() << "\n";
}