diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-07-01 16:41:13 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-07-01 16:41:13 +0100 |
| commit | 7632d0d3da495443b80334363399172e54ebfd7c (patch) | |
| tree | 2cf501fbe9eb0b6b6465af50a5c55167fbb7f037 /src/lib | |
| parent | d88958ff52b8865d95d33b38cd53694dc8519c5a (diff) | |
Add burn subtitles option to Film.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/film.cc | 17 | ||||
| -rw-r--r-- | src/lib/film.h | 10 |
2 files changed, 25 insertions, 2 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index 1456314be..4f4dc3187 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -121,6 +121,7 @@ Film::Film (boost::filesystem::path dir, bool log) , _three_d (false) , _sequence_video (true) , _interop (false) + , _burn_subtitles (false) , _state_version (current_state_version) , _dirty (false) { @@ -184,6 +185,10 @@ Film::video_identifier () const s << "_S"; } + if (_burn_subtitles) { + s << "_B"; + } + if (_three_d) { s << "_3D"; } @@ -375,6 +380,7 @@ Film::metadata () const root->add_child("ThreeD")->add_child_text (_three_d ? "1" : "0"); root->add_child("SequenceVideo")->add_child_text (_sequence_video ? "1" : "0"); root->add_child("Interop")->add_child_text (_interop ? "1" : "0"); + root->add_child("BurnSubtitles")->add_child_text (_burn_subtitles ? "1" : "0"); root->add_child("Signed")->add_child_text (_signed ? "1" : "0"); root->add_child("Encrypted")->add_child_text (_encrypted ? "1" : "0"); root->add_child("Key")->add_child_text (_key.hex ()); @@ -446,6 +452,9 @@ Film::read_metadata () _sequence_video = f.bool_child ("SequenceVideo"); _three_d = f.bool_child ("ThreeD"); _interop = f.bool_child ("Interop"); + if (_state_version >= 32) { + _burn_subtitles = f.bool_child ("BurnSubtitles"); + } _key = dcp::Key (f.string_child ("Key")); list<string> notes; @@ -681,7 +690,6 @@ Film::dcp_name (bool if_created_now) const return name(); } - void Film::set_directory (boost::filesystem::path d) { @@ -774,6 +782,13 @@ Film::set_interop (bool i) } void +Film::set_burn_subtitles (bool b) +{ + _burn_subtitles = b; + signal_changed (BURN_SUBTITLES); +} + +void Film::signal_changed (Property p) { _dirty = true; diff --git a/src/lib/film.h b/src/lib/film.h index 178fd9002..83505cc6d 100644 --- a/src/lib/film.h +++ b/src/lib/film.h @@ -162,10 +162,12 @@ public: ISDCF_METADATA, VIDEO_FRAME_RATE, AUDIO_CHANNELS, - /** The setting of _three_d has been changed */ + /** The setting of _three_d has changed */ THREE_D, SEQUENCE_VIDEO, INTEROP, + /** The setting of _burn_subtitles has changed */ + BURN_SUBTITLES, }; @@ -236,6 +238,10 @@ public: bool interop () const { return _interop; } + + bool burn_subtitles () const { + return _burn_subtitles; + } /* SET */ @@ -262,6 +268,7 @@ public: void set_isdcf_date_today (); void set_sequence_video (bool); void set_interop (bool); + void set_burn_subtitles (bool); /** Emitted when some property has of the Film has changed */ mutable boost::signals2::signal<void (Property)> Changed; @@ -322,6 +329,7 @@ private: bool _three_d; bool _sequence_video; bool _interop; + bool _burn_subtitles; dcp::Key _key; int _state_version; |
