2 Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #include <boost/filesystem.hpp>
29 #include <boost/algorithm/string.hpp>
30 #include <boost/lexical_cast.hpp>
31 #include <boost/date_time.hpp>
32 #include <libxml++/libxml++.h>
33 #include <libcxml/cxml.h>
38 #include "transcoder.h"
40 #include "job_manager.h"
41 #include "ab_transcode_job.h"
42 #include "transcode_job.h"
43 #include "scp_dcp_job.h"
45 #include "exceptions.h"
46 #include "examine_content_job.h"
50 #include "ui_signaller.h"
51 #include "video_decoder.h"
52 #include "audio_decoder.h"
53 #include "sndfile_decoder.h"
54 #include "analyse_audio_job.h"
56 #include "ffmpeg_content.h"
57 #include "imagemagick_content.h"
58 #include "sndfile_content.h"
63 using std::stringstream;
75 using boost::shared_ptr;
76 using boost::lexical_cast;
77 using boost::to_upper_copy;
78 using boost::ends_with;
79 using boost::starts_with;
80 using boost::optional;
83 int const Film::state_version = 4;
85 /** Construct a Film object in a given directory, reading any metadata
86 * file that exists in that directory. An exception will be thrown if
87 * must_exist is true and the specified directory does not exist.
89 * @param d Film directory.
90 * @param must_exist true to throw an exception if does not exist.
93 Film::Film (string d, bool must_exist)
94 : _playlist (new Playlist)
95 , _use_dci_name (true)
96 , _trust_content_headers (true)
97 , _dcp_content_type (0)
99 , _scaler (Scaler::from_id ("bicubic"))
105 , _with_subtitles (false)
106 , _subtitle_offset (0)
107 , _subtitle_scale (1)
109 , _j2k_bandwidth (200000000)
110 , _dci_metadata (Config::instance()->default_dci_metadata ())
111 , _dcp_frame_rate (0)
114 set_dci_date_today ();
116 /* Make state.directory a complete path without ..s (where possible)
117 (Code swiped from Adam Bowen on stackoverflow)
120 boost::filesystem::path p (boost::filesystem::system_complete (d));
121 boost::filesystem::path result;
122 for (boost::filesystem::path::iterator i = p.begin(); i != p.end(); ++i) {
124 if (boost::filesystem::is_symlink (result) || result.filename() == "..") {
127 result = result.parent_path ();
129 } else if (*i != ".") {
134 set_directory (result.string ());
136 if (!boost::filesystem::exists (directory())) {
138 throw OpenFileError (directory());
140 boost::filesystem::create_directory (directory());
148 _log.reset (new FileLog (file ("log")));
151 Film::Film (Film const & o)
152 : boost::enable_shared_from_this<Film> (o)
153 /* note: the copied film shares the original's log */
155 , _playlist (new Playlist)
156 , _directory (o._directory)
158 , _use_dci_name (o._use_dci_name)
159 , _trust_content_headers (o._trust_content_headers)
160 , _dcp_content_type (o._dcp_content_type)
161 , _format (o._format)
163 , _filters (o._filters)
164 , _scaler (o._scaler)
165 , _trim_start (o._trim_start)
166 , _trim_end (o._trim_end)
168 , _audio_gain (o._audio_gain)
169 , _audio_delay (o._audio_delay)
170 , _with_subtitles (o._with_subtitles)
171 , _subtitle_offset (o._subtitle_offset)
172 , _subtitle_scale (o._subtitle_scale)
173 , _colour_lut (o._colour_lut)
174 , _j2k_bandwidth (o._j2k_bandwidth)
175 , _dci_metadata (o._dci_metadata)
176 , _dcp_frame_rate (o._dcp_frame_rate)
177 , _dci_date (o._dci_date)
180 for (ContentList::iterator i = o._content.begin(); i != o._content.end(); ++i) {
181 _content.push_back ((*i)->clone ());
184 _playlist->setup (_content);
188 Film::video_state_identifier () const
196 pair<string, string> f = Filter::ffmpeg_strings (filters());
200 << "_" << content_digest()
201 << "_" << crop().left << "_" << crop().right << "_" << crop().top << "_" << crop().bottom
202 << "_" << _dcp_frame_rate
203 << "_" << f.first << "_" << f.second
204 << "_" << scaler()->id()
205 << "_" << j2k_bandwidth()
206 << "_" << boost::lexical_cast<int> (colour_lut());
209 pair<string, string> fa = Filter::ffmpeg_strings (Config::instance()->reference_filters());
210 s << "ab_" << Config::instance()->reference_scaler()->id() << "_" << fa.first << "_" << fa.second;
217 /** @return The path to the directory to write video frame info files to */
219 Film::info_dir () const
221 boost::filesystem::path p;
223 p /= video_state_identifier ();
224 return dir (p.string());
228 Film::video_mxf_dir () const
230 boost::filesystem::path p;
231 return dir ("video");
235 Film::video_mxf_filename () const
237 return video_state_identifier() + ".mxf";
241 Film::audio_analysis_path () const
243 boost::filesystem::path p;
245 p /= "XXX";//content_digest();
246 return file (p.string ());
249 /** Add suitable Jobs to the JobManager to create a DCP for this Film */
253 set_dci_date_today ();
255 if (dcp_name().find ("/") != string::npos) {
256 throw BadSettingError (_("name"), _("cannot contain slashes"));
259 log()->log (String::compose ("DVD-o-matic %1 git %2 using %3", dvdomatic_version, dvdomatic_git_commit, dependency_version_summary()));
263 gethostname (buffer, sizeof (buffer));
264 log()->log (String::compose ("Starting to make DCP on %1", buffer));
267 // log()->log (String::compose ("Content is %1; type %2", content_path(), (content_type() == STILL ? _("still") : _("video"))));
269 // log()->log (String::compose ("Content length %1", length().get()));
271 // log()->log (String::compose ("Content digest %1", content_digest()));
272 // log()->log (String::compose ("Content at %1 fps, DCP at %2 fps", source_frame_rate(), dcp_frame_rate()));
273 log()->log (String::compose ("%1 threads", Config::instance()->num_local_encoding_threads()));
274 log()->log (String::compose ("J2K bandwidth %1", j2k_bandwidth()));
275 #ifdef DVDOMATIC_DEBUG
276 log()->log ("DVD-o-matic built in debug mode.");
278 log()->log ("DVD-o-matic built in optimised mode.");
281 log()->log ("libdcp built in debug mode.");
283 log()->log ("libdcp built in optimised mode.");
285 pair<string, int> const c = cpu_info ();
286 log()->log (String::compose ("CPU: %1, %2 processors", c.first, c.second));
289 throw MissingSettingError (_("format"));
292 if (content().empty ()) {
293 throw MissingSettingError (_("content"));
296 if (dcp_content_type() == 0) {
297 throw MissingSettingError (_("content type"));
300 if (name().empty()) {
301 throw MissingSettingError (_("name"));
307 r = JobManager::instance()->add (shared_ptr<Job> (new ABTranscodeJob (shared_from_this())));
309 r = JobManager::instance()->add (shared_ptr<Job> (new TranscodeJob (shared_from_this())));
313 /** Start a job to analyse the audio in our Playlist */
315 Film::analyse_audio ()
317 if (_analyse_audio_job) {
321 _analyse_audio_job.reset (new AnalyseAudioJob (shared_from_this()));
322 _analyse_audio_job->Finished.connect (bind (&Film::analyse_audio_finished, this));
323 JobManager::instance()->add (_analyse_audio_job);
326 /** Start a job to examine a piece of content */
328 Film::examine_content (shared_ptr<Content> c)
330 shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c, trust_content_headers ()));
331 j->Finished.connect (bind (&Film::examine_content_finished, this));
332 JobManager::instance()->add (j);
336 Film::analyse_audio_finished ()
340 if (_analyse_audio_job->finished_ok ()) {
341 AudioAnalysisSucceeded ();
344 _analyse_audio_job.reset ();
347 /** Start a job to send our DCP to the configured TMS */
349 Film::send_dcp_to_tms ()
351 shared_ptr<Job> j (new SCPDCPJob (shared_from_this()));
352 JobManager::instance()->add (j);
355 /** Count the number of frames that have been encoded for this film.
356 * @return frame count.
359 Film::encoded_frames () const
366 for (boost::filesystem::directory_iterator i = boost::filesystem::directory_iterator (info_dir ()); i != boost::filesystem::directory_iterator(); ++i) {
368 boost::this_thread::interruption_point ();
374 /** Write state to our `metadata' file */
376 Film::write_metadata () const
378 ContentList the_content = content ();
380 boost::mutex::scoped_lock lm (_state_mutex);
382 boost::filesystem::create_directories (directory());
385 xmlpp::Element* root = doc.create_root_node ("Metadata");
387 root->add_child("Version")->add_child_text (boost::lexical_cast<string> (state_version));
388 root->add_child("Name")->add_child_text (_name);
389 root->add_child("UseDCIName")->add_child_text (_use_dci_name ? "1" : "0");
390 root->add_child("TrustContentHeaders")->add_child_text (_trust_content_headers ? "1" : "0");
391 if (_dcp_content_type) {
392 root->add_child("DCPContentType")->add_child_text (_dcp_content_type->dci_name ());
395 root->add_child("Format")->add_child_text (_format->id ());
397 root->add_child("LeftCrop")->add_child_text (boost::lexical_cast<string> (_crop.left));
398 root->add_child("RightCrop")->add_child_text (boost::lexical_cast<string> (_crop.right));
399 root->add_child("TopCrop")->add_child_text (boost::lexical_cast<string> (_crop.top));
400 root->add_child("BottomCrop")->add_child_text (boost::lexical_cast<string> (_crop.bottom));
402 for (vector<Filter const *>::const_iterator i = _filters.begin(); i != _filters.end(); ++i) {
403 root->add_child("Filter")->add_child_text ((*i)->id ());
406 root->add_child("Scaler")->add_child_text (_scaler->id ());
407 root->add_child("TrimStart")->add_child_text (boost::lexical_cast<string> (_trim_start));
408 root->add_child("TrimEnd")->add_child_text (boost::lexical_cast<string> (_trim_end));
409 root->add_child("AB")->add_child_text (_ab ? "1" : "0");
410 root->add_child("AudioGain")->add_child_text (boost::lexical_cast<string> (_audio_gain));
411 root->add_child("AudioDelay")->add_child_text (boost::lexical_cast<string> (_audio_delay));
412 root->add_child("WithSubtitles")->add_child_text (_with_subtitles ? "1" : "0");
413 root->add_child("SubtitleOffset")->add_child_text (boost::lexical_cast<string> (_subtitle_offset));
414 root->add_child("SubtitleScale")->add_child_text (boost::lexical_cast<string> (_subtitle_scale));
415 root->add_child("ColourLUT")->add_child_text (boost::lexical_cast<string> (_colour_lut));
416 root->add_child("J2KBandwidth")->add_child_text (boost::lexical_cast<string> (_j2k_bandwidth));
417 _dci_metadata.as_xml (root->add_child ("DCIMetadata"));
418 root->add_child("DCPFrameRate")->add_child_text (boost::lexical_cast<string> (_dcp_frame_rate));
419 root->add_child("DCIDate")->add_child_text (boost::gregorian::to_iso_string (_dci_date));
421 for (ContentList::iterator i = the_content.begin(); i != the_content.end(); ++i) {
422 (*i)->as_xml (root->add_child ("Content"));
425 doc.write_to_file_formatted (file ("metadata.xml"));
430 /** Read state from our metadata file */
432 Film::read_metadata ()
434 boost::mutex::scoped_lock lm (_state_mutex);
436 if (boost::filesystem::exists (file ("metadata")) && !boost::filesystem::exists (file ("metadata.xml"))) {
437 throw StringError (_("This film was created with an older version of DVD-o-matic, and unfortunately it cannot be loaded into this version. You will need to create a new Film, re-add your content and set it up again. Sorry!"));
440 cxml::File f (file ("metadata.xml"), "Metadata");
442 _name = f.string_child ("Name");
443 _use_dci_name = f.bool_child ("UseDCIName");
444 _trust_content_headers = f.bool_child ("TrustContentHeaders");
447 optional<string> c = f.optional_string_child ("DCPContentType");
449 _dcp_content_type = DCPContentType::from_dci_name (c.get ());
454 optional<string> c = f.optional_string_child ("Format");
456 _format = Format::from_id (c.get ());
460 _crop.left = f.number_child<int> ("LeftCrop");
461 _crop.right = f.number_child<int> ("RightCrop");
462 _crop.top = f.number_child<int> ("TopCrop");
463 _crop.bottom = f.number_child<int> ("BottomCrop");
466 list<shared_ptr<cxml::Node> > c = f.node_children ("Filter");
467 for (list<shared_ptr<cxml::Node> >::iterator i = c.begin(); i != c.end(); ++i) {
468 _filters.push_back (Filter::from_id ((*i)->content ()));
472 _scaler = Scaler::from_id (f.string_child ("Scaler"));
473 _trim_start = f.number_child<int> ("TrimStart");
474 _trim_end = f.number_child<int> ("TrimEnd");
475 _ab = f.bool_child ("AB");
476 _audio_gain = f.number_child<float> ("AudioGain");
477 _audio_delay = f.number_child<int> ("AudioDelay");
478 _with_subtitles = f.bool_child ("WithSubtitles");
479 _subtitle_offset = f.number_child<float> ("SubtitleOffset");
480 _subtitle_scale = f.number_child<float> ("SubtitleScale");
481 _colour_lut = f.number_child<int> ("ColourLUT");
482 _j2k_bandwidth = f.number_child<int> ("J2KBandwidth");
483 _dci_metadata = DCIMetadata (f.node_child ("DCIMetadata"));
484 _dcp_frame_rate = f.number_child<int> ("DCPFrameRate");
485 _dci_date = boost::gregorian::from_undelimited_string (f.string_child ("DCIDate"));
487 list<shared_ptr<cxml::Node> > c = f.node_children ("Content");
488 for (list<shared_ptr<cxml::Node> >::iterator i = c.begin(); i != c.end(); ++i) {
490 string const type = (*i)->string_child ("Type");
492 if (type == "FFmpeg") {
493 _content.push_back (shared_ptr<Content> (new FFmpegContent (*i)));
494 } else if (type == "ImageMagick") {
495 _content.push_back (shared_ptr<Content> (new ImageMagickContent (*i)));
496 } else if (type == "Sndfile") {
497 _content.push_back (shared_ptr<Content> (new SndfileContent (*i)));
505 Film::cropped_size (libdcp::Size s) const
507 boost::mutex::scoped_lock lm (_state_mutex);
508 s.width -= _crop.left + _crop.right;
509 s.height -= _crop.top + _crop.bottom;
513 /** Given a directory name, return its full path within the Film's directory.
514 * The directory (and its parents) will be created if they do not exist.
517 Film::dir (string d) const
519 boost::mutex::scoped_lock lm (_directory_mutex);
521 boost::filesystem::path p;
525 boost::filesystem::create_directories (p);
530 /** Given a file or directory name, return its full path within the Film's directory.
531 * _directory_mutex must not be locked on entry.
532 * Any required parent directories will be created.
535 Film::file (string f) const
537 boost::mutex::scoped_lock lm (_directory_mutex);
539 boost::filesystem::path p;
543 boost::filesystem::create_directories (p.parent_path ());
548 /** @return The sampling rate that we will resample the audio to */
550 Film::target_audio_sample_rate () const
556 /* Resample to a DCI-approved sample rate */
557 double t = dcp_audio_sample_rate (audio_frame_rate());
559 FrameRateConversion frc (video_frame_rate(), dcp_frame_rate());
561 /* Compensate if the DCP is being run at a different frame rate
562 to the source; that is, if the video is run such that it will
563 look different in the DCP compared to the source (slower or faster).
564 skip/repeat doesn't come into effect here.
567 if (frc.change_speed) {
568 t *= video_frame_rate() * frc.factor() / dcp_frame_rate();
574 /** @return a DCI-compliant name for a DCP of this film */
576 Film::dci_name (bool if_created_now) const
580 string fixed_name = to_upper_copy (name());
581 for (size_t i = 0; i < fixed_name.length(); ++i) {
582 if (fixed_name[i] == ' ') {
587 /* Spec is that the name part should be maximum 14 characters, as I understand it */
588 if (fixed_name.length() > 14) {
589 fixed_name = fixed_name.substr (0, 14);
594 if (dcp_content_type()) {
595 d << "_" << dcp_content_type()->dci_name();
599 d << "_" << format()->dci_name();
602 DCIMetadata const dm = dci_metadata ();
604 if (!dm.audio_language.empty ()) {
605 d << "_" << dm.audio_language;
606 if (!dm.subtitle_language.empty()) {
607 d << "-" << dm.subtitle_language;
613 if (!dm.territory.empty ()) {
614 d << "_" << dm.territory;
615 if (!dm.rating.empty ()) {
616 d << "-" << dm.rating;
620 switch (audio_channels ()) {
637 if (!dm.studio.empty ()) {
638 d << "_" << dm.studio;
641 if (if_created_now) {
642 d << "_" << boost::gregorian::to_iso_string (boost::gregorian::day_clock::local_day ());
644 d << "_" << boost::gregorian::to_iso_string (_dci_date);
647 if (!dm.facility.empty ()) {
648 d << "_" << dm.facility;
651 if (!dm.package_type.empty ()) {
652 d << "_" << dm.package_type;
658 /** @return name to give the DCP */
660 Film::dcp_name (bool if_created_now) const
662 if (use_dci_name()) {
663 return dci_name (if_created_now);
671 Film::set_directory (string d)
673 boost::mutex::scoped_lock lm (_state_mutex);
679 Film::set_name (string n)
682 boost::mutex::scoped_lock lm (_state_mutex);
685 signal_changed (NAME);
689 Film::set_use_dci_name (bool u)
692 boost::mutex::scoped_lock lm (_state_mutex);
695 signal_changed (USE_DCI_NAME);
699 Film::set_trust_content_headers (bool t)
702 boost::mutex::scoped_lock lm (_state_mutex);
703 _trust_content_headers = t;
706 signal_changed (TRUST_CONTENT_HEADERS);
708 if (!_trust_content_headers && !content().empty()) {
709 /* We just said that we don't trust the content's header */
710 ContentList c = content ();
711 for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
712 examine_content (*i);
718 Film::set_dcp_content_type (DCPContentType const * t)
721 boost::mutex::scoped_lock lm (_state_mutex);
722 _dcp_content_type = t;
724 signal_changed (DCP_CONTENT_TYPE);
728 Film::set_format (Format const * f)
731 boost::mutex::scoped_lock lm (_state_mutex);
734 signal_changed (FORMAT);
738 Film::set_crop (Crop c)
741 boost::mutex::scoped_lock lm (_state_mutex);
744 signal_changed (CROP);
748 Film::set_left_crop (int c)
751 boost::mutex::scoped_lock lm (_state_mutex);
753 if (_crop.left == c) {
759 signal_changed (CROP);
763 Film::set_right_crop (int c)
766 boost::mutex::scoped_lock lm (_state_mutex);
767 if (_crop.right == c) {
773 signal_changed (CROP);
777 Film::set_top_crop (int c)
780 boost::mutex::scoped_lock lm (_state_mutex);
781 if (_crop.top == c) {
787 signal_changed (CROP);
791 Film::set_bottom_crop (int c)
794 boost::mutex::scoped_lock lm (_state_mutex);
795 if (_crop.bottom == c) {
801 signal_changed (CROP);
805 Film::set_filters (vector<Filter const *> f)
808 boost::mutex::scoped_lock lm (_state_mutex);
811 signal_changed (FILTERS);
815 Film::set_scaler (Scaler const * s)
818 boost::mutex::scoped_lock lm (_state_mutex);
821 signal_changed (SCALER);
825 Film::set_trim_start (int t)
828 boost::mutex::scoped_lock lm (_state_mutex);
831 signal_changed (TRIM_START);
835 Film::set_trim_end (int t)
838 boost::mutex::scoped_lock lm (_state_mutex);
841 signal_changed (TRIM_END);
845 Film::set_ab (bool a)
848 boost::mutex::scoped_lock lm (_state_mutex);
855 Film::set_audio_gain (float g)
858 boost::mutex::scoped_lock lm (_state_mutex);
861 signal_changed (AUDIO_GAIN);
865 Film::set_audio_delay (int d)
868 boost::mutex::scoped_lock lm (_state_mutex);
871 signal_changed (AUDIO_DELAY);
875 Film::set_with_subtitles (bool w)
878 boost::mutex::scoped_lock lm (_state_mutex);
881 signal_changed (WITH_SUBTITLES);
885 Film::set_subtitle_offset (int o)
888 boost::mutex::scoped_lock lm (_state_mutex);
889 _subtitle_offset = o;
891 signal_changed (SUBTITLE_OFFSET);
895 Film::set_subtitle_scale (float s)
898 boost::mutex::scoped_lock lm (_state_mutex);
901 signal_changed (SUBTITLE_SCALE);
905 Film::set_colour_lut (int i)
908 boost::mutex::scoped_lock lm (_state_mutex);
911 signal_changed (COLOUR_LUT);
915 Film::set_j2k_bandwidth (int b)
918 boost::mutex::scoped_lock lm (_state_mutex);
921 signal_changed (J2K_BANDWIDTH);
925 Film::set_dci_metadata (DCIMetadata m)
928 boost::mutex::scoped_lock lm (_state_mutex);
931 signal_changed (DCI_METADATA);
936 Film::set_dcp_frame_rate (int f)
939 boost::mutex::scoped_lock lm (_state_mutex);
942 signal_changed (DCP_FRAME_RATE);
946 Film::signal_changed (Property p)
949 boost::mutex::scoped_lock lm (_state_mutex);
954 ui_signaller->emit (boost::bind (boost::ref (Changed), p));
959 Film::set_dci_date_today ()
961 _dci_date = boost::gregorian::day_clock::local_day ();
965 Film::info_path (int f) const
967 boost::filesystem::path p;
972 s << setfill('0') << f << ".md5";
976 /* info_dir() will already have added any initial bit of the path,
977 so don't call file() on this.
983 Film::j2c_path (int f, bool t) const
985 boost::filesystem::path p;
987 p /= video_state_identifier ();
991 s << setfill('0') << f << ".j2c";
998 return file (p.string ());
1001 /** Make an educated guess as to whether we have a complete DCP
1003 * @return true if we do.
1007 Film::have_dcp () const
1010 libdcp::DCP dcp (dir (dcp_name()));
1020 Film::player () const
1022 boost::mutex::scoped_lock lm (_state_mutex);
1023 return shared_ptr<Player> (new Player (shared_from_this (), _playlist));
1027 Film::add_content (shared_ptr<Content> c)
1030 boost::mutex::scoped_lock lm (_state_mutex);
1031 _content.push_back (c);
1032 _playlist->setup (_content);
1035 signal_changed (CONTENT);
1037 examine_content (c);
1041 Film::remove_content (shared_ptr<Content> c)
1044 boost::mutex::scoped_lock lm (_state_mutex);
1045 ContentList::iterator i = find (_content.begin(), _content.end(), c);
1046 if (i != _content.end ()) {
1051 signal_changed (CONTENT);
1055 Film::move_content_earlier (shared_ptr<Content> c)
1058 boost::mutex::scoped_lock lm (_state_mutex);
1059 ContentList::iterator i = find (_content.begin(), _content.end(), c);
1060 if (i == _content.begin () || i == _content.end()) {
1064 ContentList::iterator j = i;
1070 signal_changed (CONTENT);
1074 Film::move_content_later (shared_ptr<Content> c)
1077 boost::mutex::scoped_lock lm (_state_mutex);
1078 ContentList::iterator i = find (_content.begin(), _content.end(), c);
1079 if (i == _content.end()) {
1083 ContentList::iterator j = i;
1085 if (j == _content.end ()) {
1092 signal_changed (CONTENT);
1097 Film::audio_length () const
1099 return _playlist->audio_length ();
1103 Film::audio_channels () const
1105 return _playlist->audio_channels ();
1109 Film::audio_frame_rate () const
1111 return _playlist->audio_frame_rate ();
1115 Film::audio_channel_layout () const
1117 return _playlist->audio_channel_layout ();
1121 Film::has_audio () const
1123 return _playlist->has_audio ();
1127 Film::video_frame_rate () const
1129 return _playlist->video_frame_rate ();
1133 Film::video_size () const
1135 return _playlist->video_size ();
1139 Film::video_length () const
1141 return _playlist->video_length ();