summaryrefslogtreecommitdiff
path: root/src/picture_asset.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-01-28 00:11:30 +0000
committerCarl Hetherington <cth@carlh.net>2013-01-28 00:11:30 +0000
commita246eb45b34ebc6bf277694b295f693706be8c6a (patch)
treebb5d78210f036eaddd8ad66af1325bc3d6636fcb /src/picture_asset.h
parent103c20d48c22f0c604e402de41bce7336ef9b386 (diff)
Add support for hashing mono picture MXF writes on the way out.
Diffstat (limited to 'src/picture_asset.h')
-rw-r--r--src/picture_asset.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/picture_asset.h b/src/picture_asset.h
index 71900200..4e9e1dd7 100644
--- a/src/picture_asset.h
+++ b/src/picture_asset.h
@@ -17,6 +17,9 @@
*/
+#ifndef LIBDCP_PICTURE_ASSET_H
+#define LIBDCP_PICTURE_ASSET_H
+
/** @file src/picture_asset.h
* @brief An asset made up of JPEG2000 files
*/
@@ -79,6 +82,23 @@ protected:
class MonoPictureAsset;
+struct FrameInfo
+{
+ FrameInfo (uint64_t o, uint64_t l, std::string h)
+ : offset (o)
+ , length (l)
+ , hash (h)
+ {}
+
+ FrameInfo (std::istream& s);
+
+ void write (std::ostream& s);
+
+ uint64_t offset;
+ uint64_t length;
+ std::string hash;
+};
+
/** A helper class for writing to MonoPictureAssets progressively (i.e. writing frame-by-frame,
* rather than giving libdcp all the frames in one go).
*
@@ -94,7 +114,7 @@ class MonoPictureAssetWriter
public:
~MonoPictureAssetWriter ();
- void write (uint8_t* data, int size);
+ FrameInfo write (uint8_t* data, int size);
void finalize ();
private:
@@ -205,3 +225,5 @@ public:
}
+
+#endif