int const AnalyseAudioJob::_num_points = 1024;
-AnalyseAudioJob::AnalyseAudioJob (shared_ptr<const Film> f)
- : Job (f)
+AnalyseAudioJob::AnalyseAudioJob (shared_ptr<const Film> film)
+ : Job (film)
, _done (0)
, _samples_per_point (1)
, _overall_peak (0)
int const AudioContentProperty::AUDIO_GAIN = 201;
int const AudioContentProperty::AUDIO_DELAY = 202;
-AudioContent::AudioContent (shared_ptr<const Film> f)
- : Content (f)
+AudioContent::AudioContent (shared_ptr<const Film> film)
+ : Content (film)
, _audio_gain (0)
, _audio_delay (Config::instance()->default_audio_delay ())
{
}
-AudioContent::AudioContent (shared_ptr<const Film> f, DCPTime s)
- : Content (f, s)
+AudioContent::AudioContent (shared_ptr<const Film> film, DCPTime s)
+ : Content (film, s)
, _audio_gain (0)
, _audio_delay (Config::instance()->default_audio_delay ())
{
}
-AudioContent::AudioContent (shared_ptr<const Film> f, boost::filesystem::path p)
- : Content (f, p)
+AudioContent::AudioContent (shared_ptr<const Film> film, boost::filesystem::path p)
+ : Content (film, p)
, _audio_gain (0)
, _audio_delay (Config::instance()->default_audio_delay ())
{
}
-AudioContent::AudioContent (shared_ptr<const Film> f, cxml::ConstNodePtr node)
- : Content (f, node)
+AudioContent::AudioContent (shared_ptr<const Film> film, cxml::ConstNodePtr node)
+ : Content (film, node)
{
_audio_gain = node->number_child<float> ("AudioGain");
_audio_delay = node->number_child<int> ("AudioDelay");
}
-AudioContent::AudioContent (shared_ptr<const Film> f, vector<shared_ptr<Content> > c)
- : Content (f, c)
+AudioContent::AudioContent (shared_ptr<const Film> film, vector<shared_ptr<Content> > c)
+ : Content (film, c)
{
shared_ptr<AudioContent> ref = dynamic_pointer_cast<AudioContent> (c[0]);
DCPOMATIC_ASSERT (ref);
int const ContentProperty::TRIM_START = 403;
int const ContentProperty::TRIM_END = 404;
-Content::Content (shared_ptr<const Film> f)
- : _film (f)
+Content::Content (shared_ptr<const Film> film)
+ : _film (film)
, _position (0)
, _trim_start (0)
, _trim_end (0)
}
-Content::Content (shared_ptr<const Film> f, DCPTime p)
- : _film (f)
+Content::Content (shared_ptr<const Film> film, DCPTime p)
+ : _film (film)
, _position (p)
, _trim_start (0)
, _trim_end (0)
}
-Content::Content (shared_ptr<const Film> f, boost::filesystem::path p)
- : _film (f)
+Content::Content (shared_ptr<const Film> film, boost::filesystem::path p)
+ : _film (film)
, _position (0)
, _trim_start (0)
, _trim_end (0)
_paths.push_back (p);
}
-Content::Content (shared_ptr<const Film> f, cxml::ConstNodePtr node)
- : _film (f)
+Content::Content (shared_ptr<const Film> film, cxml::ConstNodePtr node)
+ : _film (film)
, _change_signals_frequent (false)
{
list<cxml::NodePtr> path_children = node->node_children ("Path");
_trim_end = DCPTime (node->number_child<double> ("TrimEnd"));
}
-Content::Content (shared_ptr<const Film> f, vector<shared_ptr<Content> > c)
- : _film (f)
+Content::Content (shared_ptr<const Film> film, vector<shared_ptr<Content> > c)
+ : _film (film)
, _position (c.front()->position ())
, _trim_start (c.front()->trim_start ())
, _trim_end (c.back()->trim_end ())
int const DCPContentProperty::CAN_BE_PLAYED = 600;
-DCPContent::DCPContent (shared_ptr<const Film> f, boost::filesystem::path p)
- : Content (f)
- , VideoContent (f)
- , SingleStreamAudioContent (f)
- , SubtitleContent (f)
+DCPContent::DCPContent (shared_ptr<const Film> film, boost::filesystem::path p)
+ : Content (film)
+ , VideoContent (film)
+ , SingleStreamAudioContent (film)
+ , SubtitleContent (film)
, _has_subtitles (false)
, _encrypted (false)
, _kdm_valid (false)
unset_colour_conversion (false);
}
-DCPContent::DCPContent (shared_ptr<const Film> f, cxml::ConstNodePtr node, int version)
- : Content (f, node)
- , VideoContent (f, node, version)
- , SingleStreamAudioContent (f, node, version)
- , SubtitleContent (f, node, version)
+DCPContent::DCPContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
+ : Content (film, node)
+ , VideoContent (film, node, version)
+ , SingleStreamAudioContent (film, node, version)
+ , SubtitleContent (film, node, version)
{
_name = node->string_child ("Name");
_has_subtitles = node->bool_child ("HasSubtitles");
class DCPContent : public VideoContent, public SingleStreamAudioContent, public SubtitleContent
{
public:
- DCPContent (boost::shared_ptr<const Film> f, boost::filesystem::path p);
- DCPContent (boost::shared_ptr<const Film> f, cxml::ConstNodePtr, int version);
+ DCPContent (boost::shared_ptr<const Film>, boost::filesystem::path p);
+ DCPContent (boost::shared_ptr<const Film>, cxml::ConstNodePtr, int version);
boost::shared_ptr<DCPContent> shared_from_this () {
return boost::dynamic_pointer_cast<DCPContent> (Content::shared_from_this ());
int const Encoder::_history_size = 25;
/** @param f Film that we are encoding */
-Encoder::Encoder (shared_ptr<const Film> f, weak_ptr<Job> j, shared_ptr<Writer> writer)
- : _film (f)
+Encoder::Encoder (shared_ptr<const Film> film, weak_ptr<Job> j, shared_ptr<Writer> writer)
+ : _film (film)
, _job (j)
, _video_frames_enqueued (0)
, _terminate (false)
class Encoder : public boost::noncopyable, public ExceptionStore
{
public:
- Encoder (boost::shared_ptr<const Film> f, boost::weak_ptr<Job>, boost::shared_ptr<Writer>);
+ Encoder (boost::shared_ptr<const Film>, boost::weak_ptr<Job>, boost::shared_ptr<Writer>);
virtual ~Encoder ();
/** Called to indicate that a processing run is about to begin */
using std::cout;
using boost::shared_ptr;
-ExamineContentJob::ExamineContentJob (shared_ptr<const Film> f, shared_ptr<Content> c)
- : Job (f)
+ExamineContentJob::ExamineContentJob (shared_ptr<const Film> film, shared_ptr<Content> c)
+ : Job (film)
, _content (c)
{
int const FFmpegContentProperty::SUBTITLE_STREAM = 101;
int const FFmpegContentProperty::FILTERS = 102;
-FFmpegContent::FFmpegContent (shared_ptr<const Film> f, boost::filesystem::path p)
- : Content (f, p)
- , VideoContent (f, p)
- , AudioContent (f, p)
- , SubtitleContent (f, p)
+FFmpegContent::FFmpegContent (shared_ptr<const Film> film, boost::filesystem::path p)
+ : Content (film, p)
+ , VideoContent (film, p)
+ , AudioContent (film, p)
+ , SubtitleContent (film, p)
{
}
-FFmpegContent::FFmpegContent (shared_ptr<const Film> f, cxml::ConstNodePtr node, int version, list<string>& notes)
- : Content (f, node)
- , VideoContent (f, node, version)
- , AudioContent (f, node)
- , SubtitleContent (f, node, version)
+FFmpegContent::FFmpegContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version, list<string>& notes)
+ : Content (film, node)
+ , VideoContent (film, node, version)
+ , AudioContent (film, node)
+ , SubtitleContent (film, node, version)
{
list<cxml::NodePtr> c = node->node_children ("SubtitleStream");
for (list<cxml::NodePtr>::const_iterator i = c.begin(); i != c.end(); ++i) {
_first_video = node->optional_number_child<double> ("FirstVideo");
}
-FFmpegContent::FFmpegContent (shared_ptr<const Film> f, vector<boost::shared_ptr<Content> > c)
- : Content (f, c)
- , VideoContent (f, c)
- , AudioContent (f, c)
- , SubtitleContent (f, c)
+FFmpegContent::FFmpegContent (shared_ptr<const Film> film, vector<boost::shared_ptr<Content> > c)
+ : Content (film, c)
+ , VideoContent (film, c)
+ , AudioContent (film, c)
+ , SubtitleContent (film, c)
{
shared_ptr<FFmpegContent> ref = dynamic_pointer_cast<FFmpegContent> (c[0]);
DCPOMATIC_ASSERT (ref);
using std::cout;
using boost::shared_ptr;
-ImageContent::ImageContent (shared_ptr<const Film> f, boost::filesystem::path p)
- : Content (f)
- , VideoContent (f)
+ImageContent::ImageContent (shared_ptr<const Film> film, boost::filesystem::path p)
+ : Content (film)
+ , VideoContent (film)
{
bool have_j2k = false;
if (boost::filesystem::is_regular_file (p) && valid_image_file (p)) {
}
-ImageContent::ImageContent (shared_ptr<const Film> f, cxml::ConstNodePtr node, int version)
- : Content (f, node)
- , VideoContent (f, node, version)
+ImageContent::ImageContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
+ : Content (film, node)
+ , VideoContent (film, node, version)
{
}
#define LOG_ERROR_NC(...) _film->log()->log (__VA_ARGS__, Log::TYPE_ERROR);
-Job::Job (shared_ptr<const Film> f)
- : _film (f)
+Job::Job (shared_ptr<const Film> film)
+ : _film (film)
, _thread (0)
, _state (NEW)
, _start_time (0)
using boost::dynamic_pointer_cast;
using boost::optional;
-Player::Player (shared_ptr<const Film> f)
- : _film (f)
+Player::Player (shared_ptr<const Film> film)
+ : _film (film)
, _have_valid_pieces (false)
, _ignore_video (false)
- , _burn_subtitles (f->burn_subtitles ())
+ , _burn_subtitles (film->burn_subtitles ())
{
_film_content_changed_connection = _film->ContentChanged.connect (bind (&Player::content_changed, this, _1, _2, _3));
_film_changed_connection = _film->Changed.connect (bind (&Player::film_changed, this, _1));
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 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
};
-SCPDCPJob::SCPDCPJob (shared_ptr<const Film> f)
- : Job (f)
+SCPDCPJob::SCPDCPJob (shared_ptr<const Film> film)
+ : Job (film)
, _status (_("Waiting"))
{
using boost::shared_ptr;
SendKDMEmailJob::SendKDMEmailJob (
- shared_ptr<const Film> f,
+ shared_ptr<const Film> film,
list<shared_ptr<Screen> > screens,
boost::filesystem::path dcp,
boost::posix_time::ptime from,
boost::posix_time::ptime to,
dcp::Formulation formulation
)
- : Job (f)
+ : Job (film)
, _screens (screens)
, _dcp (dcp)
, _from (from)
using std::vector;
using boost::shared_ptr;
-SingleStreamAudioContent::SingleStreamAudioContent (shared_ptr<const Film> f)
- : Content (f)
- , AudioContent (f)
+SingleStreamAudioContent::SingleStreamAudioContent (shared_ptr<const Film> film)
+ : Content (film)
+ , AudioContent (film)
{
}
-SingleStreamAudioContent::SingleStreamAudioContent (shared_ptr<const Film> f, boost::filesystem::path p)
- : Content (f, p)
- , AudioContent (f, p)
+SingleStreamAudioContent::SingleStreamAudioContent (shared_ptr<const Film> film, boost::filesystem::path p)
+ : Content (film, p)
+ , AudioContent (film, p)
{
}
-SingleStreamAudioContent::SingleStreamAudioContent (shared_ptr<const Film> f, cxml::ConstNodePtr node, int version)
- : Content (f, node)
- , AudioContent (f, node)
+SingleStreamAudioContent::SingleStreamAudioContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
+ : Content (film, node)
+ , AudioContent (film, node)
, _audio_stream (new AudioStream (node->number_child<int> ("AudioFrameRate"), AudioMapping (node->node_child ("AudioMapping"), version)))
{
public:
SingleStreamAudioContent (boost::shared_ptr<const Film>);
SingleStreamAudioContent (boost::shared_ptr<const Film>, boost::filesystem::path);
- SingleStreamAudioContent (boost::shared_ptr<const Film> f, cxml::ConstNodePtr node, int version);
+ SingleStreamAudioContent (boost::shared_ptr<const Film>, cxml::ConstNodePtr node, int version);
void as_xml (xmlpp::Node* node) const;
using std::cout;
using boost::shared_ptr;
-SndfileContent::SndfileContent (shared_ptr<const Film> f, boost::filesystem::path p)
- : Content (f, p)
- , SingleStreamAudioContent (f, p)
+SndfileContent::SndfileContent (shared_ptr<const Film> film, boost::filesystem::path p)
+ : Content (film, p)
+ , SingleStreamAudioContent (film, p)
{
}
-SndfileContent::SndfileContent (shared_ptr<const Film> f, cxml::ConstNodePtr node, int version)
- : Content (f, node)
- , SingleStreamAudioContent (f, node, version)
+SndfileContent::SndfileContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
+ : Content (film, node)
+ , SingleStreamAudioContent (film, node, version)
, _audio_length (node->number_child<int64_t> ("AudioLength"))
{
int const SubtitleContentProperty::SUBTITLE_LANGUAGE = 505;
int const SubtitleContentProperty::FONTS = 506;
-SubtitleContent::SubtitleContent (shared_ptr<const Film> f)
- : Content (f)
+SubtitleContent::SubtitleContent (shared_ptr<const Film> film)
+ : Content (film)
, _use_subtitles (false)
, _subtitle_x_offset (0)
, _subtitle_y_offset (0)
}
-SubtitleContent::SubtitleContent (shared_ptr<const Film> f, boost::filesystem::path p)
- : Content (f, p)
+SubtitleContent::SubtitleContent (shared_ptr<const Film> film, boost::filesystem::path p)
+ : Content (film, p)
, _use_subtitles (false)
, _subtitle_x_offset (0)
, _subtitle_y_offset (0)
}
-SubtitleContent::SubtitleContent (shared_ptr<const Film> f, cxml::ConstNodePtr node, int version)
- : Content (f, node)
+SubtitleContent::SubtitleContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
+ : Content (film, node)
, _use_subtitles (false)
, _subtitle_x_offset (0)
, _subtitle_y_offset (0)
connect_to_fonts ();
}
-SubtitleContent::SubtitleContent (shared_ptr<const Film> f, vector<shared_ptr<Content> > c)
- : Content (f, c)
+SubtitleContent::SubtitleContent (shared_ptr<const Film> film, vector<shared_ptr<Content> > c)
+ : Content (film, c)
{
shared_ptr<SubtitleContent> ref = dynamic_pointer_cast<SubtitleContent> (c[0]);
DCPOMATIC_ASSERT (ref);
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 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
/** @param s Film to use.
*/
-TranscodeJob::TranscodeJob (shared_ptr<const Film> f)
- : Job (f)
+TranscodeJob::TranscodeJob (shared_ptr<const Film> film)
+ : Job (film)
{
}
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 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
class TranscodeJob : public Job
{
public:
- TranscodeJob (boost::shared_ptr<const Film> f);
+ TranscodeJob (boost::shared_ptr<const Film>);
std::string name () const;
std::string json_name () const;
* @param f Film that we are transcoding.
* @param j Job that this transcoder is being used in.
*/
-Transcoder::Transcoder (shared_ptr<const Film> f, shared_ptr<Job> j)
- : _film (f)
- , _player (new Player (f))
- , _writer (new Writer (f, j))
- , _encoder (new Encoder (f, j, _writer))
+Transcoder::Transcoder (shared_ptr<const Film> film, shared_ptr<Job> j)
+ : _film (film)
+ , _player (new Player (film))
+ , _writer (new Writer (film, j))
+ , _encoder (new Encoder (film, j, _writer))
, _finishing (false)
{
using boost::optional;
using boost::dynamic_pointer_cast;
-VideoContent::VideoContent (shared_ptr<const Film> f)
- : Content (f)
+VideoContent::VideoContent (shared_ptr<const Film> film)
+ : Content (film)
, _video_length (0)
, _video_frame_rate (0)
, _video_frame_type (VIDEO_FRAME_TYPE_2D)
set_default_colour_conversion ();
}
-VideoContent::VideoContent (shared_ptr<const Film> f, DCPTime s, Frame len)
- : Content (f, s)
+VideoContent::VideoContent (shared_ptr<const Film> film, DCPTime s, Frame len)
+ : Content (film, s)
, _video_length (len)
, _video_frame_rate (0)
, _video_frame_type (VIDEO_FRAME_TYPE_2D)
set_default_colour_conversion ();
}
-VideoContent::VideoContent (shared_ptr<const Film> f, boost::filesystem::path p)
- : Content (f, p)
+VideoContent::VideoContent (shared_ptr<const Film> film, boost::filesystem::path p)
+ : Content (film, p)
, _video_length (0)
, _video_frame_rate (0)
, _video_frame_type (VIDEO_FRAME_TYPE_2D)
set_default_colour_conversion ();
}
-VideoContent::VideoContent (shared_ptr<const Film> f, cxml::ConstNodePtr node, int version)
- : Content (f, node)
+VideoContent::VideoContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
+ : Content (film, node)
{
_video_size.width = node->number_child<int> ("VideoWidth");
_video_size.height = node->number_child<int> ("VideoHeight");
}
}
-VideoContent::VideoContent (shared_ptr<const Film> f, vector<shared_ptr<Content> > c)
- : Content (f, c)
+VideoContent::VideoContent (shared_ptr<const Film> film, vector<shared_ptr<Content> > c)
+ : Content (film, c)
, _video_length (0)
{
shared_ptr<VideoContent> ref = dynamic_pointer_cast<VideoContent> (c[0]);
using boost::weak_ptr;
using boost::dynamic_pointer_cast;
-Writer::Writer (shared_ptr<const Film> f, weak_ptr<Job> j)
- : _film (f)
+Writer::Writer (shared_ptr<const Film> film, weak_ptr<Job> j)
+ : _film (film)
, _job (j)
, _first_nonexistant_frame (0)
, _thread (0)
}
void
-ContentMenu::popup (weak_ptr<Film> f, ContentList c, TimelineContentViewList v, wxPoint p)
+ContentMenu::popup (weak_ptr<Film> film, ContentList c, TimelineContentViewList v, wxPoint p)
{
- _film = f;
+ _film = film;
_content = c;
_views = v;
_repeat->Enable (!_content.empty ());
using boost::weak_ptr;
using boost::dynamic_pointer_cast;
-ContentPanel::ContentPanel (wxNotebook* n, boost::shared_ptr<Film> f, FilmViewer* viewer)
+ContentPanel::ContentPanel (wxNotebook* n, boost::shared_ptr<Film> film, FilmViewer* viewer)
: _timeline_dialog (0)
- , _film (f)
+ , _film (film)
, _generally_sensitive (true)
{
_panel = new wxPanel (n);
}
void
-ContentPanel::set_film (shared_ptr<Film> f)
+ContentPanel::set_film (shared_ptr<Film> film)
{
- _film = f;
+ _film = film;
film_changed (Film::CONTENT);
film_changed (Film::AUDIO_CHANNELS);
return _film;
}
- void set_film (boost::shared_ptr<Film> f);
+ void set_film (boost::shared_ptr<Film>);
void set_general_sensitivity (bool s);
void set_selection (boost::weak_ptr<Content>);
using boost::lexical_cast;
using boost::shared_ptr;
-DCPPanel::DCPPanel (wxNotebook* n, boost::shared_ptr<Film> f)
+DCPPanel::DCPPanel (wxNotebook* n, boost::shared_ptr<Film> film)
: _audio_dialog (0)
- , _film (f)
+ , _film (film)
, _generally_sensitive (true)
{
_panel = new wxPanel (n);
/** Sets the Film that we are editing */
void
-FilmEditor::set_film (shared_ptr<Film> f)
+FilmEditor::set_film (shared_ptr<Film> film)
{
- set_general_sensitivity (f != 0);
+ set_general_sensitivity (film != 0);
- if (_film == f) {
+ if (_film == film) {
return;
}
- _film = f;
+ _film = film;
_content_panel->set_film (_film);
_dcp_panel->set_film (_film);
}
void
-FilmViewer::set_film (shared_ptr<Film> f)
+FilmViewer::set_film (shared_ptr<Film> film)
{
- if (_film == f) {
+ if (_film == film) {
return;
}
- _film = f;
+ _film = film;
_frame.reset ();
}
try {
- _player.reset (new Player (f));
+ _player.reset (new Player (_film));
} catch (bad_alloc) {
error_dialog (this, _("There is not enough free memory to do that."));
_film.reset ();
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
-HintsDialog::HintsDialog (wxWindow* parent, boost::weak_ptr<Film> f)
+HintsDialog::HintsDialog (wxWindow* parent, boost::weak_ptr<Film> film)
: wxDialog (parent, wxID_ANY, _("Hints"))
- , _film (f)
+ , _film (film)
{
wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL);
_text = new wxRichTextCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (400, 300), wxRE_READONLY);
_text->GetCaret()->Hide ();
- boost::shared_ptr<Film> film = _film.lock ();
- if (film) {
- _film_changed_connection = film->Changed.connect (boost::bind (&HintsDialog::film_changed, this));
- _film_content_changed_connection = film->ContentChanged.connect (boost::bind (&HintsDialog::film_changed, this));
+ boost::shared_ptr<Film> locked_film = _film.lock ();
+ if (locked_film) {
+ _film_changed_connection = locked_film->Changed.connect (boost::bind (&HintsDialog::film_changed, this));
+ _film_content_changed_connection = locked_film->ContentChanged.connect (boost::bind (&HintsDialog::film_changed, this));
}
film_changed ();
void
Timeline::recreate_views ()
{
- shared_ptr<const Film> fl = _film.lock ();
- if (!fl) {
+ shared_ptr<const Film> film = _film.lock ();
+ if (!film) {
return;
}
_views.clear ();
_views.push_back (_time_axis_view);
- ContentList content = fl->content ();
+ ContentList content = film->content ();
for (ContentList::iterator i = content.begin(); i != content.end(); ++i) {
if (dynamic_pointer_cast<VideoContent> (*i)) {
BOOST_AUTO_TEST_CASE (ffmpeg_have_dcp_test)
{
boost::filesystem::path p = test_film_dir ("ffmpeg_dcp_test");
- shared_ptr<Film> f (new Film (p.string ()));
- f->read_metadata ();
- BOOST_CHECK (!f->cpls().empty());
+ shared_ptr<Film> film (new Film (p.string ()));
+ film->read_metadata ();
+ BOOST_CHECK (!film->cpls().empty());
- p /= f->dcp_name();
+ p /= film->dcp_name();
boost::filesystem::directory_iterator i = boost::filesystem::directory_iterator (p);
while (i != boost::filesystem::directory_iterator() && !boost::algorithm::starts_with (i->path().leaf().string(), "j2c")) {
++i;
boost::filesystem::remove (i->path ());
}
- BOOST_CHECK (f->cpls().empty());
+ BOOST_CHECK (film->cpls().empty());
}
BOOST_AUTO_TEST_CASE (film_metadata_test)
{
- shared_ptr<Film> f = new_test_film ("film_metadata_test");
+ shared_ptr<Film> film = new_test_film ("film_metadata_test");
boost::filesystem::path dir = test_film_dir ("film_metadata_test");
- f->_isdcf_date = boost::gregorian::from_undelimited_string ("20130211");
- BOOST_CHECK (f->container() == Ratio::from_id ("185"));
- BOOST_CHECK (f->dcp_content_type() == 0);
+ film->_isdcf_date = boost::gregorian::from_undelimited_string ("20130211");
+ BOOST_CHECK (film->container() == Ratio::from_id ("185"));
+ BOOST_CHECK (film->dcp_content_type() == 0);
- f->set_name ("fred");
- f->set_dcp_content_type (DCPContentType::from_pretty_name ("Short"));
- f->set_container (Ratio::from_id ("185"));
- f->set_j2k_bandwidth (200000000);
- f->write_metadata ();
+ film->set_name ("fred");
+ film->set_dcp_content_type (DCPContentType::from_pretty_name ("Short"));
+ film->set_container (Ratio::from_id ("185"));
+ film->set_j2k_bandwidth (200000000);
+ film->write_metadata ();
list<string> ignore;
ignore.push_back ("Key");
/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 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
class TestJob : public Job
{
public:
- TestJob (shared_ptr<Film> f)
- : Job (f)
+ TestJob (shared_ptr<Film> film)
+ : Job (film)
{
}
BOOST_AUTO_TEST_CASE (job_manager_test)
{
- shared_ptr<Film> f;
+ shared_ptr<Film> film;
/* Single job */
- shared_ptr<TestJob> a (new TestJob (f));
+ shared_ptr<TestJob> a (new TestJob (film));
JobManager::instance()->add (a);
dcpomatic_sleep (1);
boost::filesystem::remove_all (p);
}
- shared_ptr<Film> f = shared_ptr<Film> (new Film (p.string()));
- f->write_metadata ();
- return f;
+ shared_ptr<Film> film = shared_ptr<Film> (new Film (p.string()));
+ film->write_metadata ();
+ return film;
}
void