X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fpicture_mxf_writer.h;h=f8c67ba9b33918f88d85105aab3b39d5116263f2;hb=59886567974bd3e79d30a4a9425d86d50bf425f3;hp=bcd8873d660a31d6dbec203f13989063f987208b;hpb=0703842433013ac1d5f79c09d7a8361dc2e565c8;p=libdcp.git diff --git a/src/picture_mxf_writer.h b/src/picture_mxf_writer.h index bcd8873d..f8c67ba9 100644 --- a/src/picture_mxf_writer.h +++ b/src/picture_mxf_writer.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2013 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,13 +17,14 @@ */ +#include "metadata.h" +#include "types.h" +#include "mxf_writer.h" +#include +#include #include #include #include -#include -#include -#include "metadata.h" -#include "types.h" namespace dcp { @@ -49,31 +50,21 @@ struct FrameInfo std::string hash; }; -class PictureMXFWriter : public boost::noncopyable +class PictureMXFWriter : public MXFWriter { public: - virtual ~PictureMXFWriter () {} virtual FrameInfo write (uint8_t *, int) = 0; - virtual void finalize () = 0; virtual void fake_write (int) = 0; protected: template - friend void start (PictureMXFWriter *, boost::shared_ptr

, Q *, uint8_t *, int); - - PictureMXFWriter (PictureMXF *, boost::filesystem::path, bool); + friend void start (PictureMXFWriter *, boost::shared_ptr

, Standard, Q *, uint8_t *, int); - PictureMXF* _mxf; + PictureMXFWriter (PictureMXF *, boost::filesystem::path, Standard standard, bool); - boost::filesystem::path _file; - /** Number of picture frames written to the asset so far. For stereo assets - * this will be incremented for each eye (i.e. there will be twice the number - * of frames as in a mono asset). - */ - int _frames_written; + PictureMXF* _picture_mxf; bool _started; - /** true if finalize() has been called */ - bool _finalized; + Standard _standard; bool _overwrite; };