Fix rebase onto master.
[dcpomatic.git] / src / tools / dcpomatic_create.cc
index 0130b518305802cfde764b8d4c6f191d94b0e488..68ae377db345e44b4fe8c38b843f68587048d2fa 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -27,6 +27,8 @@
 #include "lib/dcp_content_type.h"
 #include "lib/ratio.h"
 #include "lib/image_content.h"
+#include "lib/video_content.h"
+#include <libxml++/libxml++.h>
 #include <boost/filesystem.hpp>
 #include <getopt.h>
 #include <string>
@@ -213,10 +215,9 @@ main (int argc, char* argv[])
                film->set_signed (sign);
 
                for (int i = optind; i < argc; ++i) {
-                       shared_ptr<Content> c = content_factory (film, argv[i]);
-                       shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (c);
-                       if (vc) {
-                               vc->set_scale (VideoContentScale (content_ratio));
+                       shared_ptr<Content> c = content_factory (film, boost::filesystem::canonical (argv[i]));
+                       if (c->video) {
+                               c->video->set_scale (VideoContentScale (content_ratio));
                        }
                        film->examine_and_add_content (c);
                }
@@ -230,7 +231,7 @@ main (int argc, char* argv[])
                for (ContentList::iterator i = content.begin(); i != content.end(); ++i) {
                        shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (*i);
                        if (ic) {
-                               ic->set_video_length (still_length * 24);
+                               ic->video->set_length (still_length * 24);
                        }
                }