A couple of hacks to KDMs for testing by Dolby.
[libdcp.git] / src / stereo_picture_asset_writer.h
index 965729899a02d6dd9683092d16a09897d1c83c9c..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 dcp {
 
@@ -39,20 +40,24 @@ namespace dcp {
 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;