X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fstereo_picture_asset_writer.h;h=24f35ef4fef1481970c4659d322ad411fa44cf9b;hb=03fb9d475366b6e02b6bde4421607f7dcd9936ad;hp=771524c44106ae276779b2865f03520299914c70;hpb=566608b965e8ec0e08d9de128405d22ec7fedcd6;p=libdcp.git diff --git a/src/stereo_picture_asset_writer.h b/src/stereo_picture_asset_writer.h index 771524c4..24f35ef4 100644 --- a/src/stereo_picture_asset_writer.h +++ b/src/stereo_picture_asset_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,14 +17,15 @@ */ +#include "picture_asset_writer.h" +#include "types.h" +#include +#include #include #include #include -#include -#include -#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). @@ -39,24 +40,28 @@ namespace libdcp { 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 _state; - libdcp::Eye _next_eye; + dcp::Eye _next_eye; }; }