FFmpegContent::FFmpegContent (shared_ptr<const Film> film, boost::filesystem::path p)
: Content (film, p)
+ , _encrypted (false)
{
}
_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)
_color_trc = ref->_color_trc;
_colorspace = ref->_colorspace;
_bits_per_pixel = ref->_bits_per_pixel;
+ _encrypted = ref->_encrypted;
}
void
if (_decryption_key) {
node->add_child("DecryptionKey")->add_child_text (_decryption_key.get());
}
+ if (_encrypted) {
+ node->add_child("Encypted")->add_child_text ("1");
+ }
}
void
_subtitle_stream = _subtitle_streams.front ();
}
+ _encrypted = first_path.extension() == ".ecinema";
}
if (examiner->has_video ()) {
return _decryption_key;
}
+ bool encrypted () const {
+ boost::mutex::scoped_lock lm (_mutex);
+ return _encrypted;
+ }
+
private:
void add_properties (std::list<UserProperty> &) const;
boost::optional<AVColorSpace> _colorspace;
boost::optional<int> _bits_per_pixel;
boost::optional<std::string> _decryption_key;
+ bool _encrypted;
};
#endif
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();
}