A couple of hacks to KDMs for testing by Dolby.
[libdcp.git] / src / stereo_picture_asset_writer.h
index 771524c44106ae276779b2865f03520299914c70..24f35ef4fef1481970c4659d322ad411fa44cf9b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    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).
@@ -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<ASDCPState> _state;
 
-       libdcp::Eye _next_eye;
+       dcp::Eye _next_eye;
 };
 
 }