Emit no audio from DCPs if none is mapped
[dcpomatic.git] / src / lib / image_content.cc
index d8f482a3b3bcc63c38dac6264b86910cf0bfe8bc..1a92c944ed8047cdceb50f7f43b46e894923a323 100644 (file)
 #include "image_examiner.h"
 #include "image_filename_sorter.h"
 #include "job.h"
+#include "util.h"
 #include "video_content.h"
 #include <libcxml/cxml.h>
+#include <dcp/filesystem.h>
 #include <libxml++/libxml++.h>
 #include <iostream>
 
@@ -48,7 +50,7 @@ ImageContent::ImageContent (boost::filesystem::path p)
 {
        video = make_shared<VideoContent>(this);
 
-       if (boost::filesystem::is_regular_file (p) && valid_image_file (p)) {
+       if (dcp::filesystem::is_regular_file(p) && valid_image_file(p)) {
                add_path (p);
        } else {
                _path_to_scan = p;
@@ -115,8 +117,8 @@ ImageContent::examine (shared_ptr<const Film> film, shared_ptr<Job> job)
                job->sub (_("Scanning image files"));
                vector<boost::filesystem::path> paths;
                int n = 0;
-               for (auto i: boost::filesystem::directory_iterator(*_path_to_scan)) {
-                       if (boost::filesystem::is_regular_file(i.path()) && valid_image_file (i.path())) {
+               for (auto i: dcp::filesystem::directory_iterator(*_path_to_scan)) {
+                       if (dcp::filesystem::is_regular_file(i.path()) && valid_image_file(i.path())) {
                                paths.push_back (i.path());
                        }
                        ++n;
@@ -136,7 +138,7 @@ ImageContent::examine (shared_ptr<const Film> film, shared_ptr<Job> job)
        Content::examine (film, job);
 
        auto examiner = make_shared<ImageExaminer>(film, shared_from_this(), job);
-       video->take_from_examiner (examiner);
+       video->take_from_examiner(film, examiner);
        set_default_colour_conversion ();
 }