/*
- Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
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
*/
+#include "picture_asset_writer.h"
+#include "types.h"
+#include <boost/shared_ptr.hpp>
+#include <boost/utility.hpp>
#include <stdint.h>
#include <string>
#include <fstream>
-#include <boost/shared_ptr.hpp>
-#include <boost/utility.hpp>
-#include "picture_asset_writer.h"
-namespace libdcp {
+namespace dcp {
/** A helper class for writing to StereoPictureAssets progressively (i.e. writing frame-by-frame,
* rather than giving libdcp all the frames in one go).
class StereoPictureAssetWriter : public PictureAssetWriter
{
public:
- FrameInfo write (uint8_t *, int);
+ /** Write a frame for one eye. Frames must be written left, then right, then left etc.
+ * @param data JPEG2000 data.
+ * @param size Size of data.
+ */
+ FrameInfo write (uint8_t* data, int size);
void fake_write (int size);
- void finalize ();
+ bool finalize ();
private:
friend class StereoPictureAsset;
- StereoPictureAssetWriter (PictureAsset *, bool);
+ StereoPictureAssetWriter (PictureAsset *, boost::filesystem::path file, Standard, bool);
void start (uint8_t *, int);
/* do this with an opaque pointer so we don't have to include
ASDCP headers
*/
-
+
struct ASDCPState;
boost::shared_ptr<ASDCPState> _state;
- libdcp::Eye _next_eye;
+ dcp::Eye _next_eye;
};
}