summaryrefslogtreecommitdiff
path: root/src/AS_DCP.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-11-23 23:29:26 +0100
committerCarl Hetherington <cth@carlh.net>2020-12-27 02:30:45 +0100
commit0decd2a4633592c4349a1fdbc5417a06835909e1 (patch)
tree0042a5ec1ed274f217e781f45915bc1506c062d6 /src/AS_DCP.h
parent57516bc7a6f9e95d08df44a9c463ffcf1c4fa181 (diff)
Allow overwrite (i.e. continue) when writing JPEG2000 MXFs.
Diffstat (limited to 'src/AS_DCP.h')
-rwxr-xr-xsrc/AS_DCP.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/AS_DCP.h b/src/AS_DCP.h
index c1a8bdb..6abe237 100755
--- a/src/AS_DCP.h
+++ b/src/AS_DCP.h
@@ -1252,11 +1252,11 @@ namespace ASDCP {
virtual MXF::OPAtomIndexFooter& OPAtomIndexFooter();
virtual MXF::RIP& RIP();
- // Open the file for writing. The file must not exist. Returns error if
+ // Open the file for writing. The file must not exist unless overwrite is true. Returns error if
// the operation cannot be completed or if nonsensical data is discovered
// in the essence descriptor.
Result_t OpenWrite(const std::string& filename, const WriterInfo&,
- const PictureDescriptor&, ui32_t HeaderSize = 16384);
+ const PictureDescriptor&, ui32_t HeaderSize = 16384, bool overwrite = false);
// Writes a frame of essence to the MXF file. If the optional AESEncContext
// argument is present, the essence is encrypted prior to writing.
@@ -1264,8 +1264,13 @@ namespace ASDCP {
// error occurs.
Result_t WriteFrame(const FrameBuffer&, AESEncContext* = 0, HMACContext* = 0);
+ Result_t FakeWriteFrame(int size);
+
// Closes the MXF file, writing the index and revised header.
Result_t Finalize();
+
+ // Return the current file offset in the MXF file that we are writing
+ ui64_t Tell() const;
};
//
@@ -1357,11 +1362,11 @@ namespace ASDCP {
virtual MXF::OPAtomIndexFooter& OPAtomIndexFooter();
virtual MXF::RIP& RIP();
- // Open the file for writing. The file must not exist. Returns error if
+ // Open the file for writing. The file must not exist unless overwrite is true. Returns error if
// the operation cannot be completed or if nonsensical data is discovered
// in the essence descriptor.
Result_t OpenWrite(const std::string& filename, const WriterInfo&,
- const PictureDescriptor&, ui32_t HeaderSize = 16384);
+ const PictureDescriptor&, ui32_t HeaderSize = 16384, bool overwrite = false);
// Writes a pair of frames of essence to the MXF file. If the optional AESEncContext
// argument is present, the essence is encrypted prior to writing.
@@ -1378,9 +1383,14 @@ namespace ASDCP {
Result_t WriteFrame(const FrameBuffer&, StereoscopicPhase_t phase,
AESEncContext* = 0, HMACContext* = 0);
+ Result_t FakeWriteFrame(int size, StereoscopicPhase_t phase);
+
// Closes the MXF file, writing the index and revised header. Returns
// RESULT_SPHASE if WriteFrame was called an odd number of times.
Result_t Finalize();
+
+ // Return the current file offset in the MXF file that we are writing
+ ui64_t Tell() const;
};
//