diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-09-16 10:31:18 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-09-16 10:31:18 +0100 |
| commit | 4e6f15f602c605804f95c6b06af9bf79eaf2dde1 (patch) | |
| tree | 00fb9eb482b3a770b99cb57a4f2e8968416124ec /src/lib | |
| parent | dd59755d86cdb1892bb0ba4d69af520cee4aa964 (diff) | |
Front-end to set up referencing of DCPs.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/analyse_audio_job.cc | 1 | ||||
| -rw-r--r-- | src/lib/dcp_content.cc | 38 | ||||
| -rw-r--r-- | src/lib/dcp_content.h | 9 |
3 files changed, 47 insertions, 1 deletions
diff --git a/src/lib/analyse_audio_job.cc b/src/lib/analyse_audio_job.cc index f0fd351b4..525ac6c91 100644 --- a/src/lib/analyse_audio_job.cc +++ b/src/lib/analyse_audio_job.cc @@ -74,6 +74,7 @@ AnalyseAudioJob::run () shared_ptr<Player> player (new Player (_film, _playlist)); player->set_ignore_video (); player->set_fast (); + player->set_play_referenced (); DCPTime const start = _playlist->start().get_value_or (DCPTime ()); DCPTime const length = _playlist->length (); diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index 15bcd0b56..cb9dcf53d 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -39,7 +39,10 @@ using std::list; using boost::shared_ptr; using boost::optional; -int const DCPContentProperty::CAN_BE_PLAYED = 600; +int const DCPContentProperty::CAN_BE_PLAYED = 600; +int const DCPContentProperty::REFERENCE_VIDEO = 601; +int const DCPContentProperty::REFERENCE_AUDIO = 602; +int const DCPContentProperty::REFERENCE_SUBTITLE = 603; DCPContent::DCPContent (shared_ptr<const Film> film, boost::filesystem::path p) : Content (film) @@ -209,3 +212,36 @@ DCPContent::set_default_colour_conversion () /* Default to no colour conversion for DCPs */ unset_colour_conversion (); } + +void +DCPContent::set_reference_video (bool r) +{ + { + boost::mutex::scoped_lock lm (_mutex); + _reference_video = r; + } + + signal_changed (DCPContentProperty::REFERENCE_VIDEO); +} + +void +DCPContent::set_reference_audio (bool r) +{ + { + boost::mutex::scoped_lock lm (_mutex); + _reference_audio = r; + } + + signal_changed (DCPContentProperty::REFERENCE_AUDIO); +} + +void +DCPContent::set_reference_subtitle (bool r) +{ + { + boost::mutex::scoped_lock lm (_mutex); + _reference_subtitle = r; + } + + signal_changed (DCPContentProperty::REFERENCE_SUBTITLE); +} diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h index 5a0559df2..8f01bbc4e 100644 --- a/src/lib/dcp_content.h +++ b/src/lib/dcp_content.h @@ -34,6 +34,9 @@ class DCPContentProperty { public: static int const CAN_BE_PLAYED; + static int const REFERENCE_VIDEO; + static int const REFERENCE_AUDIO; + static int const REFERENCE_SUBTITLE; }; /** @class DCPContent @@ -85,16 +88,22 @@ public: bool can_be_played () const; + void set_reference_video (bool r); + bool reference_video () const { boost::mutex::scoped_lock lm (_mutex); return _reference_video; } + void set_reference_audio (bool r); + bool reference_audio () const { boost::mutex::scoped_lock lm (_mutex); return _reference_audio; } + void set_reference_subtitle (bool r); + bool reference_subtitle () const { boost::mutex::scoped_lock lm (_mutex); return _reference_subtitle; |
