Add new write() method.
[libdcp.git] / src / picture_asset_writer.cc
index e3d7b70e5079a2628637bce408fe771b105bfc41..c30be1bc4f35a78d033ac46f7b93a645db5feeba 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of libdcp.
 
     files in the program, then also delete it here.
 */
 
+
+/** @file  src/picture_asset_writer.cc
+ *  @brief PictureAssetWriter and FrameInfo classes
+ */
+
+
 #include "picture_asset_writer.h"
 #include "exceptions.h"
 #include "picture_asset.h"
 #include <inttypes.h>
 #include <stdint.h>
 
+
 using std::string;
-using boost::shared_ptr;
+using std::shared_ptr;
 using namespace dcp;
 
-PictureAssetWriter::PictureAssetWriter (PictureAsset* asset, boost::filesystem::path file, Standard standard, bool overwrite)
-       : AssetWriter (asset, file, standard)
+
+PictureAssetWriter::PictureAssetWriter (PictureAsset* asset, boost::filesystem::path file, bool overwrite)
+       : AssetWriter (asset, file)
        , _picture_asset (asset)
-       , _standard (standard)
        , _overwrite (overwrite)
 {
        asset->set_file (file);
 }
+
+
+FrameInfo
+PictureAssetWriter::write (Data const& data)
+{
+       return write (data.data(), data.size());
+}