#include "exceptions.h"
#include "film.h"
#include "safe_stringstream.h"
+#include "job.h"
#include "i18n.h"
}
void
-Content::examine (shared_ptr<Job> job)
+Content::examine (shared_ptr<Job> job, bool calculate_digest)
{
+ if (!calculate_digest) {
+ return;
+ }
+
+ job->sub (_("Computing digest"));
+
boost::mutex::scoped_lock lm (_mutex);
vector<boost::filesystem::path> p = _paths;
lm.unlock ();
/** Examine the content to establish digest, frame rates and any other
* useful metadata.
* @param job Job to use to report progress, or 0.
+ * @param calculate_digest True to calculate a digest for the content's file(s).
*/
- virtual void examine (boost::shared_ptr<Job> job);
+ virtual void examine (boost::shared_ptr<Job> job, bool calculate_digest);
/** @return Quick one-line summary of the content, as will be presented in the
* film editor.
}
void
-DCPContent::examine (shared_ptr<Job> job)
+DCPContent::examine (shared_ptr<Job> job, bool calculate_digest)
{
bool const could_be_played = can_be_played ();
job->set_progress_unknown ();
- Content::examine (job);
+ Content::examine (job, calculate_digest);
shared_ptr<DCPExaminer> examiner (new DCPExaminer (shared_from_this ()));
take_from_video_examiner (examiner);
DCPTime full_length () const;
- void examine (boost::shared_ptr<Job>);
+ void examine (boost::shared_ptr<Job>, bool calculate_digest);
std::string summary () const;
std::string technical_summary () const;
void as_xml (xmlpp::Node *) const;
public:
DCPExaminer (boost::shared_ptr<const DCPContent>);
- float video_frame_rate () const {
- return _video_frame_rate.get_value_or (24);
+ boost::optional<float> video_frame_rate () const {
+ return _video_frame_rate;
}
dcp::Size video_size () const {
}
void
-DCPSubtitleContent::examine (shared_ptr<Job> job)
+DCPSubtitleContent::examine (shared_ptr<Job> job, bool calculate_digest)
{
- Content::examine (job);
+ Content::examine (job, calculate_digest);
dcp::SubtitleContent sc (path (0), false);
_length = DCPTime::from_seconds (sc.latest_subtitle_out().to_seconds ());
}
DCPSubtitleContent (boost::shared_ptr<const Film>, cxml::ConstNodePtr, int);
/* Content */
- void examine (boost::shared_ptr<Job>);
+ void examine (boost::shared_ptr<Job>, bool calculate_digest);
std::string summary () const;
std::string technical_summary () const;
std::string information () const;
using std::cout;
using boost::shared_ptr;
-ExamineContentJob::ExamineContentJob (shared_ptr<const Film> f, shared_ptr<Content> c)
+ExamineContentJob::ExamineContentJob (shared_ptr<const Film> f, shared_ptr<Content> c, bool calculate_digest)
: Job (f)
, _content (c)
+ , _calculate_digest (calculate_digest)
{
}
void
ExamineContentJob::run ()
{
- _content->examine (shared_from_this ());
+ _content->examine (shared_from_this (), _calculate_digest);
set_progress (1);
set_state (FINISHED_OK);
}
class ExamineContentJob : public Job
{
public:
- ExamineContentJob (boost::shared_ptr<const Film>, boost::shared_ptr<Content>);
+ ExamineContentJob (boost::shared_ptr<const Film>, boost::shared_ptr<Content>, bool calculate_digest);
~ExamineContentJob ();
std::string name () const;
private:
boost::shared_ptr<Content> _content;
+ bool _calculate_digest;
};
}
void
-FFmpegContent::examine (shared_ptr<Job> job)
+FFmpegContent::examine (shared_ptr<Job> job, bool calculate_digest)
{
job->set_progress_unknown ();
- Content::examine (job);
+ Content::examine (job, calculate_digest);
shared_ptr<FFmpegExaminer> examiner (new FFmpegExaminer (shared_from_this ()));
take_from_video_examiner (examiner);
return boost::dynamic_pointer_cast<FFmpegContent> (Content::shared_from_this ());
}
- void examine (boost::shared_ptr<Job>);
+ void examine (boost::shared_ptr<Job>, bool calculate_digest);
std::string summary () const;
std::string technical_summary () const;
std::string information () const;
return t;
}
-float
+optional<float>
FFmpegExaminer::video_frame_rate () const
{
/* This use of r_frame_rate is debateable; there's a few different
public:
FFmpegExaminer (boost::shared_ptr<const FFmpegContent>);
- float video_frame_rate () const;
+ boost::optional<float> video_frame_rate () const;
dcp::Size video_size () const;
ContentTime video_length () const;
boost::optional<float> sample_aspect_ratio () const;
}
void
-Film::examine_content (shared_ptr<Content> c)
+Film::examine_content (shared_ptr<Content> c, bool calculate_digest)
{
- shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c));
+ shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c, calculate_digest));
JobManager::instance()->add (j);
}
void
-Film::examine_and_add_content (shared_ptr<Content> c)
+Film::examine_and_add_content (shared_ptr<Content> c, bool calculate_digest)
{
if (dynamic_pointer_cast<FFmpegContent> (c)) {
run_ffprobe (c->path(0), file ("ffprobe.log"), _log);
}
- shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c));
+ shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c, calculate_digest));
j->Finished.connect (bind (&Film::maybe_add_content, this, boost::weak_ptr<Job> (j), boost::weak_ptr<Content> (c)));
JobManager::instance()->add (j);
}
void set_directory (boost::filesystem::path);
void set_name (std::string);
void set_use_isdcf_name (bool);
- void examine_content (boost::shared_ptr<Content>);
- void examine_and_add_content (boost::shared_ptr<Content>);
+ void examine_content (boost::shared_ptr<Content>, bool calculate_digest);
+ void examine_and_add_content (boost::shared_ptr<Content>, bool calculate_digest);
void add_content (boost::shared_ptr<Content>);
void remove_content (boost::shared_ptr<Content>);
void move_content_earlier (boost::shared_ptr<Content>);
}
void
-ImageContent::examine (shared_ptr<Job> job)
+ImageContent::examine (shared_ptr<Job> job, bool calculate_digest)
{
- job->sub (_("Computing digest"));
- Content::examine (job);
+ Content::examine (job, calculate_digest);
shared_ptr<const Film> film = _film.lock ();
assert (film);
return boost::dynamic_pointer_cast<ImageContent> (Content::shared_from_this ());
};
- void examine (boost::shared_ptr<Job>);
+ void examine (boost::shared_ptr<Job>, bool calculate_digest);
std::string summary () const;
std::string technical_summary () const;
void as_xml (xmlpp::Node *) const;
using std::list;
using std::sort;
using boost::shared_ptr;
+using boost::optional;
ImageExaminer::ImageExaminer (shared_ptr<const Film> film, shared_ptr<const ImageContent> content, shared_ptr<Job>)
: _film (film)
if (content->still ()) {
_video_length = ContentTime::from_seconds (Config::instance()->default_still_length());
} else {
- _video_length = ContentTime::from_frames (_image_content->number_of_paths (), video_frame_rate ());
+ _video_length = ContentTime::from_frames (
+ _image_content->number_of_paths (), video_frame_rate().get_value_or (0)
+ );
}
}
return _video_size.get ();
}
-float
+optional<float>
ImageExaminer::video_frame_rate () const
{
- boost::shared_ptr<const Film> f = _film.lock ();
- if (!f) {
- return 24;
- }
-
- return f->video_frame_rate ();
+ /* Don't know */
+ return optional<float> ();
}
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2014 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
public:
ImageExaminer (boost::shared_ptr<const Film>, boost::shared_ptr<const ImageContent>, boost::shared_ptr<Job>);
- float video_frame_rate () const;
+ boost::optional<float> video_frame_rate () const;
dcp::Size video_size () const;
ContentTime video_length () const {
return _video_length;
}
void
-SndfileContent::examine (shared_ptr<Job> job)
+SndfileContent::examine (shared_ptr<Job> job, bool calculate_digest)
{
job->set_progress_unknown ();
- Content::examine (job);
+ Content::examine (job, calculate_digest);
shared_ptr<AudioExaminer> dec (new SndfileDecoder (shared_from_this()));
take_from_audio_examiner (dec);
}
DCPTime full_length () const;
- void examine (boost::shared_ptr<Job>);
+ void examine (boost::shared_ptr<Job>, bool calculate_digest);
std::string summary () const;
std::string technical_summary () const;
std::string information () const;
}
void
-SubRipContent::examine (boost::shared_ptr<Job> job)
+SubRipContent::examine (boost::shared_ptr<Job> job, bool calculate_digest)
{
- Content::examine (job);
+ Content::examine (job, calculate_digest);
SubRip s (shared_from_this ());
shared_ptr<const Film> film = _film.lock ();
}
/* Content */
- void examine (boost::shared_ptr<Job>);
+ void examine (boost::shared_ptr<Job>, bool calculate_digest);
std::string summary () const;
std::string technical_summary () const;
std::string information () const;
{
/* These examiner calls could call other content methods which take a lock on the mutex */
dcp::Size const vs = d->video_size ();
- float const vfr = d->video_frame_rate ();
+ optional<float> const vfr = d->video_frame_rate ();
ContentTime vl = d->video_length ();
optional<float> const ar = d->sample_aspect_ratio ();
{
boost::mutex::scoped_lock lm (_mutex);
_video_size = vs;
- _video_frame_rate = vfr;
+ if (vfr) {
+ _video_frame_rate = vfr.get ();
+ }
_video_length = vl;
_sample_aspect_ratio = ar;
{
public:
virtual ~VideoExaminer () {}
- virtual float video_frame_rate () const = 0;
+ virtual boost::optional<float> video_frame_rate () const = 0;
virtual dcp::Size video_size () const = 0;
virtual ContentTime video_length () const = 0;
virtual boost::optional<float> sample_aspect_ratio () const {
if (!_film_to_create.empty ()) {
_frame->new_film (_film_to_create);
if (!_content_to_add.empty ()) {
- _frame->film()->examine_and_add_content (content_factory (_frame->film(), _content_to_add));
+ _frame->film()->examine_and_add_content (content_factory (_frame->film(), _content_to_add), true);
}
}
if (vc) {
vc->set_scale (VideoContentScale (content_ratio));
}
- film->examine_and_add_content (c);
+ film->examine_and_add_content (c, true);
}
JobManager* jm = JobManager::instance ();
return;
}
- shared_ptr<Job> j (new ExamineContentJob (film, content));
+ shared_ptr<Job> j (new ExamineContentJob (film, content, true));
j->Finished.connect (
bind (
}
for (ContentList::iterator i = _content.begin(); i != _content.end(); ++i) {
- film->examine_content (*i);
+ film->examine_content (*i, true);
}
}
dcp->add_kdm (dcp::EncryptedKDM (dcp::file_to_string (wx_to_std (d->GetPath ()))));
shared_ptr<Film> film = _film.lock ();
assert (film);
- film->examine_content (dcp);
+ film->examine_content (dcp, true);
}
d->Destroy ();
#include "subtitle_panel.h"
#include "timing_panel.h"
#include "timeline_dialog.h"
+#include "image_sequence_dialog.h"
using std::list;
using std::string;
/* XXX: check for lots of files here and do something */
for (unsigned int i = 0; i < paths.GetCount(); ++i) {
- _film->examine_and_add_content (content_factory (_film, wx_to_std (paths[i])));
+ _film->examine_and_add_content (content_factory (_film, wx_to_std (paths[i])), true);
}
d->Destroy ();
ContentPanel::add_folder_clicked ()
{
wxDirDialog* d = new wxDirDialog (_panel, _("Choose a folder"), wxT (""), wxDD_DIR_MUST_EXIST);
- int const r = d->ShowModal ();
+ int r = d->ShowModal ();
boost::filesystem::path const path (wx_to_std (d->GetPath ()));
d->Destroy ();
return;
}
- shared_ptr<Content> content;
-
- try {
- content.reset (new ImageContent (_film, path));
- } catch (...) {
+ /* Guess if this is a DCP or a set of images: read the first ten filenames and if they
+ are all valid image files we assume it is a set of images.
+ */
+
+ bool is_dcp = false;
+ int read = 0;
+ for (boost::filesystem::directory_iterator i(path); i != boost::filesystem::directory_iterator() && read < 10; ++i, ++read) {
+ if (!boost::filesystem::is_regular_file (i->path()) || !valid_image_file (i->path())) {
+ is_dcp = true;
+ }
+ }
+
+ if (is_dcp) {
try {
- content.reset (new DCPContent (_film, path));
+ shared_ptr<DCPContent> content (new DCPContent (_film, path));
+ _film->examine_and_add_content (content, true);
} catch (...) {
- error_dialog (_panel, _("Could not find any images nor a DCP in that folder"));
+ error_dialog (_panel, _("Could not find a DCP in that folder."));
+ }
+ } else {
+
+ ImageSequenceDialog* e = new ImageSequenceDialog (_panel);
+ r = e->ShowModal ();
+ float const frame_rate = e->frame_rate ();
+ bool const digest = e->digest ();
+ e->Destroy ();
+
+ if (r != wxID_OK) {
return;
}
- }
- if (content) {
- _film->examine_and_add_content (content);
+ shared_ptr<Content> content;
+
+ try {
+ shared_ptr<ImageContent> content (new ImageContent (_film, path));
+ content->set_video_frame_rate (frame_rate);
+ _film->examine_and_add_content (content, digest);
+ } catch (...) {
+ error_dialog (_panel, _("Could not find any images in that folder"));
+ return;
+ }
}
}
wxString* paths = event.GetFiles ();
for (int i = 0; i < event.GetNumberOfFiles(); i++) {
- _film->examine_and_add_content (content_factory (_film, wx_to_std (paths[i])));
+ _film->examine_and_add_content (content_factory (_film, wx_to_std (paths[i])), true);
}
}
--- /dev/null
+/*
+ Copyright (C) 2014 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
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <libdcp/raw_convert.h>
+#include "wx_util.h"
+#include "image_sequence_dialog.h"
+
+using libdcp::raw_convert;
+
+ImageSequenceDialog::ImageSequenceDialog (wxWindow* parent)
+ : TableDialog (parent, _("Add image sequence"), 2, true)
+{
+ add (_("Frame rate"), true);
+ _frame_rate = add (new wxTextCtrl (this, wxID_ANY, N_("24")));
+ _digest = new wxCheckBox (this, wxID_ANY, _("Calculate digests"));
+ _digest->SetValue (true);
+ _digest->SetToolTip (_("By default DCP-o-matic will calculate digests (hashes) of your image files so that it knows if they change. Turning this off will speed up import but you must not alter the image files after import or strange things may happen."));
+ add (_digest);
+
+ layout ();
+}
+
+float
+ImageSequenceDialog::frame_rate () const
+{
+ try {
+ return raw_convert<float> (wx_to_std (_frame_rate->GetValue ()));
+ } catch (...) {
+
+ }
+
+ return 0;
+}
+
+bool
+ImageSequenceDialog::digest () const
+{
+ return _digest->GetValue ();
+}
--- /dev/null
+/*
+ Copyright (C) 2014 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
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <wx/wx.h>
+#include "table_dialog.h"
+
+class ImageSequenceDialog : public TableDialog
+{
+public:
+ ImageSequenceDialog (wxWindow* parent);
+
+ float frame_rate () const;
+ bool digest () const;
+
+private:
+ wxTextCtrl* _frame_rate;
+ wxCheckBox* _digest;
+};
content_panel.cc
content_sub_panel.cc
dcp_panel.cc
+ image_sequence_dialog.cc
isdcf_metadata_dialog.cc
dir_picker_ctrl.cc
dolby_certificate_dialog.cc
film->set_resolution (RESOLUTION_4K);
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR"));
film->set_container (Ratio::from_id ("185"));
- film->examine_and_add_content (c);
+ film->examine_and_add_content (c, true);
wait_for_jobs ();
film->make_dcp ();
boost::filesystem::path p = private_data / "betty_L.wav";
shared_ptr<SndfileContent> c (new SndfileContent (film, p));
- film->examine_and_add_content (c);
+ film->examine_and_add_content (c, true);
wait_for_jobs ();
c->analyse_audio (boost::bind (&finished));
shared_ptr<SndfileContent> content (new SndfileContent (film, "test/data/staircase.wav"));
content->set_audio_delay (delay_in_ms);
- film->examine_and_add_content (content);
+ film->examine_and_add_content (content, true);
wait_for_jobs ();
film->make_dcp ();
shared_ptr<ImageContent> contentA (new ImageContent (film, "test/data/simple_testcard_640x480.png"));
shared_ptr<ImageContent> contentB (new ImageContent (film, "test/data/simple_testcard_640x480.png"));
- film->examine_and_add_content (contentA);
- film->examine_and_add_content (contentB);
+ film->examine_and_add_content (contentA, true);
+ film->examine_and_add_content (contentB, true);
wait_for_jobs ();
contentA->set_scale (VideoContentScale (Ratio::from_id ("185")));
film->set_burn_subtitles (true);
shared_ptr<SubRipContent> content (new SubRipContent (film, "test/data/subrip2.srt"));
content->set_use_subtitles (true);
- film->examine_and_add_content (content);
+ film->examine_and_add_content (content, true);
wait_for_jobs ();
film->make_dcp ();
wait_for_jobs ();
film->set_burn_subtitles (true);
shared_ptr<DCPSubtitleContent> content (new DCPSubtitleContent (film, "test/data/dcp_sub.xml"));
content->set_use_subtitles (true);
- film->examine_and_add_content (content);
+ film->examine_and_add_content (content, true);
wait_for_jobs ();
film->make_dcp ();
wait_for_jobs ();
film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
film->set_name ("frobozz");
shared_ptr<DCPSubtitleContent> content (new DCPSubtitleContent (film, "test/data/dcp_sub.xml"));
- film->examine_and_add_content (content);
+ film->examine_and_add_content (content, true);
wait_for_jobs ();
BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (2));
shared_ptr<Film> film = new_test_film ("ffmpeg_audio_test");
film->set_name ("ffmpeg_audio_test");
shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/staircase.mov"));
- film->examine_and_add_content (c);
+ film->examine_and_add_content (c, true);
wait_for_jobs ();
shared_ptr<Film> film = new_test_film ("ffmpeg_dcp_test");
film->set_name ("test_film2");
shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4"));
- film->examine_and_add_content (c);
+ film->examine_and_add_content (c, true);
wait_for_jobs ();
shared_ptr<Film> film = new_test_film ("ffmpeg_decoder_seek_test_" + file.string());
shared_ptr<FFmpegContent> content (new FFmpegContent (film, path));
- film->examine_and_add_content (content);
+ film->examine_and_add_content (content, true);
wait_for_jobs ();
shared_ptr<Log> log (new NullLog);
FFmpegDecoder decoder (content, log);
shared_ptr<Film> film = new_test_film ("ffmpeg_decoder_seek_test_" + file.string());
shared_ptr<FFmpegContent> content (new FFmpegContent (film, path));
- film->examine_and_add_content (content);
+ film->examine_and_add_content (content, true);
wait_for_jobs ();
shared_ptr<Log> log (new NullLog);
FFmpegDecoder decoder (content, log);
shared_ptr<Film> film = new_test_film ("audio_sampling_rate_test");
/* Get any piece of content, it doesn't matter what */
shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/test.mp4"));
- film->examine_and_add_content (content);
+ film->examine_and_add_content (content, true);
wait_for_jobs ();
std::list<int> afr;
A->set_name ("frobozz");
shared_ptr<FFmpegContent> c (new FFmpegContent (A, "test/data/test.mp4"));
- A->examine_and_add_content (c);
+ A->examine_and_add_content (c, true);
A->set_encrypted (true);
wait_for_jobs ();
shared_ptr<DCPContent> d (new DCPContent (B, "build/test/import_dcp_test/" + A->dcp_name()));
d->add_kdm (kdm);
- B->examine_and_add_content (d);
+ B->examine_and_add_content (d, true);
wait_for_jobs ();
B->make_dcp ();
/* Test interior aspect ratio: shouldn't be shown with trailers */
shared_ptr<ImageContent> content (new ImageContent (film, "test/data/simple_testcard_640x480.png"));
- film->examine_and_add_content (content);
+ film->examine_and_add_content (content, true);
wait_for_jobs ();
content->set_scale (VideoContentScale (Ratio::from_id ("133")));
film->set_container (Ratio::from_id ("185"));
film->set_name ("play_test");
shared_ptr<FFmpegContent> A (new FFmpegContent (film, "test/data/red_24.mp4"));
- film->examine_and_add_content (A);
+ film->examine_and_add_content (A, true);
wait_for_jobs ();
BOOST_CHECK_EQUAL (A->video_length_after_3d_combine(), 16);
shared_ptr<FFmpegContent> B (new FFmpegContent (film, "test/data/red_30.mp4"));
- film->examine_and_add_content (B);
+ film->examine_and_add_content (B, true);
wait_for_jobs ();
BOOST_CHECK_EQUAL (B->video_length_after_3d_combine(), 16);
shared_ptr<FFmpegContent> B (new FFmpegContent (film, "test/data/test.mp4"));
shared_ptr<FFmpegContent> C (new FFmpegContent (film, "test/data/test.mp4"));
- film->examine_and_add_content (A);
- film->examine_and_add_content (B);
- film->examine_and_add_content (C);
+ film->examine_and_add_content (A, true);
+ film->examine_and_add_content (B, true);
+ film->examine_and_add_content (C, true);
wait_for_jobs ();
BOOST_CHECK_EQUAL (A->full_length(), DCPTime (288000));
film->set_container (Ratio::from_id ("185"));
film->set_audio_channels (6);
- film->examine_and_add_content (c);
+ film->examine_and_add_content (c, true);
wait_for_jobs ();
shared_ptr<Player> player = film->make_player ();
shared_ptr<ImageContent> content (new ImageContent (film, "test/data/3d_test"));
content->set_video_frame_type (VIDEO_FRAME_TYPE_3D_LEFT_RIGHT);
- film->examine_and_add_content (content);
+ film->examine_and_add_content (content, true);
wait_for_jobs ();
film->make_dcp ();
film->set_container (Ratio::from_id ("185"));
film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/red_24.mp4"));
- film->examine_and_add_content (c);
+ film->examine_and_add_content (c, true);
wait_for_jobs ();
film->set_name ("scaling_test");
shared_ptr<ImageContent> imc (new ImageContent (film, "test/data/simple_testcard_640x480.png"));
- film->examine_and_add_content (imc);
+ film->examine_and_add_content (imc, true);
wait_for_jobs ();
film->set_container (Ratio::from_id ("185"));
film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/count300bd48.m2ts"));
- film->examine_and_add_content (content);
+ film->examine_and_add_content (content, true);
wait_for_jobs ();
content->set_scale (VideoContentScale (Ratio::from_id ("185")));
film->set_name (film_name);
shared_ptr<SndfileContent> content (new SndfileContent (film, "test/data/staircase.wav"));
- film->examine_and_add_content (content);
+ film->examine_and_add_content (content, true);
wait_for_jobs ();
film->set_audio_channels (channels);
film->set_container (Ratio::from_id ("185"));
film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/count300bd48.m2ts"));
- film->examine_and_add_content (c);
+ film->examine_and_add_content (c, true);
wait_for_jobs ();
{
shared_ptr<Film> film = new_test_film ("subrip_render_test");
shared_ptr<SubRipContent> content (new SubRipContent (film, "test/data/subrip.srt"));
- content->examine (shared_ptr<Job> ());
+ content->examine (shared_ptr<Job> (), true);
BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds ((3 * 60) + 56.471));
shared_ptr<SubRipDecoder> decoder (new SubRipDecoder (content));
film->set_name ("test_film2");
shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4"));
c->set_video_frame_type (VIDEO_FRAME_TYPE_3D_LEFT_RIGHT);
- film->examine_and_add_content (c);
+ film->examine_and_add_content (c, true);
wait_for_jobs ();
film->set_name ("frobozz");
shared_ptr<SndfileContent> content (new SndfileContent (film, "test/data/white.wav"));
content->set_audio_processor (AudioProcessor::from_id ("stereo-5.1-upmix-a"));
- film->examine_and_add_content (content);
+ film->examine_and_add_content (content, true);
wait_for_jobs ();
film->set_burn_subtitles (false);
shared_ptr<SubRipContent> content (new SubRipContent (film, "test/data/subrip2.srt"));
content->set_use_subtitles (true);
- film->examine_and_add_content (content);
+ film->examine_and_add_content (content, true);
wait_for_jobs ();
film->make_dcp ();
wait_for_jobs ();