40 #ifndef LIBDCP_ASSET_READER_H
41 #define LIBDCP_ASSET_READER_H
47 #include <asdcp/AS_DCP.h>
55 class MonoPictureAsset;
57 class StereoPictureAsset;
60 template <
class R,
class F>
72 std::shared_ptr<const F> get_frame (
int n)
const
75 return std::shared_ptr<const F> (
new F(_reader, n, _crypto_context, _check_hmac));
82 void set_check_hmac (
bool check) {
88 std::shared_ptr<DecryptionContext> _crypto_context;
96 explicit AssetReader (
Asset const * asset, boost::optional<Key> key, Standard standard)
100 DCP_ASSERT (asset->
file());
101 auto const r = _reader->OpenRead (asset->
file()->string().c_str());
102 if (ASDCP_FAILURE(r)) {
104 boost::throw_exception (
FileError(
"could not open MXF file for reading", asset->
file().get(), r));
108 bool _check_hmac =
true;
Parent class for DCP assets, i.e. picture, sound, subtitles, closed captions, CPLs,...
boost::optional< boost::filesystem::path > file() const
An asset of Dolby ATMOS sound data.
An exception related to a file.
A 2D (monoscopic) picture asset.
Representation of a sound asset.
A 3D (stereoscopic) picture asset.
Namespace for everything in libdcp.