summaryrefslogtreecommitdiff
path: root/src/lib/dcp_video_frame.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-01-20 23:11:18 +0000
committerCarl Hetherington <cth@carlh.net>2013-01-20 23:11:18 +0000
commit5e7de85ce53a42b90023a2160d3450a7af4a4b61 (patch)
tree7020eb41d9a5e319b794f6cd587e7835631902e2 /src/lib/dcp_video_frame.cc
parenta9911ae2e5d5ea1ca63e96eb0dd0290f97fefe47 (diff)
Write hashes of encoded frames.
Diffstat (limited to 'src/lib/dcp_video_frame.cc')
-rw-r--r--src/lib/dcp_video_frame.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/dcp_video_frame.cc b/src/lib/dcp_video_frame.cc
index 89db5761a..c3f0fed03 100644
--- a/src/lib/dcp_video_frame.cc
+++ b/src/lib/dcp_video_frame.cc
@@ -401,8 +401,8 @@ EncodedData::~EncodedData ()
}
/** Write this data to a J2K file.
- * @param opt Options.
- * @param frame DCP Frame index.
+ * @param Film Film.
+ * @param frame DCP frame index.
*/
void
EncodedData::write (shared_ptr<const Film> film, int frame) const
@@ -422,12 +422,14 @@ EncodedData::write (shared_ptr<const Film> film, int frame) const
/* Rename the file from foo.j2c.tmp to foo.j2c now that it is complete */
boost::filesystem::rename (tmp_j2k, real_j2k);
+}
- /* Write a file containing the hash */
+void
+EncodedData::write_hash (shared_ptr<const Film> film, int frame) const
+{
string const hash = film->hash_out_path (frame, false);
ofstream h (hash.c_str());
h << md5_digest (_data, _size) << "\n";
- h.close ();
}
/** Send this data to a socket.