diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-11-06 00:01:32 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-11-06 00:01:32 +0000 |
| commit | bb911c462ab6e04d399bfc68c2d331b0d4e9ef97 (patch) | |
| tree | 50ba1824e809c367e8c9da4074c8bf7755c06f06 | |
| parent | d759f6003067e8376899b50e5692b2bbb4e870cc (diff) | |
| parent | a60428e8a618c648fccab0d9c115f1d2a3dea2d2 (diff) | |
Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 7 | ||||
| -rw-r--r-- | src/lib/ffmpeg_content.h | 6 | ||||
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 4 | ||||
| -rw-r--r-- | src/wx/controls.cc | 2 |
4 files changed, 16 insertions, 3 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 70b867172..c7a15619d 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -65,6 +65,7 @@ int const FFmpegContentProperty::FILTERS = 102; FFmpegContent::FFmpegContent (shared_ptr<const Film> film, boost::filesystem::path p) : Content (film, p) + , _encrypted (false) { } @@ -126,6 +127,7 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> film, cxml::ConstNodePtr no _colorspace = get_optional_enum<AVColorSpace>(node, "Colorspace"); _bits_per_pixel = node->optional_number_child<int> ("BitsPerPixel"); _decryption_key = node->optional_string_child ("DecryptionKey"); + _encrypted = node->optional_bool_child("Encrypted").get_value_or(false); } FFmpegContent::FFmpegContent (shared_ptr<const Film> film, vector<shared_ptr<Content> > c) @@ -187,6 +189,7 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> film, vector<shared_ptr<Con _color_trc = ref->_color_trc; _colorspace = ref->_colorspace; _bits_per_pixel = ref->_bits_per_pixel; + _encrypted = ref->_encrypted; } void @@ -249,6 +252,9 @@ FFmpegContent::as_xml (xmlpp::Node* node, bool with_paths) const if (_decryption_key) { node->add_child("DecryptionKey")->add_child_text (_decryption_key.get()); } + if (_encrypted) { + node->add_child("Encypted")->add_child_text ("1"); + } } void @@ -314,6 +320,7 @@ FFmpegContent::examine (shared_ptr<Job> job) _subtitle_stream = _subtitle_streams.front (); } + _encrypted = first_path.extension() == ".ecinema"; } if (examiner->has_video ()) { diff --git a/src/lib/ffmpeg_content.h b/src/lib/ffmpeg_content.h index 87a892e68..d2e164f1d 100644 --- a/src/lib/ffmpeg_content.h +++ b/src/lib/ffmpeg_content.h @@ -98,6 +98,11 @@ public: return _decryption_key; } + bool encrypted () const { + boost::mutex::scoped_lock lm (_mutex); + return _encrypted; + } + private: void add_properties (std::list<UserProperty> &) const; @@ -116,6 +121,7 @@ private: boost::optional<AVColorSpace> _colorspace; boost::optional<int> _bits_per_pixel; boost::optional<std::string> _decryption_key; + bool _encrypted; }; #endif diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 844d92bc8..4f8dc35e9 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -368,7 +368,7 @@ public: try { shared_ptr<DCPContent> dcp (new DCPContent(_film, dir)); _film->examine_and_add_content (dcp); - bool const ok = display_progress (_("DCP-o-matic Player"), _("Loading DCP")); + bool const ok = display_progress (_("DCP-o-matic Player"), _("Loading content")); if (!ok || !report_errors_from_last_job(this)) { return; } @@ -630,7 +630,7 @@ private: DCPOMATIC_ASSERT (dcp); dcp->add_ov (wx_to_std(c->GetPath())); JobManager::instance()->add(shared_ptr<Job>(new ExamineContentJob (_film, dcp))); - bool const ok = display_progress (_("DCP-o-matic Player"), _("Loading DCP")); + bool const ok = display_progress (_("DCP-o-matic Player"), _("Loading content")); if (!ok || !report_errors_from_last_job(this)) { return; } diff --git a/src/wx/controls.cc b/src/wx/controls.cc index 62f75fde3..8b2a17b09 100644 --- a/src/wx/controls.cc +++ b/src/wx/controls.cc @@ -667,7 +667,7 @@ Controls::update_content_directory () shared_ptr<Content> content; if (is_directory(*i) && (is_regular_file(*i / "ASSETMAP") || is_regular_file(*i / "ASSETMAP.xml"))) { content.reset (new DCPContent(_film, *i)); - } else if (i->path().extension() == ".mp4") { + } else if (i->path().extension() == ".mp4" || i->path().extension() == ".ecinema") { content = content_factory(_film, *i).front(); } |
