X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fmono_picture_asset.cc;h=5a01491013e28a4112f9e32c0ba10f372b29f35d;hb=8259e2771f85c33c531a83fe1a78668f158208da;hp=1a3656cc18d45d0fe32c797241c69316b5808f2f;hpb=a68b877d96a9e9f366f27752e071bc0e895e9dc7;p=libdcp.git diff --git a/src/mono_picture_asset.cc b/src/mono_picture_asset.cc index 1a3656cc..5a014910 100644 --- a/src/mono_picture_asset.cc +++ b/src/mono_picture_asset.cc @@ -16,17 +16,30 @@ You should have received a copy of the GNU General Public License along with libdcp. If not, see . + In addition, as a special exception, the copyright holders give + permission to link the code of portions of this program with the + OpenSSL library under certain conditions as described in each + individual source file, and distribute linked combinations + including the two. + + You must obey the GNU General Public License in all respects + for all of the code used other than OpenSSL. If you modify + file(s) with this exception, you may extend this exception to your + version of the file(s), but you are not obligated to do so. If you + do not wish to do so, delete this exception statement from your + version. If you delete this exception statement from all source + files in the program, then also delete it here. */ #include "mono_picture_asset.h" #include "mono_picture_asset_writer.h" #include "mono_picture_asset_reader.h" -#include "AS_DCP.h" -#include "KM_fileio.h" #include "exceptions.h" #include "dcp_assert.h" #include "mono_picture_frame.h" #include "compose.hpp" +#include +#include using std::string; using std::vector; @@ -60,8 +73,8 @@ MonoPictureAsset::MonoPictureAsset (boost::filesystem::path file) _id = read_writer_info (info); } -MonoPictureAsset::MonoPictureAsset (Fraction edit_rate) - : PictureAsset (edit_rate) +MonoPictureAsset::MonoPictureAsset (Fraction edit_rate, Standard standard) + : PictureAsset (edit_rate, standard) { } @@ -80,15 +93,17 @@ MonoPictureAsset::equals (shared_ptr other, EqualityOptions opt, No } ASDCP::JP2K::MXFReader reader_A; - Kumu::Result_t r = reader_A.OpenRead (_file.string().c_str()); + DCP_ASSERT (_file); + Kumu::Result_t r = reader_A.OpenRead (_file->string().c_str()); if (ASDCP_FAILURE (r)) { - boost::throw_exception (MXFFileError ("could not open MXF file for reading", _file.string(), r)); + boost::throw_exception (MXFFileError ("could not open MXF file for reading", _file->string(), r)); } ASDCP::JP2K::MXFReader reader_B; - r = reader_B.OpenRead (other->file().string().c_str()); + DCP_ASSERT (other->file ()); + r = reader_B.OpenRead (other->file()->string().c_str()); if (ASDCP_FAILURE (r)) { - boost::throw_exception (MXFFileError ("could not open MXF file for reading", other->file().string(), r)); + boost::throw_exception (MXFFileError ("could not open MXF file for reading", other->file()->string(), r)); } ASDCP::JP2K::PictureDescriptor desc_A; @@ -152,16 +167,16 @@ MonoPictureAsset::equals (shared_ptr other, EqualityOptions opt, No } shared_ptr -MonoPictureAsset::start_write (boost::filesystem::path file, Standard standard, bool overwrite) +MonoPictureAsset::start_write (boost::filesystem::path file, bool overwrite) { /* XXX: can't we use shared_ptr here? */ - return shared_ptr (new MonoPictureAssetWriter (this, file, standard, overwrite)); + return shared_ptr (new MonoPictureAssetWriter (this, file, overwrite)); } shared_ptr MonoPictureAsset::start_read () const { - return shared_ptr (new MonoPictureAssetReader (this)); + return shared_ptr (new MonoPictureAssetReader (this, key(), standard())); } string