-/* -*- c-basic-offset: 8; default-tab-width: 8; -*- */
-
/*
Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
#include <libxml++/libxml++.h>
#include <libcxml/cxml.h>
#include "film.h"
-#include "container.h"
#include "job.h"
#include "filter.h"
#include "util.h"
#include "imagemagick_content.h"
#include "sndfile_content.h"
#include "dcp_content_type.h"
+#include "ratio.h"
#include "i18n.h"
using std::list;
using boost::shared_ptr;
using boost::lexical_cast;
+using boost::dynamic_pointer_cast;
using boost::to_upper_copy;
using boost::ends_with;
using boost::starts_with;
JobManager::instance()->add (_analyse_audio_job);
}
-/** Start a job to examine a piece of content */
-void
-Film::examine_content (shared_ptr<Content> c)
-{
- shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c));
- JobManager::instance()->add (j);
-}
-
void
Film::analyse_audio_finished ()
{
{
optional<string> c = f.optional_string_child ("Container");
if (c) {
- _container = Container::from_id (c.get ());
+ _container = Ratio::from_id (c.get ());
}
}
}
void
-Film::set_container (Container const * c)
+Film::set_container (Ratio const * c)
{
{
boost::mutex::scoped_lock lm (_state_mutex);
return _playlist->content ();
}
+void
+Film::examine_and_add_content (shared_ptr<Content> c)
+{
+ shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c));
+ JobManager::instance()->add (j);
+}
+
void
Film::add_content (shared_ptr<Content> c)
{
+ /* Add video content after any existing content */
+ if (dynamic_pointer_cast<VideoContent> (c)) {
+ c->set_start (_playlist->video_end ());
+ }
+
_playlist->add (c);
- examine_content (c);
}
void
/* XXX */
return 48000;
}
+
+void
+Film::set_sequence_video (bool s)
+{
+ _playlist->set_sequence_video (s);
+}
+
+libdcp::Size
+Film::full_frame () const
+{
+ return libdcp::Size (2048, 1080);
+}