X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fpicture_mxf.h;h=bf8fcf763f5a0824055e2ff32d89a7c3a16bd203;hb=7fb85beb1e4b655da0463d7d9c95b1181f5a6f00;hp=3a587280b0e4a0c105f8b2e969c7811649dd9ff8;hpb=1c724e363a644abaee7efb39d6091e7b30de0fb6;p=libdcp.git diff --git a/src/picture_mxf.h b/src/picture_mxf.h index 3a587280..bf8fcf76 100644 --- a/src/picture_mxf.h +++ b/src/picture_mxf.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 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 @@ -20,18 +20,18 @@ #ifndef LIBDCP_PICTURE_MXF_H #define LIBDCP_PICTURE_MXF_H -/** @file src/picture_asset.h - * @brief An asset made up of JPEG2000 data +/** @file src/picture_mxf.h + * @brief PictureMXF class. */ -#include #include "mxf.h" #include "util.h" #include "metadata.h" +#include namespace ASDCP { namespace JP2K { - class PictureDescriptor; + struct PictureDescriptor; } } @@ -42,14 +42,20 @@ class MonoPictureFrame; class StereoPictureFrame; class PictureMXFWriter; -/** @brief An asset made up of JPEG2000 data */ +/** @class PictureMXF + * @brief An asset made up of JPEG2000 data. + */ class PictureMXF : public MXF { public: PictureMXF (boost::filesystem::path file); - PictureMXF (int edit_rate); + PictureMXF (Fraction edit_rate); - virtual boost::shared_ptr start_write (boost::filesystem::path file, bool overwrite) = 0; + virtual boost::shared_ptr start_write ( + boost::filesystem::path file, + Standard standard, + bool overwrite + ) = 0; Size size () const { return _size; @@ -59,9 +65,23 @@ public: _size = s; } - void write_to_cpl (xmlpp::Element *) const; + Fraction frame_rate () const { + return _frame_rate; + } + + void set_frame_rate (Fraction r) { + _frame_rate = r; + } + + Fraction screen_aspect_ratio () const { + return _screen_aspect_ratio; + } + + void set_screen_aspect_ratio (Fraction r) { + _screen_aspect_ratio = r; + } -protected: +protected: bool frame_buffer_equals ( int frame, EqualityOptions opt, boost::function note, @@ -69,15 +89,22 @@ protected: ) const; bool descriptor_equals ( - ASDCP::JP2K::PictureDescriptor const & a, ASDCP::JP2K::PictureDescriptor const & b, boost::function + ASDCP::JP2K::PictureDescriptor const & a, + ASDCP::JP2K::PictureDescriptor const & b, + boost::function ) const; + void read_picture_descriptor (ASDCP::JP2K::PictureDescriptor const &); + /** picture size in pixels */ Size _size; + Fraction _frame_rate; + Fraction _screen_aspect_ratio; private: - std::string key_type () const; - virtual int edit_rate_factor () const = 0; + std::string asdcp_kind () const { + return "Picture"; + } };