Add SubtitleContent.
[dcpomatic.git] / src / lib / film.cc
1 /*
2     Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
3
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.
8
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.
13
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.
17
18 */
19
20 #include <stdexcept>
21 #include <iostream>
22 #include <algorithm>
23 #include <fstream>
24 #include <cstdlib>
25 #include <sstream>
26 #include <iomanip>
27 #include <unistd.h>
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>
34 #include "film.h"
35 #include "job.h"
36 #include "filter.h"
37 #include "util.h"
38 #include "job_manager.h"
39 #include "transcode_job.h"
40 #include "scp_dcp_job.h"
41 #include "log.h"
42 #include "exceptions.h"
43 #include "examine_content_job.h"
44 #include "scaler.h"
45 #include "config.h"
46 #include "version.h"
47 #include "ui_signaller.h"
48 #include "playlist.h"
49 #include "player.h"
50 #include "ffmpeg_content.h"
51 #include "imagemagick_content.h"
52 #include "sndfile_content.h"
53 #include "dcp_content_type.h"
54 #include "ratio.h"
55 #include "cross.h"
56
57 #include "i18n.h"
58
59 using std::string;
60 using std::stringstream;
61 using std::multimap;
62 using std::pair;
63 using std::map;
64 using std::vector;
65 using std::ifstream;
66 using std::ofstream;
67 using std::setfill;
68 using std::min;
69 using std::make_pair;
70 using std::endl;
71 using std::cout;
72 using std::list;
73 using boost::shared_ptr;
74 using boost::weak_ptr;
75 using boost::lexical_cast;
76 using boost::dynamic_pointer_cast;
77 using boost::to_upper_copy;
78 using boost::ends_with;
79 using boost::starts_with;
80 using boost::optional;
81 using libdcp::Size;
82
83 int const Film::state_version = 4;
84
85 /** Construct a Film object in a given directory.
86  *
87  *  @param d Film directory.
88  */
89
90 Film::Film (string d)
91         : _playlist (new Playlist)
92         , _use_dci_name (true)
93         , _dcp_content_type (Config::instance()->default_dcp_content_type ())
94         , _container (Config::instance()->default_container ())
95         , _scaler (Scaler::from_id ("bicubic"))
96         , _with_subtitles (false)
97         , _colour_lut (0)
98         , _j2k_bandwidth (200000000)
99         , _dci_metadata (Config::instance()->default_dci_metadata ())
100         , _dcp_video_frame_rate (24)
101         , _dcp_audio_channels (MAX_AUDIO_CHANNELS)
102         , _dirty (false)
103 {
104         set_dci_date_today ();
105
106         _playlist->Changed.connect (bind (&Film::playlist_changed, this));
107         _playlist->ContentChanged.connect (bind (&Film::playlist_content_changed, this, _1, _2));
108         
109         /* Make state.directory a complete path without ..s (where possible)
110            (Code swiped from Adam Bowen on stackoverflow)
111         */
112         
113         boost::filesystem::path p (boost::filesystem::system_complete (d));
114         boost::filesystem::path result;
115         for (boost::filesystem::path::iterator i = p.begin(); i != p.end(); ++i) {
116                 if (*i == "..") {
117                         if (boost::filesystem::is_symlink (result) || result.filename() == "..") {
118                                 result /= *i;
119                         } else {
120                                 result = result.parent_path ();
121                         }
122                 } else if (*i != ".") {
123                         result /= *i;
124                 }
125         }
126
127         set_directory (result.string ());
128         _log.reset (new FileLog ("log"));
129 }
130
131 Film::Film (Film const & o)
132         : boost::enable_shared_from_this<Film> (o)
133         /* note: the copied film shares the original's log */
134         , _log               (o._log)
135         , _playlist          (new Playlist (o._playlist))
136         , _directory         (o._directory)
137         , _name              (o._name)
138         , _use_dci_name      (o._use_dci_name)
139         , _dcp_content_type  (o._dcp_content_type)
140         , _container         (o._container)
141         , _scaler            (o._scaler)
142         , _with_subtitles    (o._with_subtitles)
143         , _colour_lut        (o._colour_lut)
144         , _j2k_bandwidth     (o._j2k_bandwidth)
145         , _dci_metadata      (o._dci_metadata)
146         , _dcp_video_frame_rate (o._dcp_video_frame_rate)
147         , _dci_date          (o._dci_date)
148         , _dirty             (o._dirty)
149 {
150         _playlist->ContentChanged.connect (bind (&Film::playlist_content_changed, this, _1, _2));
151 }
152
153 string
154 Film::video_state_identifier () const
155 {
156         assert (container ());
157         LocaleGuard lg;
158
159         stringstream s;
160         s << container()->id()
161           << "_" << _playlist->video_digest()
162           << "_" << _dcp_video_frame_rate
163           << "_" << scaler()->id()
164           << "_" << j2k_bandwidth()
165           << "_" << lexical_cast<int> (colour_lut());
166
167         return s.str ();
168 }
169           
170 /** @return The path to the directory to write video frame info files to */
171 string
172 Film::info_dir () const
173 {
174         boost::filesystem::path p;
175         p /= "info";
176         p /= video_state_identifier ();
177         return dir (p.string());
178 }
179
180 string
181 Film::internal_video_mxf_dir () const
182 {
183         return dir ("video");
184 }
185
186 string
187 Film::internal_video_mxf_filename () const
188 {
189         return video_state_identifier() + ".mxf";
190 }
191
192 string
193 Film::dcp_video_mxf_filename () const
194 {
195         return filename_safe_name() + "_video.mxf";
196 }
197
198 string
199 Film::dcp_audio_mxf_filename () const
200 {
201         return filename_safe_name() + "_audio.mxf";
202 }
203
204 string
205 Film::filename_safe_name () const
206 {
207         string const n = name ();
208         string o;
209         for (size_t i = 0; i < n.length(); ++i) {
210                 if (isalnum (n[i])) {
211                         o += n[i];
212                 } else {
213                         o += "_";
214                 }
215         }
216
217         return o;
218 }
219
220 boost::filesystem::path
221 Film::audio_analysis_path (shared_ptr<const AudioContent> c) const
222 {
223         boost::filesystem::path p = dir ("analysis");
224         p /= c->digest();
225         return p;
226 }
227
228 /** Add suitable Jobs to the JobManager to create a DCP for this Film */
229 void
230 Film::make_dcp ()
231 {
232         set_dci_date_today ();
233         
234         if (dcp_name().find ("/") != string::npos) {
235                 throw BadSettingError (_("name"), _("cannot contain slashes"));
236         }
237         
238         log()->log (String::compose ("DCP-o-matic %1 git %2 using %3", dcpomatic_version, dcpomatic_git_commit, dependency_version_summary()));
239
240         {
241                 char buffer[128];
242                 gethostname (buffer, sizeof (buffer));
243                 log()->log (String::compose ("Starting to make DCP on %1", buffer));
244         }
245         
246 //      log()->log (String::compose ("Content is %1; type %2", content_path(), (content_type() == STILL ? _("still") : _("video"))));
247 //      if (length()) {
248 //              log()->log (String::compose ("Content length %1", length().get()));
249 //      }
250 //      log()->log (String::compose ("Content digest %1", content_digest()));
251 //      log()->log (String::compose ("Content at %1 fps, DCP at %2 fps", source_frame_rate(), dcp_frame_rate()));
252         log()->log (String::compose ("%1 threads", Config::instance()->num_local_encoding_threads()));
253         log()->log (String::compose ("J2K bandwidth %1", j2k_bandwidth()));
254 #ifdef DCPOMATIC_DEBUG
255         log()->log ("DCP-o-matic built in debug mode.");
256 #else
257         log()->log ("DCP-o-matic built in optimised mode.");
258 #endif
259 #ifdef LIBDCP_DEBUG
260         log()->log ("libdcp built in debug mode.");
261 #else
262         log()->log ("libdcp built in optimised mode.");
263 #endif
264         pair<string, int> const c = cpu_info ();
265         log()->log (String::compose ("CPU: %1, %2 processors", c.first, c.second));
266         list<pair<string, string> > const m = mount_info ();
267         for (list<pair<string, string> >::const_iterator i = m.begin(); i != m.end(); ++i) {
268                 log()->log (String::compose ("Mount: %1 %2", i->first, i->second));
269         }
270         
271         if (container() == 0) {
272                 throw MissingSettingError (_("container"));
273         }
274
275         if (_playlist->content().empty ()) {
276                 throw StringError (_("You must add some content to the DCP before creating it"));
277         }
278
279         if (dcp_content_type() == 0) {
280                 throw MissingSettingError (_("content type"));
281         }
282
283         if (name().empty()) {
284                 throw MissingSettingError (_("name"));
285         }
286
287         JobManager::instance()->add (shared_ptr<Job> (new TranscodeJob (shared_from_this())));
288 }
289
290 /** Start a job to send our DCP to the configured TMS */
291 void
292 Film::send_dcp_to_tms ()
293 {
294         shared_ptr<Job> j (new SCPDCPJob (shared_from_this()));
295         JobManager::instance()->add (j);
296 }
297
298 /** Count the number of frames that have been encoded for this film.
299  *  @return frame count.
300  */
301 int
302 Film::encoded_frames () const
303 {
304         if (container() == 0) {
305                 return 0;
306         }
307
308         int N = 0;
309         for (boost::filesystem::directory_iterator i = boost::filesystem::directory_iterator (info_dir ()); i != boost::filesystem::directory_iterator(); ++i) {
310                 ++N;
311                 boost::this_thread::interruption_point ();
312         }
313
314         return N;
315 }
316
317 /** Write state to our `metadata' file */
318 void
319 Film::write_metadata () const
320 {
321         if (!boost::filesystem::exists (directory())) {
322                 boost::filesystem::create_directory (directory());
323         }
324         
325         boost::mutex::scoped_lock lm (_state_mutex);
326         LocaleGuard lg;
327
328         boost::filesystem::create_directories (directory());
329
330         xmlpp::Document doc;
331         xmlpp::Element* root = doc.create_root_node ("Metadata");
332
333         root->add_child("Version")->add_child_text (lexical_cast<string> (state_version));
334         root->add_child("Name")->add_child_text (_name);
335         root->add_child("UseDCIName")->add_child_text (_use_dci_name ? "1" : "0");
336
337         if (_dcp_content_type) {
338                 root->add_child("DCPContentType")->add_child_text (_dcp_content_type->dci_name ());
339         }
340
341         if (_container) {
342                 root->add_child("Container")->add_child_text (_container->id ());
343         }
344
345         root->add_child("Scaler")->add_child_text (_scaler->id ());
346         root->add_child("WithSubtitles")->add_child_text (_with_subtitles ? "1" : "0");
347         root->add_child("ColourLUT")->add_child_text (lexical_cast<string> (_colour_lut));
348         root->add_child("J2KBandwidth")->add_child_text (lexical_cast<string> (_j2k_bandwidth));
349         _dci_metadata.as_xml (root->add_child ("DCIMetadata"));
350         root->add_child("DCPVideoFrameRate")->add_child_text (lexical_cast<string> (_dcp_video_frame_rate));
351         root->add_child("DCIDate")->add_child_text (boost::gregorian::to_iso_string (_dci_date));
352         root->add_child("DCPAudioChannels")->add_child_text (lexical_cast<string> (_dcp_audio_channels));
353         _playlist->as_xml (root->add_child ("Playlist"));
354
355         doc.write_to_file_formatted (file ("metadata.xml"));
356         
357         _dirty = false;
358 }
359
360 /** Read state from our metadata file */
361 void
362 Film::read_metadata ()
363 {
364         boost::mutex::scoped_lock lm (_state_mutex);
365         LocaleGuard lg;
366
367         if (boost::filesystem::exists (file ("metadata")) && !boost::filesystem::exists (file ("metadata.xml"))) {
368                 throw StringError (_("This film was created with an older version of DCP-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!"));
369         }
370
371         cxml::File f (file ("metadata.xml"), "Metadata");
372         
373         _name = f.string_child ("Name");
374         _use_dci_name = f.bool_child ("UseDCIName");
375
376         {
377                 optional<string> c = f.optional_string_child ("DCPContentType");
378                 if (c) {
379                         _dcp_content_type = DCPContentType::from_dci_name (c.get ());
380                 }
381         }
382
383         {
384                 optional<string> c = f.optional_string_child ("Container");
385                 if (c) {
386                         _container = Ratio::from_id (c.get ());
387                 }
388         }
389
390         _scaler = Scaler::from_id (f.string_child ("Scaler"));
391         _with_subtitles = f.bool_child ("WithSubtitles");
392         _colour_lut = f.number_child<int> ("ColourLUT");
393         _j2k_bandwidth = f.number_child<int> ("J2KBandwidth");
394         _dci_metadata = DCIMetadata (f.node_child ("DCIMetadata"));
395         _dcp_video_frame_rate = f.number_child<int> ("DCPVideoFrameRate");
396         _dci_date = boost::gregorian::from_undelimited_string (f.string_child ("DCIDate"));
397         _dcp_audio_channels = f.number_child<int> ("DCPAudioChannels");
398
399         _playlist->set_from_xml (shared_from_this(), f.node_child ("Playlist"));
400
401         _dirty = false;
402 }
403
404 /** Given a directory name, return its full path within the Film's directory.
405  *  The directory (and its parents) will be created if they do not exist.
406  */
407 string
408 Film::dir (string d) const
409 {
410         boost::mutex::scoped_lock lm (_directory_mutex);
411         
412         boost::filesystem::path p;
413         p /= _directory;
414         p /= d;
415         
416         boost::filesystem::create_directories (p);
417         
418         return p.string ();
419 }
420
421 /** Given a file or directory name, return its full path within the Film's directory.
422  *  _directory_mutex must not be locked on entry.
423  *  Any required parent directories will be created.
424  */
425 string
426 Film::file (string f) const
427 {
428         boost::mutex::scoped_lock lm (_directory_mutex);
429
430         boost::filesystem::path p;
431         p /= _directory;
432         p /= f;
433
434         boost::filesystem::create_directories (p.parent_path ());
435         
436         return p.string ();
437 }
438
439 /** @return a DCI-compliant name for a DCP of this film */
440 string
441 Film::dci_name (bool if_created_now) const
442 {
443         stringstream d;
444
445         string fixed_name = to_upper_copy (name());
446         for (size_t i = 0; i < fixed_name.length(); ++i) {
447                 if (fixed_name[i] == ' ') {
448                         fixed_name[i] = '-';
449                 }
450         }
451
452         /* Spec is that the name part should be maximum 14 characters, as I understand it */
453         if (fixed_name.length() > 14) {
454                 fixed_name = fixed_name.substr (0, 14);
455         }
456
457         d << fixed_name;
458
459         if (dcp_content_type()) {
460                 d << "_" << dcp_content_type()->dci_name();
461         }
462
463         if (container()) {
464                 d << "_" << container()->dci_name();
465         }
466
467         DCIMetadata const dm = dci_metadata ();
468
469         if (!dm.audio_language.empty ()) {
470                 d << "_" << dm.audio_language;
471                 if (!dm.subtitle_language.empty()) {
472                         d << "-" << dm.subtitle_language;
473                 } else {
474                         d << "-XX";
475                 }
476         }
477
478         if (!dm.territory.empty ()) {
479                 d << "_" << dm.territory;
480                 if (!dm.rating.empty ()) {
481                         d << "-" << dm.rating;
482                 }
483         }
484
485         d << "_51_2K";
486
487         if (!dm.studio.empty ()) {
488                 d << "_" << dm.studio;
489         }
490
491         if (if_created_now) {
492                 d << "_" << boost::gregorian::to_iso_string (boost::gregorian::day_clock::local_day ());
493         } else {
494                 d << "_" << boost::gregorian::to_iso_string (_dci_date);
495         }
496
497         if (!dm.facility.empty ()) {
498                 d << "_" << dm.facility;
499         }
500
501         if (!dm.package_type.empty ()) {
502                 d << "_" << dm.package_type;
503         }
504
505         return d.str ();
506 }
507
508 /** @return name to give the DCP */
509 string
510 Film::dcp_name (bool if_created_now) const
511 {
512         if (use_dci_name()) {
513                 return dci_name (if_created_now);
514         }
515
516         return name();
517 }
518
519
520 void
521 Film::set_directory (string d)
522 {
523         boost::mutex::scoped_lock lm (_state_mutex);
524         _directory = d;
525         _dirty = true;
526 }
527
528 void
529 Film::set_name (string n)
530 {
531         {
532                 boost::mutex::scoped_lock lm (_state_mutex);
533                 _name = n;
534         }
535         signal_changed (NAME);
536 }
537
538 void
539 Film::set_use_dci_name (bool u)
540 {
541         {
542                 boost::mutex::scoped_lock lm (_state_mutex);
543                 _use_dci_name = u;
544         }
545         signal_changed (USE_DCI_NAME);
546 }
547
548 void
549 Film::set_dcp_content_type (DCPContentType const * t)
550 {
551         {
552                 boost::mutex::scoped_lock lm (_state_mutex);
553                 _dcp_content_type = t;
554         }
555         signal_changed (DCP_CONTENT_TYPE);
556 }
557
558 void
559 Film::set_container (Ratio const * c)
560 {
561         {
562                 boost::mutex::scoped_lock lm (_state_mutex);
563                 _container = c;
564         }
565         signal_changed (CONTAINER);
566 }
567
568 void
569 Film::set_scaler (Scaler const * s)
570 {
571         {
572                 boost::mutex::scoped_lock lm (_state_mutex);
573                 _scaler = s;
574         }
575         signal_changed (SCALER);
576 }
577
578 void
579 Film::set_with_subtitles (bool w)
580 {
581         {
582                 boost::mutex::scoped_lock lm (_state_mutex);
583                 _with_subtitles = w;
584         }
585         signal_changed (WITH_SUBTITLES);
586 }
587
588 void
589 Film::set_colour_lut (int i)
590 {
591         {
592                 boost::mutex::scoped_lock lm (_state_mutex);
593                 _colour_lut = i;
594         }
595         signal_changed (COLOUR_LUT);
596 }
597
598 void
599 Film::set_j2k_bandwidth (int b)
600 {
601         {
602                 boost::mutex::scoped_lock lm (_state_mutex);
603                 _j2k_bandwidth = b;
604         }
605         signal_changed (J2K_BANDWIDTH);
606 }
607
608 void
609 Film::set_dci_metadata (DCIMetadata m)
610 {
611         {
612                 boost::mutex::scoped_lock lm (_state_mutex);
613                 _dci_metadata = m;
614         }
615         signal_changed (DCI_METADATA);
616 }
617
618 void
619 Film::set_dcp_video_frame_rate (int f)
620 {
621         {
622                 boost::mutex::scoped_lock lm (_state_mutex);
623                 _dcp_video_frame_rate = f;
624         }
625         signal_changed (DCP_VIDEO_FRAME_RATE);
626 }
627
628 void
629 Film::signal_changed (Property p)
630 {
631         {
632                 boost::mutex::scoped_lock lm (_state_mutex);
633                 _dirty = true;
634         }
635
636         switch (p) {
637         case Film::CONTENT:
638                 set_dcp_video_frame_rate (_playlist->best_dcp_frame_rate ());
639                 break;
640         default:
641                 break;
642         }
643
644         if (ui_signaller) {
645                 ui_signaller->emit (boost::bind (boost::ref (Changed), p));
646         }
647 }
648
649 void
650 Film::set_dci_date_today ()
651 {
652         _dci_date = boost::gregorian::day_clock::local_day ();
653 }
654
655 string
656 Film::info_path (int f) const
657 {
658         boost::filesystem::path p;
659         p /= info_dir ();
660
661         stringstream s;
662         s.width (8);
663         s << setfill('0') << f << ".md5";
664
665         p /= s.str();
666
667         /* info_dir() will already have added any initial bit of the path,
668            so don't call file() on this.
669         */
670         return p.string ();
671 }
672
673 string
674 Film::j2c_path (int f, bool t) const
675 {
676         boost::filesystem::path p;
677         p /= "j2c";
678         p /= video_state_identifier ();
679
680         stringstream s;
681         s.width (8);
682         s << setfill('0') << f << ".j2c";
683
684         if (t) {
685                 s << ".tmp";
686         }
687
688         p /= s.str();
689         return file (p.string ());
690 }
691
692 /** Make an educated guess as to whether we have a complete DCP
693  *  or not.
694  *  @return true if we do.
695  */
696
697 bool
698 Film::have_dcp () const
699 {
700         try {
701                 libdcp::DCP dcp (dir (dcp_name()));
702                 dcp.read ();
703         } catch (...) {
704                 return false;
705         }
706
707         return true;
708 }
709
710 shared_ptr<Player>
711 Film::player () const
712 {
713         return shared_ptr<Player> (new Player (shared_from_this (), _playlist));
714 }
715
716 shared_ptr<Playlist>
717 Film::playlist () const
718 {
719         boost::mutex::scoped_lock lm (_state_mutex);
720         return _playlist;
721 }
722
723 Playlist::ContentList
724 Film::content () const
725 {
726         return _playlist->content ();
727 }
728
729 void
730 Film::examine_and_add_content (shared_ptr<Content> c)
731 {
732         shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c));
733         j->Finished.connect (bind (&Film::add_content_weak, this, boost::weak_ptr<Content> (c)));
734         JobManager::instance()->add (j);
735 }
736
737 void
738 Film::add_content_weak (weak_ptr<Content> c)
739 {
740         shared_ptr<Content> content = c.lock ();
741         if (content) {
742                 add_content (content);
743         }
744 }
745
746 void
747 Film::add_content (shared_ptr<Content> c)
748 {
749         /* Add video content after any existing content */
750         if (dynamic_pointer_cast<VideoContent> (c)) {
751                 c->set_start (_playlist->video_end ());
752         }
753
754         _playlist->add (c);
755 }
756
757 void
758 Film::remove_content (shared_ptr<Content> c)
759 {
760         _playlist->remove (c);
761 }
762
763 Time
764 Film::length () const
765 {
766         return _playlist->length ();
767 }
768
769 bool
770 Film::has_subtitles () const
771 {
772         return _playlist->has_subtitles ();
773 }
774
775 OutputVideoFrame
776 Film::best_dcp_video_frame_rate () const
777 {
778         return _playlist->best_dcp_frame_rate ();
779 }
780
781 void
782 Film::playlist_content_changed (boost::weak_ptr<Content> c, int p)
783 {
784         if (p == VideoContentProperty::VIDEO_FRAME_RATE) {
785                 set_dcp_video_frame_rate (_playlist->best_dcp_frame_rate ());
786         } 
787
788         if (ui_signaller) {
789                 ui_signaller->emit (boost::bind (boost::ref (ContentChanged), c, p));
790         }
791 }
792
793 void
794 Film::playlist_changed ()
795 {
796         signal_changed (CONTENT);
797 }       
798
799 int
800 Film::loop () const
801 {
802         return _playlist->loop ();
803 }
804
805 void
806 Film::set_loop (int c)
807 {
808         _playlist->set_loop (c);
809 }
810
811 OutputAudioFrame
812 Film::time_to_audio_frames (Time t) const
813 {
814         return t * dcp_audio_frame_rate () / TIME_HZ;
815 }
816
817 OutputVideoFrame
818 Film::time_to_video_frames (Time t) const
819 {
820         return t * dcp_video_frame_rate () / TIME_HZ;
821 }
822
823 Time
824 Film::audio_frames_to_time (OutputAudioFrame f) const
825 {
826         return f * TIME_HZ / dcp_audio_frame_rate ();
827 }
828
829 Time
830 Film::video_frames_to_time (OutputVideoFrame f) const
831 {
832         return f * TIME_HZ / dcp_video_frame_rate ();
833 }
834
835 OutputAudioFrame
836 Film::dcp_audio_frame_rate () const
837 {
838         /* XXX */
839         return 48000;
840 }
841
842 void
843 Film::set_sequence_video (bool s)
844 {
845         _playlist->set_sequence_video (s);
846 }
847
848 libdcp::Size
849 Film::full_frame () const
850 {
851         return libdcp::Size (2048, 1080);
852 }