summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-01-28 00:12:09 +0100
committerCarl Hetherington <cth@carlh.net>2026-02-16 01:20:17 +0100
commit86c169fa6cc97f2e627e281b9cd75429f4eeb670 (patch)
treed5a89c303f813deeef52bfb3c3a33857986a3ba7 /src/lib
parenta7a3f17e003bab57967e502b35e2f1b689a7f1cb (diff)
Remove Film from the whole examination chain.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/atmos_mxf_content.cc4
-rw-r--r--src/lib/atmos_mxf_content.h2
-rw-r--r--src/lib/check_content_job.cc4
-rw-r--r--src/lib/content.cc2
-rw-r--r--src/lib/content.h2
-rw-r--r--src/lib/dcp_content.cc12
-rw-r--r--src/lib/dcp_content.h2
-rw-r--r--src/lib/dcp_subtitle_content.cc4
-rw-r--r--src/lib/dcp_subtitle_content.h2
-rw-r--r--src/lib/examine_content_job.cc8
-rw-r--r--src/lib/examine_content_job.h3
-rw-r--r--src/lib/fcpxml_content.cc4
-rw-r--r--src/lib/fcpxml_content.h2
-rw-r--r--src/lib/ffmpeg_content.cc4
-rw-r--r--src/lib/ffmpeg_content.h2
-rw-r--r--src/lib/film.cc2
-rw-r--r--src/lib/image_content.cc6
-rw-r--r--src/lib/image_content.h2
-rw-r--r--src/lib/image_examiner.cc5
-rw-r--r--src/lib/image_examiner.h2
-rw-r--r--src/lib/string_text_file_content.cc4
-rw-r--r--src/lib/string_text_file_content.h2
-rw-r--r--src/lib/transcode_job.cc2
-rw-r--r--src/lib/video_mxf_content.cc4
-rw-r--r--src/lib/video_mxf_content.h2
25 files changed, 40 insertions, 48 deletions
diff --git a/src/lib/atmos_mxf_content.cc b/src/lib/atmos_mxf_content.cc
index 32e8a73b2..89f45e332 100644
--- a/src/lib/atmos_mxf_content.cc
+++ b/src/lib/atmos_mxf_content.cc
@@ -74,10 +74,10 @@ AtmosMXFContent::valid_mxf (boost::filesystem::path path)
void
-AtmosMXFContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bool tolerant)
+AtmosMXFContent::examine(shared_ptr<Job> job, bool tolerant)
{
job->set_progress_unknown ();
- Content::examine(film, job, tolerant);
+ Content::examine(job, tolerant);
auto a = make_shared<dcp::AtmosAsset>(path(0));
{
diff --git a/src/lib/atmos_mxf_content.h b/src/lib/atmos_mxf_content.h
index 135371739..8d0ec5b2f 100644
--- a/src/lib/atmos_mxf_content.h
+++ b/src/lib/atmos_mxf_content.h
@@ -37,7 +37,7 @@ public:
return std::dynamic_pointer_cast<const AtmosMXFContent> (Content::shared_from_this());
}
- void examine(std::shared_ptr<const Film> film, std::shared_ptr<Job> job, bool tolerant) override;
+ void examine(std::shared_ptr<Job> job, bool tolerant) override;
std::string summary () const override;
void as_xml(
diff --git a/src/lib/check_content_job.cc b/src/lib/check_content_job.cc
index ab6e43d56..fd3c8d2d7 100644
--- a/src/lib/check_content_job.cc
+++ b/src/lib/check_content_job.cc
@@ -82,7 +82,7 @@ CheckContentJob::run()
std::vector<shared_ptr<Content>> changed;
std::copy_if(content.begin(), content.end(), std::back_inserter(changed), [](shared_ptr<Content> c) { return c->changed(); });
if (!changed.empty()) {
- JobManager::instance()->add(make_shared<ExamineContentJob>(_film, changed, false));
+ JobManager::instance()->add(make_shared<ExamineContentJob>(changed, false));
set_message(_("Some files have been changed since they were added to the project.\n\nThese files will now be re-examined, so you may need to check their settings."));
}
@@ -90,7 +90,7 @@ CheckContentJob::run()
std::vector<shared_ptr<Content>> needs_upgrade;
std::copy_if(content.begin(), content.end(), std::back_inserter(needs_upgrade), [](shared_ptr<Content> c) { return static_cast<bool>(dynamic_pointer_cast<FFmpegContent>(c)); });
if (!needs_upgrade.empty()) {
- JobManager::instance()->add(make_shared<ExamineContentJob>(_film, needs_upgrade, false));
+ JobManager::instance()->add(make_shared<ExamineContentJob>(needs_upgrade, false));
set_message(_("Some files must be re-examined due to a bug fix in DCP-o-matic. You may need to check their settings."));
}
}
diff --git a/src/lib/content.cc b/src/lib/content.cc
index 710fc0edc..f91a05eab 100644
--- a/src/lib/content.cc
+++ b/src/lib/content.cc
@@ -167,7 +167,7 @@ Content::calculate_digest() const
void
-Content::examine(shared_ptr<const Film>, shared_ptr<Job>, bool)
+Content::examine(shared_ptr<Job>, bool)
{
auto const d = calculate_digest();
diff --git a/src/lib/content.h b/src/lib/content.h
index c9c5ad39d..aa514c013 100644
--- a/src/lib/content.h
+++ b/src/lib/content.h
@@ -91,7 +91,7 @@ public:
* @param tolerant true to try to carry on in the presence of problems with the content,
* false to throw exceptions in these cases.
*/
- virtual void examine(std::shared_ptr<const Film> film, std::shared_ptr<Job> job, bool tolerant);
+ virtual void examine(std::shared_ptr<Job> job, bool tolerant);
/** Adapt anything about this content just before it's added to the given film */
virtual void prepare_for_add_to_film(std::shared_ptr<const Film>) {}
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc
index 02454fdda..6e071e5c0 100644
--- a/src/lib/dcp_content.cc
+++ b/src/lib/dcp_content.cc
@@ -241,9 +241,8 @@ DCPContent::read_sub_directory(boost::filesystem::path p)
}
}
-/** @param film Film, or 0 */
void
-DCPContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bool tolerant)
+DCPContent::examine(shared_ptr<Job> job, bool tolerant)
{
bool const needed_assets = needs_assets();
bool const needed_kdm = needs_kdm();
@@ -262,7 +261,7 @@ DCPContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bool toler
if (job) {
job->set_progress_unknown();
}
- Content::examine(film, job, tolerant);
+ Content::examine(job, tolerant);
auto examiner = make_shared<DCPExaminer>(shared_from_this(), tolerant);
@@ -276,11 +275,8 @@ DCPContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bool toler
}
if (examiner->has_audio()) {
- {
- boost::mutex::scoped_lock lm(_mutex);
- audio = make_shared<AudioContent>(this);
- }
-
+ boost::mutex::scoped_lock lm(_mutex);
+ audio = make_shared<AudioContent>(this);
audio->set_stream(
make_shared<AudioStream>(examiner->audio_frame_rate(), examiner->audio_length(), examiner->audio_channels(), 24)
);
diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h
index 340ed1d14..8a34c4bbe 100644
--- a/src/lib/dcp_content.h
+++ b/src/lib/dcp_content.h
@@ -74,7 +74,7 @@ public:
dcpomatic::DCPTime full_length(std::shared_ptr<const Film> film) const override;
dcpomatic::DCPTime approximate_length() const override;
- void examine(std::shared_ptr<const Film> film, std::shared_ptr<Job>, bool tolerant) override;
+ void examine(std::shared_ptr<Job>, bool tolerant) override;
void prepare_for_add_to_film(std::shared_ptr<const Film> film) override;
std::string summary() const override;
std::string technical_summary() const override;
diff --git a/src/lib/dcp_subtitle_content.cc b/src/lib/dcp_subtitle_content.cc
index 795153aa9..fc3fa498a 100644
--- a/src/lib/dcp_subtitle_content.cc
+++ b/src/lib/dcp_subtitle_content.cc
@@ -57,9 +57,9 @@ DCPSubtitleContent::DCPSubtitleContent(cxml::ConstNodePtr node, boost::optional<
}
void
-DCPSubtitleContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bool tolerant)
+DCPSubtitleContent::examine(shared_ptr<Job> job, bool tolerant)
{
- Content::examine(film, job, tolerant);
+ Content::examine(job, tolerant);
auto subtitle_asset = load(path(0));
diff --git a/src/lib/dcp_subtitle_content.h b/src/lib/dcp_subtitle_content.h
index dde3139a8..c2e22f989 100644
--- a/src/lib/dcp_subtitle_content.h
+++ b/src/lib/dcp_subtitle_content.h
@@ -27,7 +27,7 @@ public:
DCPSubtitleContent (boost::filesystem::path);
DCPSubtitleContent (cxml::ConstNodePtr, boost::optional<boost::filesystem::path> film_directory, int);
- void examine (std::shared_ptr<const Film> film, std::shared_ptr<Job>, bool tolerant) override;
+ void examine(std::shared_ptr<Job>, bool tolerant) override;
std::string summary () const override;
std::string technical_summary () const override;
diff --git a/src/lib/examine_content_job.cc b/src/lib/examine_content_job.cc
index dad5adb3c..f0958ee82 100644
--- a/src/lib/examine_content_job.cc
+++ b/src/lib/examine_content_job.cc
@@ -21,7 +21,6 @@
#include "content.h"
#include "examine_content_job.h"
-#include "film.h"
#include "log.h"
#include <boost/filesystem.hpp>
#include <iostream>
@@ -35,9 +34,8 @@ using std::string;
using std::vector;
-ExamineContentJob::ExamineContentJob(shared_ptr<const Film> film, vector<shared_ptr<Content>> content, bool tolerant)
- : _film(film)
- , _content(std::move(content))
+ExamineContentJob::ExamineContentJob(vector<shared_ptr<Content>> content, bool tolerant)
+ : _content(std::move(content))
, _tolerant(tolerant)
{
@@ -69,7 +67,7 @@ ExamineContentJob::run()
{
int n = 0;
for (auto c: _content) {
- c->examine(_film, shared_from_this(), _tolerant);
+ c->examine(shared_from_this(), _tolerant);
set_progress(float(n) / _content.size());
++n;
}
diff --git a/src/lib/examine_content_job.h b/src/lib/examine_content_job.h
index cb7012b75..d1b4a5eea 100644
--- a/src/lib/examine_content_job.h
+++ b/src/lib/examine_content_job.h
@@ -28,7 +28,7 @@ class Content;
class ExamineContentJob : public Job
{
public:
- ExamineContentJob(std::shared_ptr<const Film> film, std::vector<std::shared_ptr<Content>> content, bool tolerant);
+ ExamineContentJob(std::vector<std::shared_ptr<Content>> content, bool tolerant);
~ExamineContentJob();
std::string name() const override;
@@ -40,7 +40,6 @@ public:
}
private:
- std::shared_ptr<const Film> _film;
std::vector<std::shared_ptr<Content>> _content;
bool _tolerant;
diff --git a/src/lib/fcpxml_content.cc b/src/lib/fcpxml_content.cc
index 28345f85d..5fa1bdc17 100644
--- a/src/lib/fcpxml_content.cc
+++ b/src/lib/fcpxml_content.cc
@@ -51,9 +51,9 @@ FCPXMLContent::FCPXMLContent(cxml::ConstNodePtr node, optional<boost::filesystem
void
-FCPXMLContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bool tolerant)
+FCPXMLContent::examine(shared_ptr<Job> job, bool tolerant)
{
- Content::examine(film, job, tolerant);
+ Content::examine( job, tolerant);
auto sequence = dcpomatic::fcpxml::load(path(0));
diff --git a/src/lib/fcpxml_content.h b/src/lib/fcpxml_content.h
index 229ac757d..201131599 100644
--- a/src/lib/fcpxml_content.h
+++ b/src/lib/fcpxml_content.h
@@ -41,7 +41,7 @@ public:
return std::dynamic_pointer_cast<const FCPXMLContent>(Content::shared_from_this());
}
- void examine(std::shared_ptr<const Film> film, std::shared_ptr<Job>, bool tolerant) override;
+ void examine(std::shared_ptr<Job>, bool tolerant) override;
std::string summary() const override;
std::string technical_summary() const override;
void as_xml(xmlpp::Element*, bool with_paths, PathBehaviour path_behaviour, boost::optional<boost::filesystem::path> film_directory) const override;
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc
index 832767ad6..506addecb 100644
--- a/src/lib/ffmpeg_content.cc
+++ b/src/lib/ffmpeg_content.cc
@@ -249,7 +249,7 @@ FFmpegContent::as_xml(xmlpp::Element* element, bool with_paths, PathBehaviour pa
void
-FFmpegContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bool tolerant)
+FFmpegContent::examine(shared_ptr<Job> job, bool tolerant)
{
ContentChangeSignaller cc1(this, FFmpegContentProperty::SUBTITLE_STREAMS);
ContentChangeSignaller cc2(this, FFmpegContentProperty::SUBTITLE_STREAM);
@@ -258,7 +258,7 @@ FFmpegContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bool to
job->set_progress_unknown();
}
- Content::examine(film, job, tolerant);
+ Content::examine(job, tolerant);
auto examiner = make_shared<FFmpegExaminer>(shared_from_this(), job);
diff --git a/src/lib/ffmpeg_content.h b/src/lib/ffmpeg_content.h
index 006cdfb38..05fbe9597 100644
--- a/src/lib/ffmpeg_content.h
+++ b/src/lib/ffmpeg_content.h
@@ -66,7 +66,7 @@ public:
return std::dynamic_pointer_cast<const FFmpegContent>(Content::shared_from_this());
}
- void examine(std::shared_ptr<const Film> film, std::shared_ptr<Job>, bool tolerant) override;
+ void examine(std::shared_ptr<Job>, bool tolerant) override;
void prepare_for_add_to_film(std::shared_ptr<const Film> film) override;
void take_settings_from(std::shared_ptr<const Content> c) override;
std::string summary() const override;
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 2be6d900c..750b2b41c 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -1501,7 +1501,7 @@ Film::examine_and_add_content(vector<shared_ptr<Content>> const& content, bool d
run_ffprobe(content[0]->path(0), file("ffprobe.log"));
}
- auto j = make_shared<ExamineContentJob>(shared_from_this(), content, false);
+ auto j = make_shared<ExamineContentJob>(content, false);
vector<weak_ptr<Content>> weak_content;
for (auto i: content) {
diff --git a/src/lib/image_content.cc b/src/lib/image_content.cc
index 8b9b06ab2..437508f4f 100644
--- a/src/lib/image_content.cc
+++ b/src/lib/image_content.cc
@@ -112,7 +112,7 @@ ImageContent::as_xml(xmlpp::Element* element, bool with_paths, PathBehaviour pat
void
-ImageContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bool tolerant)
+ImageContent::examine(shared_ptr<Job> job, bool tolerant)
{
if (_path_to_scan) {
job->sub (_("Scanning image files"));
@@ -136,9 +136,9 @@ ImageContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bool tol
set_paths (paths);
}
- Content::examine(film, job, tolerant);
+ Content::examine(job, tolerant);
- auto examiner = make_shared<ImageExaminer>(film, shared_from_this(), job);
+ auto examiner = make_shared<ImageExaminer>(shared_from_this(), job);
video->take_from_examiner(examiner);
set_default_colour_conversion ();
}
diff --git a/src/lib/image_content.h b/src/lib/image_content.h
index 83ca94501..bfa03beba 100644
--- a/src/lib/image_content.h
+++ b/src/lib/image_content.h
@@ -37,7 +37,7 @@ public:
return std::dynamic_pointer_cast<const ImageContent> (Content::shared_from_this ());
};
- void examine(std::shared_ptr<const Film> film, std::shared_ptr<Job>, bool tolerant) override;
+ void examine(std::shared_ptr<Job>, bool tolerant) override;
void prepare_for_add_to_film(std::shared_ptr<const Film> film) override;
std::string summary () const override;
std::string technical_summary () const override;
diff --git a/src/lib/image_examiner.cc b/src/lib/image_examiner.cc
index cd4c754c6..0953100f4 100644
--- a/src/lib/image_examiner.cc
+++ b/src/lib/image_examiner.cc
@@ -44,9 +44,8 @@ using std::sort;
using boost::optional;
-ImageExaminer::ImageExaminer (shared_ptr<const Film> film, shared_ptr<const ImageContent> content, shared_ptr<Job>)
- : _film (film)
- , _image_content (content)
+ImageExaminer::ImageExaminer(shared_ptr<const ImageContent> content, shared_ptr<Job>)
+ : _image_content (content)
{
auto path = content->path(0);
if (valid_j2k_file (path)) {
diff --git a/src/lib/image_examiner.h b/src/lib/image_examiner.h
index d6cdfac53..7471d9cc9 100644
--- a/src/lib/image_examiner.h
+++ b/src/lib/image_examiner.h
@@ -25,7 +25,7 @@ class ImageContent;
class ImageExaminer : public VideoExaminer
{
public:
- ImageExaminer (std::shared_ptr<const Film>, std::shared_ptr<const ImageContent>, std::shared_ptr<Job>);
+ ImageExaminer(std::shared_ptr<const ImageContent>, std::shared_ptr<Job>);
bool has_video () const override {
return true;
diff --git a/src/lib/string_text_file_content.cc b/src/lib/string_text_file_content.cc
index 5ecf50a12..bc314f8d0 100644
--- a/src/lib/string_text_file_content.cc
+++ b/src/lib/string_text_file_content.cc
@@ -78,9 +78,9 @@ font_names(StringTextFile const& string_text_file)
void
-StringTextFileContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bool tolerant)
+StringTextFileContent::examine(shared_ptr<Job> job, bool tolerant)
{
- Content::examine(film, job, tolerant);
+ Content::examine(job, tolerant);
StringTextFile file (shared_from_this());
only_text()->clear_fonts();
diff --git a/src/lib/string_text_file_content.h b/src/lib/string_text_file_content.h
index f634a14d2..3ec09386a 100644
--- a/src/lib/string_text_file_content.h
+++ b/src/lib/string_text_file_content.h
@@ -42,7 +42,7 @@ public:
return std::dynamic_pointer_cast<const StringTextFileContent> (Content::shared_from_this ());
}
- void examine(std::shared_ptr<const Film> film, std::shared_ptr<Job>, bool tolerant) override;
+ void examine(std::shared_ptr<Job>, bool tolerant) override;
std::string summary () const override;
std::string technical_summary () const override;
diff --git a/src/lib/transcode_job.cc b/src/lib/transcode_job.cc
index 0748b9679..458d1574c 100644
--- a/src/lib/transcode_job.cc
+++ b/src/lib/transcode_job.cc
@@ -100,7 +100,7 @@ TranscodeJob::run()
if (!changed.empty()) {
switch (_changed) {
case ChangedBehaviour::EXAMINE_THEN_STOP:
- JobManager::instance()->add(make_shared<ExamineContentJob>(_film, changed, false));
+ JobManager::instance()->add(make_shared<ExamineContentJob>(changed, false));
set_progress(1);
set_message(_("Some files have been changed since they were added to the project.\n\nThese files will now be re-examined, so you may need to check their settings before trying again."));
set_error(_("Files have changed since they were added to the project."), _("Check their new settings, then try again."));
diff --git a/src/lib/video_mxf_content.cc b/src/lib/video_mxf_content.cc
index ffb9c4484..ed9c48d06 100644
--- a/src/lib/video_mxf_content.cc
+++ b/src/lib/video_mxf_content.cc
@@ -86,11 +86,11 @@ VideoMXFContent::valid_mxf (boost::filesystem::path path)
void
-VideoMXFContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bool tolerant)
+VideoMXFContent::examine(shared_ptr<Job> job, bool tolerant)
{
job->set_progress_unknown ();
- Content::examine(film, job, tolerant);
+ Content::examine(job, tolerant);
video.reset (new VideoContent (this));
auto examiner = make_shared<VideoMXFExaminer>(shared_from_this());
diff --git a/src/lib/video_mxf_content.h b/src/lib/video_mxf_content.h
index 4c2d051b0..640380ac3 100644
--- a/src/lib/video_mxf_content.h
+++ b/src/lib/video_mxf_content.h
@@ -36,7 +36,7 @@ public:
return std::dynamic_pointer_cast<const VideoMXFContent>(Content::shared_from_this());
}
- void examine(std::shared_ptr<const Film> film, std::shared_ptr<Job> job, bool tolerant) override;
+ void examine(std::shared_ptr<Job> job, bool tolerant) override;
std::string summary () const override;
std::string technical_summary () const override;
std::string identifier () const override;