Rename player DCP directory to player content; ignore failures to load directories...
[dcpomatic.git] / src / lib / ffmpeg_content.cc
index 05b6ae8ea8a9105952c858d3ae3bc5a116be2030..70b86717266edeffe91f4da54b088f714ae7402e 100644 (file)
@@ -125,7 +125,7 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> film, cxml::ConstNodePtr no
        _color_trc = get_optional_enum<AVColorTransferCharacteristic>(node, "ColorTransferCharacteristic");
        _colorspace = get_optional_enum<AVColorSpace>(node, "Colorspace");
        _bits_per_pixel = node->optional_number_child<int> ("BitsPerPixel");
-
+       _decryption_key = node->optional_string_child ("DecryptionKey");
 }
 
 FFmpegContent::FFmpegContent (shared_ptr<const Film> film, vector<shared_ptr<Content> > c)
@@ -246,13 +246,16 @@ FFmpegContent::as_xml (xmlpp::Node* node, bool with_paths) const
        if (_bits_per_pixel) {
                node->add_child("BitsPerPixel")->add_child_text (raw_convert<string> (*_bits_per_pixel));
        }
+       if (_decryption_key) {
+               node->add_child("DecryptionKey")->add_child_text (_decryption_key.get());
+       }
 }
 
 void
 FFmpegContent::examine (shared_ptr<Job> job)
 {
-       ContentChange cc1 (this, FFmpegContentProperty::SUBTITLE_STREAMS);
-       ContentChange cc2 (this, FFmpegContentProperty::SUBTITLE_STREAM);
+       ChangeSignaller<Content> cc1 (this, FFmpegContentProperty::SUBTITLE_STREAMS);
+       ChangeSignaller<Content> cc2 (this, FFmpegContentProperty::SUBTITLE_STREAM);
 
        job->set_progress_unknown ();
 
@@ -369,7 +372,7 @@ FFmpegContent::technical_summary () const
 void
 FFmpegContent::set_subtitle_stream (shared_ptr<FFmpegSubtitleStream> s)
 {
-       ContentChange cc (this, FFmpegContentProperty::SUBTITLE_STREAM);
+       ChangeSignaller<Content> cc (this, FFmpegContentProperty::SUBTITLE_STREAM);
 
        {
                boost::mutex::scoped_lock lm (_mutex);
@@ -410,7 +413,7 @@ FFmpegContent::full_length () const
 void
 FFmpegContent::set_filters (vector<Filter const *> const & filters)
 {
-       ContentChange cc (this, FFmpegContentProperty::FILTERS);
+       ChangeSignaller<Content> cc (this, FFmpegContentProperty::FILTERS);
 
        {
                boost::mutex::scoped_lock lm (_mutex);
@@ -630,7 +633,7 @@ void
 FFmpegContent::signal_subtitle_stream_changed ()
 {
        /* XXX: this is too late; really it should be before the change */
-       ContentChange cc (this, FFmpegContentProperty::SUBTITLE_STREAM);
+       ChangeSignaller<Content> cc (this, FFmpegContentProperty::SUBTITLE_STREAM);
 }
 
 vector<shared_ptr<FFmpegAudioStream> >