diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dcp.cc | 10 | ||||
| -rw-r--r-- | src/mxf_asset.cc | 10 | ||||
| -rw-r--r-- | src/mxf_asset.h | 5 | ||||
| -rw-r--r-- | src/picture_asset.cc | 16 | ||||
| -rw-r--r-- | src/picture_asset.h | 6 | ||||
| -rw-r--r-- | src/sound_asset.cc | 8 | ||||
| -rw-r--r-- | src/sound_asset.h | 1 |
7 files changed, 33 insertions, 23 deletions
@@ -363,10 +363,11 @@ CPL::CPL (string directory, string file, shared_ptr<const AssetMap> asset_map, b _directory, asset_map->asset_from_id (p->id)->chunks.front()->path, _fps, - (*i)->asset_list->main_picture->entry_point, (*i)->asset_list->main_picture->duration ) ); + + picture->set_entry_point ((*i)->asset_list->main_picture->entry_point); } catch (MXFFileError) { if (require_mxfs) { throw; @@ -380,10 +381,12 @@ CPL::CPL (string directory, string file, shared_ptr<const AssetMap> asset_map, b _directory, asset_map->asset_from_id (p->id)->chunks.front()->path, _fps, - p->entry_point, p->duration ) ); + + picture->set_entry_point (p->entry_point); + } catch (MXFFileError) { if (require_mxfs) { throw; @@ -399,10 +402,11 @@ CPL::CPL (string directory, string file, shared_ptr<const AssetMap> asset_map, b _directory, asset_map->asset_from_id ((*i)->asset_list->main_sound->id)->chunks.front()->path, _fps, - (*i)->asset_list->main_sound->entry_point, (*i)->asset_list->main_sound->duration ) ); + + sound->set_entry_point ((*i)->asset_list->main_sound->entry_point); } catch (MXFFileError) { if (require_mxfs) { throw; diff --git a/src/mxf_asset.cc b/src/mxf_asset.cc index 95412d0c..7e40f0e0 100644 --- a/src/mxf_asset.cc +++ b/src/mxf_asset.cc @@ -36,17 +36,23 @@ using boost::shared_ptr; using boost::dynamic_pointer_cast; using namespace libdcp; -MXFAsset::MXFAsset (string directory, string file_name, boost::signals2::signal<void (float)>* progress, int fps, int entry_point, int length) +MXFAsset::MXFAsset (string directory, string file_name, boost::signals2::signal<void (float)>* progress, int fps, int length) : Asset (directory, file_name) , _progress (progress) , _fps (fps) - , _entry_point (entry_point) + , _entry_point (0) , _length (length) { } void +MXFAsset::set_entry_point (int e) +{ + _entry_point = e; +} + +void MXFAsset::fill_writer_info (ASDCP::WriterInfo* writer_info) const { writer_info->ProductVersion = Metadata::instance()->product_version; diff --git a/src/mxf_asset.h b/src/mxf_asset.h index b1cb87fe..798a7e50 100644 --- a/src/mxf_asset.h +++ b/src/mxf_asset.h @@ -35,10 +35,11 @@ public: * @param file_name Name of MXF file. * @param progress Signal to inform of progress. * @param fps Frames per second. - * @param entry_point The entry point of this MXF; ie the first frame that should be used. * @param length Length in frames. */ - MXFAsset (std::string directory, std::string file_name, boost::signals2::signal<void (float)>* progress, int fps, int entry_point, int length); + MXFAsset (std::string directory, std::string file_name, boost::signals2::signal<void (float)>* progress, int fps, int length); + + void set_entry_point (int e); virtual bool equals (boost::shared_ptr<const Asset> other, EqualityOptions opt, std::list<std::string>& notes) const; diff --git a/src/picture_asset.cc b/src/picture_asset.cc index 72c99bc6..e5d88a6e 100644 --- a/src/picture_asset.cc +++ b/src/picture_asset.cc @@ -46,8 +46,8 @@ using boost::dynamic_pointer_cast; using boost::lexical_cast; using namespace libdcp; -PictureAsset::PictureAsset (string directory, string mxf_name, boost::signals2::signal<void (float)>* progress, int fps, int entry_point, int length) - : MXFAsset (directory, mxf_name, progress, fps, entry_point, length) +PictureAsset::PictureAsset (string directory, string mxf_name, boost::signals2::signal<void (float)>* progress, int fps, int length) + : MXFAsset (directory, mxf_name, progress, fps, length) { } @@ -136,7 +136,7 @@ MonoPictureAsset::MonoPictureAsset ( int fps, int length, Size size) - : PictureAsset (directory, mxf_name, progress, fps, 0, length) + : PictureAsset (directory, mxf_name, progress, fps, length) { _size = size; construct (get_path); @@ -150,14 +150,14 @@ MonoPictureAsset::MonoPictureAsset ( int fps, int length, Size size) - : PictureAsset (directory, mxf_name, progress, fps, 0, length) + : PictureAsset (directory, mxf_name, progress, fps, length) { _size = size; construct (boost::bind (&MonoPictureAsset::path_from_list, this, _1, files)); } -MonoPictureAsset::MonoPictureAsset (string directory, string mxf_name, int fps, int entry_point, int length) - : PictureAsset (directory, mxf_name, 0, fps, entry_point, length) +MonoPictureAsset::MonoPictureAsset (string directory, string mxf_name, int fps, int length) + : PictureAsset (directory, mxf_name, 0, fps, length) { ASDCP::JP2K::MXFReader reader; if (ASDCP_FAILURE (reader.OpenRead (path().string().c_str()))) { @@ -356,8 +356,8 @@ PictureAsset::frame_buffer_equals ( } -StereoPictureAsset::StereoPictureAsset (string directory, string mxf_name, int fps, int entry_point, int length) - : PictureAsset (directory, mxf_name, 0, fps, entry_point, length) +StereoPictureAsset::StereoPictureAsset (string directory, string mxf_name, int fps, int length) + : PictureAsset (directory, mxf_name, 0, fps, length) { ASDCP::JP2K::MXFSReader reader; if (ASDCP_FAILURE (reader.OpenRead (path().string().c_str()))) { diff --git a/src/picture_asset.h b/src/picture_asset.h index 8bcd0173..4bd7e8e4 100644 --- a/src/picture_asset.h +++ b/src/picture_asset.h @@ -35,7 +35,7 @@ class StereoPictureFrame; class PictureAsset : public MXFAsset { public: - PictureAsset (std::string directory, std::string mxf_name, boost::signals2::signal<void (float)>* progress, int fps, int entry_point, int length); + PictureAsset (std::string directory, std::string mxf_name, boost::signals2::signal<void (float)>* progress, int fps, int length); /** Write details of this asset to a CPL stream. * @param s Stream. @@ -103,7 +103,7 @@ public: Size size ); - MonoPictureAsset (std::string directory, std::string mxf_name, int fps, int entry_point, int length); + MonoPictureAsset (std::string directory, std::string mxf_name, int fps, int length); boost::shared_ptr<const MonoPictureFrame> get_frame (int n) const; bool equals (boost::shared_ptr<const Asset> other, EqualityOptions opt, std::list<std::string>& notes) const; @@ -117,7 +117,7 @@ private: class StereoPictureAsset : public PictureAsset { public: - StereoPictureAsset (std::string directory, std::string mxf_name, int fps, int entry_point, int length); + StereoPictureAsset (std::string directory, std::string mxf_name, int fps, int length); boost::shared_ptr<const StereoPictureFrame> get_frame (int n) const; bool equals (boost::shared_ptr<const Asset> other, EqualityOptions opt, std::list<std::string>& notes) const; diff --git a/src/sound_asset.cc b/src/sound_asset.cc index 98266b28..4f527409 100644 --- a/src/sound_asset.cc +++ b/src/sound_asset.cc @@ -44,7 +44,7 @@ using namespace libdcp; SoundAsset::SoundAsset ( vector<string> const & files, string directory, string mxf_name, boost::signals2::signal<void (float)>* progress, int fps, int length, int start_frame ) - : MXFAsset (directory, mxf_name, progress, fps, 0, length) + : MXFAsset (directory, mxf_name, progress, fps, length) , _channels (files.size ()) , _sampling_rate (0) , _start_frame (start_frame) @@ -61,7 +61,7 @@ SoundAsset::SoundAsset ( boost::signals2::signal<void (float)>* progress, int fps, int length, int start_frame, int channels ) - : MXFAsset (directory, mxf_name, progress, fps, 0, length) + : MXFAsset (directory, mxf_name, progress, fps, length) , _channels (channels) , _sampling_rate (0) , _start_frame (start_frame) @@ -71,8 +71,8 @@ SoundAsset::SoundAsset ( construct (get_path); } -SoundAsset::SoundAsset (string directory, string mxf_name, int fps, int entry_point, int length) - : MXFAsset (directory, mxf_name, 0, fps, entry_point, length) +SoundAsset::SoundAsset (string directory, string mxf_name, int fps, int length) + : MXFAsset (directory, mxf_name, 0, fps, length) , _channels (0) , _start_frame (0) { diff --git a/src/sound_asset.h b/src/sound_asset.h index 9fb1d60b..bd1811b1 100644 --- a/src/sound_asset.h +++ b/src/sound_asset.h @@ -82,7 +82,6 @@ public: std::string directory, std::string mxf_name, int fps, - int entry_point, int length ); |
