40 #ifndef LIBDCP_ASSET_READER_H
41 #define LIBDCP_ASSET_READER_H
47 #include "filesystem.h"
48 #include <asdcp/AS_DCP.h>
56 class MonoJ2KPictureAsset;
58 class StereoJ2KPictureAsset;
61 template <
class R,
class F>
73 std::shared_ptr<const F> get_frame (
int n)
const
76 return std::shared_ptr<const F> (
new F(_reader, n, _crypto_context, _check_hmac));
83 void set_check_hmac (
bool check) {
89 std::shared_ptr<DecryptionContext> _crypto_context;
98 AssetReader(
Asset const * asset, boost::optional<Key> key, Standard standard)
101 Kumu::FileReaderFactory factory;
102 _reader =
new R(factory);
103 DCP_ASSERT (asset->
file());
104 auto const r = _reader->OpenRead(dcp::filesystem::fix_long_path(*asset->
file()).string().c_str());
105 if (ASDCP_FAILURE(r)) {
107 boost::throw_exception (
FileError(
"could not open MXF file for reading", asset->
file().get(), r));
111 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.