diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/picture_mxf_writer.cc | 51 | ||||
| -rw-r--r-- | src/picture_mxf_writer.h | 11 |
2 files changed, 5 insertions, 57 deletions
diff --git a/src/picture_mxf_writer.cc b/src/picture_mxf_writer.cc index 46426401..42fa614c 100644 --- a/src/picture_mxf_writer.cc +++ b/src/picture_mxf_writer.cc @@ -31,57 +31,6 @@ using std::string; using boost::shared_ptr; using namespace dcp; -FrameInfo::FrameInfo (istream& s) - : offset (0) - , size (0) -{ - s >> offset >> size; - - if (!s.good ()) { - /* Make sure we zero these if something bad happened, otherwise - the caller might try to alloc lots of RAM. - */ - offset = size = 0; - } - - s >> hash; -} - -FrameInfo::FrameInfo (FILE* f) -{ -#ifdef LIBDCP_WINDOWS - fscanf (f, "%I64u", &offset); - fscanf (f, "%I64u", &size); -#else - fscanf (f, "%" SCNu64, &offset); - fscanf (f, "%" SCNu64, &size); -#endif - - if (ferror (f)) { - offset = size = 0; - } - - char hash_buffer[128]; - fscanf (f, "%s", hash_buffer); - hash = hash_buffer; -} - -void -FrameInfo::write (ostream& s) const -{ - s << offset << " " << size << " " << hash; -} - -void -FrameInfo::write (FILE* f) const -{ -#ifdef LIBDCP_WINDOWS - fprintf (f, "%I64u %I64u %s", offset, size, hash.c_str ()); -#else - fprintf (f, "%" PRIu64 " %" PRIu64 " %s", offset, size, hash.c_str ()); -#endif -} - PictureMXFWriter::PictureMXFWriter (PictureMXF* mxf, boost::filesystem::path file, Standard standard, bool overwrite) : MXFWriter (mxf, file) , _picture_mxf (mxf) diff --git a/src/picture_mxf_writer.h b/src/picture_mxf_writer.h index d1baa7ad..6626f8b8 100644 --- a/src/picture_mxf_writer.h +++ b/src/picture_mxf_writer.h @@ -42,18 +42,17 @@ class PictureMXF; */ struct FrameInfo { + FrameInfo () + : offset (0) + , size (0) + {} + FrameInfo (uint64_t o, uint64_t s, std::string h) : offset (o) , size (s) , hash (h) {} - FrameInfo (std::istream& s); - FrameInfo (FILE *); - - void write (std::ostream& s) const; - void write (FILE *) const; - uint64_t offset; uint64_t size; std::string hash; |
