_directory,
n,
_fps,
+ (*i)->asset_list->main_picture->entry_point,
(*i)->asset_list->main_picture->duration
)
);
_directory,
n,
_fps,
+ (*i)->asset_list->main_stereoscopic_picture->entry_point,
(*i)->asset_list->main_stereoscopic_picture->duration
)
);
_directory,
n,
_fps,
+ (*i)->asset_list->main_sound->entry_point,
(*i)->asset_list->main_sound->duration
)
);
using namespace boost;
using namespace libdcp;
-MXFAsset::MXFAsset (string directory, string file_name, sigc::signal1<void, float>* progress, int fps, int length)
+MXFAsset::MXFAsset (string directory, string file_name, sigc::signal1<void, float>* progress, int fps, int entry_point, int length)
: Asset (directory, file_name)
, _progress (progress)
, _fps (fps)
+ , _entry_point (entry_point)
, _length (length)
{
{
return _length;
}
-
-
* @param fps Frames per second.
* @param length Length in frames.
*/
- MXFAsset (std::string directory, std::string file_name, sigc::signal1<void, float>* progress, int fps, int length);
+ MXFAsset (std::string directory, std::string file_name, sigc::signal1<void, float>* progress, int fps, int entry_point, int length);
virtual std::list<std::string> equals (boost::shared_ptr<const Asset> other, EqualityOptions opt) const;
sigc::signal1<void, float>* _progress;
/** Frames per second */
int _fps;
+ int _entry_point;
/** Length in frames */
int _length;
};
using namespace boost;
using namespace libdcp;
-PictureAsset::PictureAsset (string directory, string mxf_name, sigc::signal1<void, float>* progress, int fps, int length)
- : MXFAsset (directory, mxf_name, progress, fps, length)
+PictureAsset::PictureAsset (string directory, string mxf_name, sigc::signal1<void, float>* progress, int fps, int entry_point, int length)
+ : MXFAsset (directory, mxf_name, progress, fps, entry_point, length)
{
}
int length,
int width,
int height)
- : PictureAsset (directory, mxf_name, progress, fps, length)
+ : PictureAsset (directory, mxf_name, progress, fps, 0, length)
{
_width = width;
_height = height;
int length,
int width,
int height)
- : PictureAsset (directory, mxf_name, progress, fps, length)
+ : PictureAsset (directory, mxf_name, progress, fps, 0, length)
{
_width = width;
_height = height;
construct (sigc::bind (sigc::mem_fun (*this, &MonoPictureAsset::path_from_list), files));
}
-MonoPictureAsset::MonoPictureAsset (string directory, string mxf_name, int fps, int length)
- : PictureAsset (directory, mxf_name, 0, fps, length)
+MonoPictureAsset::MonoPictureAsset (string directory, string mxf_name, int fps, int entry_point, int length)
+ : PictureAsset (directory, mxf_name, 0, fps, entry_point, length)
{
ASDCP::JP2K::MXFReader reader;
if (ASDCP_FAILURE (reader.OpenRead (path().string().c_str()))) {
shared_ptr<const MonoPictureFrame>
MonoPictureAsset::get_frame (int n) const
{
- return shared_ptr<const MonoPictureFrame> (new MonoPictureFrame (path().string(), n));
+ return shared_ptr<const MonoPictureFrame> (new MonoPictureFrame (path().string(), n + _entry_point));
}
-StereoPictureAsset::StereoPictureAsset (string directory, string mxf_name, int fps, int length)
- : PictureAsset (directory, mxf_name, 0, fps, length)
+StereoPictureAsset::StereoPictureAsset (string directory, string mxf_name, int fps, int entry_point, int length)
+ : PictureAsset (directory, mxf_name, 0, fps, entry_point, length)
{
ASDCP::JP2K::MXFSReader reader;
if (ASDCP_FAILURE (reader.OpenRead (path().string().c_str()))) {
shared_ptr<const StereoPictureFrame>
StereoPictureAsset::get_frame (int n) const
{
- return shared_ptr<const StereoPictureFrame> (new StereoPictureFrame (path().string(), n));
+ return shared_ptr<const StereoPictureFrame> (new StereoPictureFrame (path().string(), n + _entry_point));
}
class PictureAsset : public MXFAsset
{
public:
- PictureAsset (std::string directory, std::string mxf_name, sigc::signal1<void, float>* progress, int fps, int length);
+ PictureAsset (std::string directory, std::string mxf_name, sigc::signal1<void, float>* progress, int fps, int entry_point, int length);
/** Write details of this asset to a CPL stream.
* @param s Stream.
int height
);
- MonoPictureAsset (std::string directory, std::string mxf_name, int fps, int length);
+ MonoPictureAsset (std::string directory, std::string mxf_name, int fps, int entry_point, int length);
boost::shared_ptr<const MonoPictureFrame> get_frame (int n) const;
class StereoPictureAsset : public PictureAsset
{
public:
- StereoPictureAsset (std::string directory, std::string mxf_name, int fps, int length);
+ StereoPictureAsset (std::string directory, std::string mxf_name, int fps, int entry_point, int length);
boost::shared_ptr<const StereoPictureFrame> get_frame (int n) const;
};
SoundAsset::SoundAsset (
vector<string> const & files, string directory, string mxf_name, sigc::signal1<void, float>* progress, int fps, int length
)
- : MXFAsset (directory, mxf_name, progress, fps, length)
+ : MXFAsset (directory, mxf_name, progress, fps, 0, length)
, _channels (files.size ())
, _sampling_rate (0)
{
SoundAsset::SoundAsset (
sigc::slot<string, Channel> get_path, string directory, string mxf_name, sigc::signal1<void, float>* progress, int fps, int length, int channels
)
- : MXFAsset (directory, mxf_name, progress, fps, length)
+ : MXFAsset (directory, mxf_name, progress, fps, 0, length)
, _channels (channels)
, _sampling_rate (0)
{
construct (get_path);
}
-SoundAsset::SoundAsset (string directory, string mxf_name, int fps, int length)
- : MXFAsset (directory, mxf_name, 0, fps, length)
+SoundAsset::SoundAsset (string directory, string mxf_name, int fps, int entry_point, int length)
+ : MXFAsset (directory, mxf_name, 0, fps, entry_point, length)
, _channels (0)
{
ASDCP::PCM::MXFReader reader;
shared_ptr<const SoundFrame>
SoundAsset::get_frame (int n) const
{
- return shared_ptr<const SoundFrame> (new SoundFrame (path().string(), n));
+ return shared_ptr<const SoundFrame> (new SoundFrame (path().string(), n + _entry_point));
}
std::string directory,
std::string mxf_name,
int fps,
+ int entry_point,
int length
);