summaryrefslogtreecommitdiff
path: root/src/frame.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-23 15:35:24 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-23 15:35:24 +0100
commit6c37cc1979b2a01205a888c4c98f3334685ee8dd (patch)
tree9de52a3053e57bdf79a7986319cb097b33e46b5c /src/frame.h
parentb75d977a38f039fd68ed5d4055ae70b4bf631603 (diff)
Tidying.
Diffstat (limited to 'src/frame.h')
-rw-r--r--src/frame.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/frame.h b/src/frame.h
index 7aa471fd..328b22b8 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2016-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
@@ -31,19 +31,22 @@
files in the program, then also delete it here.
*/
+
#ifndef LIBDCP_FRAME_H
#define LIBDCP_FRAME_H
+
#include "crypto_context.h"
#include "exceptions.h"
#include <asdcp/KM_fileio.h>
#include <asdcp/AS_DCP.h>
-#include <boost/noncopyable.hpp>
+
namespace dcp {
+
template <class R, class B>
-class Frame : public boost::noncopyable
+class Frame
{
public:
Frame (R* reader, int n, std::shared_ptr<const DecryptionContext> c)
@@ -51,11 +54,14 @@ public:
/* XXX: unfortunate guesswork on this buffer size */
_buffer.reset(new B(Kumu::Megabyte));
- if (ASDCP_FAILURE (reader->ReadFrame (n, *_buffer, c->context(), c->hmac()))) {
+ if (ASDCP_FAILURE(reader->ReadFrame(n, *_buffer, c->context(), c->hmac()))) {
boost::throw_exception (ReadError ("could not read frame"));
}
}
+ Frame (Frame const&) = delete;
+ Frame& operator= (Frame const&) = delete;
+
uint8_t const * data () const
{
return _buffer->RoData ();
@@ -70,6 +76,8 @@ private:
std::shared_ptr<B> _buffer;
};
+
}
+
#endif