40 #ifndef LIBDCP_FRAME_H
41 #define LIBDCP_FRAME_H
46 #include <asdcp/KM_fileio.h>
47 #include <asdcp/AS_DCP.h>
53 template <
class R,
class B>
57 Frame (R* reader,
int n, std::shared_ptr<const DecryptionContext> c,
bool check_hmac)
60 _buffer = std::make_shared<B>(Kumu::Megabyte);
62 if (ASDCP_FAILURE(reader->ReadFrame(n, *_buffer, c->context(), check_hmac ? c->hmac() :
nullptr))) {
63 boost::throw_exception (
ReadError (
"could not read frame"));
70 uint8_t
const * data ()
const
72 return _buffer->RoData ();
77 return _buffer->Size ();
81 std::shared_ptr<B> _buffer;
Any error that occurs when reading data from a DCP.
Exceptions thrown by libdcp.
Namespace for everything in libdcp.