diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-03-22 19:20:29 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-04-21 23:06:35 +0200 |
| commit | d4abae4fdecc33cac471b63c0383be27cb2409fa (patch) | |
| tree | c91945133589016b24e29c7214aa9ce10aceef33 /src/AS_DCP.h | |
| parent | 48feccc34ebb795b2547823e34c2cd042ec2c7e8 (diff) | |
Add the DCP-o-matic-specific API additions for MPEG2 (as added previously for JPEG2000).mpeg2
Diffstat (limited to 'src/AS_DCP.h')
| -rwxr-xr-x | src/AS_DCP.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/AS_DCP.h b/src/AS_DCP.h index e41d70c..63e6665 100755 --- a/src/AS_DCP.h +++ b/src/AS_DCP.h @@ -737,6 +737,7 @@ namespace ASDCP { // Opens the stream for reading, parses enough data to provide a complete // set of stream metadata for the MXFWriter below. Result_t OpenRead(const std::string& filename) const; + Result_t OpenRead(uint8_t const* data, int size) const; // Fill a VideoDescriptor struct with the values from the file's header. // Returns RESULT_INIT if the file is not open. @@ -775,16 +776,21 @@ namespace ASDCP { // 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 VideoDescriptor&, ui32_t HeaderSize = 16384); + const VideoDescriptor&, 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. // Fails if the file is not open, is finalized, or an operating system // error occurs. - Result_t WriteFrame(const FrameBuffer&, AESEncContext* = 0, HMACContext* = 0); + Result_t WriteFrame(const FrameBuffer&, AESEncContext* = 0, HMACContext* = 0, std::string* hash = 0); + + Result_t FakeWriteFrame(int size, FrameType_t frame_type, bool gop_start, bool closed_gop, ui8_t temporal_offset); // 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; }; // A class which reads MPEG frame data from an AS-DCP format MXF file. |
