+ SafeStringStream s;
+ s << VideoContent::identifier() << "_" << SubtitleContent::identifier () << " "
+ << (_reference_video ? "1" : "0")
+ << (_reference_subtitle ? "1" : "0");
+ return s.str ();
+}
+
+void
+DCPContent::add_kdm (dcp::EncryptedKDM k)
+{
+ _kdm = k;
+}
+
+bool
+DCPContent::can_be_played () const
+{
+ boost::mutex::scoped_lock lm (_mutex);
+ return !_encrypted || _kdm_valid;
+}
+
+boost::filesystem::path
+DCPContent::directory () const
+{
+ optional<size_t> smallest;
+ boost::filesystem::path dir;
+ for (size_t i = 0; i < number_of_paths(); ++i) {
+ boost::filesystem::path const p = path (i).parent_path ();
+ size_t const d = distance (p.begin(), p.end());
+ if (!smallest || d < smallest.get ()) {
+ dir = p;
+ }
+ }
+
+ return dir;
+}
+
+void
+DCPContent::add_properties (list<pair<string, string> >& p) const
+{
+ SingleStreamAudioContent::add_properties (p);
+}
+
+void
+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);
+}
+
+list<DCPTime>
+DCPContent::reel_split_points () const
+{
+ list<DCPTime> s;
+ DCPDecoder decoder (shared_from_this(), false);
+ DCPTime t = position();
+
+ shared_ptr<const Film> film = _film.lock ();
+ DCPOMATIC_ASSERT (film);
+ BOOST_FOREACH (shared_ptr<dcp::Reel> k, decoder.reels()) {
+ s.push_back (t);
+ t += DCPTime::from_frames (k->main_picture()->duration(), film->video_frame_rate());
+ }
+
+ return s;