+
+shared_ptr<Player>
+Film::player () const
+{
+ boost::mutex::scoped_lock lm (_state_mutex);
+ return shared_ptr<Player> (new Player (shared_from_this (), _playlist));
+}
+
+ContentList
+Film::content () const
+{
+ return _playlist->content ();
+}
+
+void
+Film::add_content (shared_ptr<Content> c)
+{
+ _playlist->add (c);
+ examine_content (c);
+}
+
+void
+Film::remove_content (shared_ptr<Content> c)
+{
+ _playlist->remove (c);
+}
+
+void
+Film::move_content_earlier (shared_ptr<Content> c)
+{
+ _playlist->move_earlier (c);
+}
+
+void
+Film::move_content_later (shared_ptr<Content> c)
+{
+ _playlist->move_later (c);
+}
+
+ContentAudioFrame
+Film::audio_length () const
+{
+ return _playlist->audio_length ();
+}
+
+int
+Film::audio_channels () const
+{
+ return _playlist->audio_channels ();
+}
+
+int
+Film::audio_frame_rate () const
+{
+ return _playlist->audio_frame_rate ();
+}
+
+bool
+Film::has_audio () const
+{
+ return _playlist->has_audio ();
+}
+
+float
+Film::video_frame_rate () const
+{
+ return _playlist->video_frame_rate ();
+}
+
+libdcp::Size
+Film::video_size () const
+{
+ return _playlist->video_size ();
+}
+
+ContentVideoFrame
+Film::video_length () const
+{
+ return _playlist->video_length ();
+}
+
+ContentVideoFrame
+Film::content_length () const
+{
+ return _playlist->content_length ();
+}
+
+vector<FFmpegSubtitleStream>
+Film::ffmpeg_subtitle_streams () const
+{
+ shared_ptr<FFmpegContent> f = _playlist->ffmpeg ();
+ if (f) {
+ return f->subtitle_streams ();
+ }
+
+ return vector<FFmpegSubtitleStream> ();
+}
+
+boost::optional<FFmpegSubtitleStream>
+Film::ffmpeg_subtitle_stream () const
+{
+ shared_ptr<FFmpegContent> f = _playlist->ffmpeg ();
+ if (f) {
+ return f->subtitle_stream ();
+ }
+
+ return boost::none;
+}
+
+vector<FFmpegAudioStream>
+Film::ffmpeg_audio_streams () const
+{
+ shared_ptr<FFmpegContent> f = _playlist->ffmpeg ();
+ if (f) {
+ return f->audio_streams ();
+ }
+
+ return vector<FFmpegAudioStream> ();
+}
+
+boost::optional<FFmpegAudioStream>
+Film::ffmpeg_audio_stream () const
+{
+ shared_ptr<FFmpegContent> f = _playlist->ffmpeg ();
+ if (f) {
+ return f->audio_stream ();
+ }
+
+ return boost::none;
+}
+
+void
+Film::set_ffmpeg_subtitle_stream (FFmpegSubtitleStream s)
+{
+ shared_ptr<FFmpegContent> f = _playlist->ffmpeg ();
+ if (f) {
+ f->set_subtitle_stream (s);
+ }
+}
+
+void
+Film::set_ffmpeg_audio_stream (FFmpegAudioStream s)
+{
+ shared_ptr<FFmpegContent> f = _playlist->ffmpeg ();
+ if (f) {
+ f->set_audio_stream (s);
+ }
+}
+
+void
+Film::set_audio_mapping (AudioMapping m)
+{
+ {
+ boost::mutex::scoped_lock lm (_state_mutex);
+ _audio_mapping = m;
+ }
+
+ signal_changed (AUDIO_MAPPING);
+}
+
+void
+Film::playlist_content_changed (boost::weak_ptr<Content> c, int p)
+{
+ if (p == VideoContentProperty::VIDEO_FRAME_RATE) {
+ set_dcp_frame_rate (best_dcp_frame_rate (video_frame_rate ()));
+ } else if (p == AudioContentProperty::AUDIO_CHANNELS) {
+ set_audio_mapping (_playlist->default_audio_mapping ());
+ }
+
+ if (ui_signaller) {
+ ui_signaller->emit (boost::bind (boost::ref (ContentChanged), c, p));
+ }
+}
+
+void
+Film::playlist_changed ()
+{
+ signal_changed (CONTENT);
+}
+
+int
+Film::loop () const
+{
+ return _playlist->loop ();
+}
+
+void
+Film::set_loop (int c)
+{
+ _playlist->set_loop (c);
+}