DCPTime
-AtmosMXFContent::full_length (shared_ptr<const Film> film) const
+AtmosMXFContent::full_length_dcp (shared_ptr<const Film> film) const
{
FrameRateChange const frc (film, shared_from_this());
return DCPTime::from_frames (llrint(atmos->length() * frc.factor()), film->video_frame_rate());
void examine (std::shared_ptr<const Film> film, std::shared_ptr<Job> job) override;
std::string summary () const override;
void as_xml (xmlpp::Node* node, bool with_path) const override;
- dcpomatic::DCPTime full_length (std::shared_ptr<const Film> film) const override;
+ dcpomatic::DCPTime full_length_dcp (std::shared_ptr<const Film> film) const override;
dcpomatic::DCPTime approximate_length () const override;
static bool valid_mxf (boost::filesystem::path path);
}
FrameRateChange const frc (_parent->active_video_frame_rate(film), film->video_frame_rate());
- ContentTime const c (_parent->full_length(film), frc);
+ ContentTime const c (_parent->full_length_dcp(film), frc);
p.push_back (
UserProperty (UserProperty::LENGTH, _("Full length in video frames at content rate"), c.frames_round(frc.source))
DCPTime
Content::length_after_trim (shared_ptr<const Film> film) const
{
- auto length = max(DCPTime(), full_length(film) - DCPTime(trim_start() + trim_end(), film->active_frame_rate_change(position())));
+ auto length = max(DCPTime(), full_length_dcp(film) - DCPTime(trim_start() + trim_end(), film->active_frame_rate_change(position())));
if (video) {
length = length.round(film->video_frame_rate());
}
virtual std::string technical_summary () const;
virtual void as_xml (xmlpp::Node *, bool with_paths) const;
- virtual dcpomatic::DCPTime full_length (std::shared_ptr<const Film>) const = 0;
+ virtual dcpomatic::DCPTime full_length_dcp (std::shared_ptr<const Film>) const = 0;
virtual dcpomatic::DCPTime approximate_length () const = 0;
virtual std::string identifier () const;
/** @return points at which to split this content when
}
DCPTime
-DCPContent::full_length (shared_ptr<const Film> film) const
+DCPContent::full_length_dcp (shared_ptr<const Film> film) const
{
if (!video) {
return {};
return std::dynamic_pointer_cast<const DCPContent> (Content::shared_from_this ());
}
- dcpomatic::DCPTime full_length (std::shared_ptr<const Film> film) const override;
+ dcpomatic::DCPTime full_length_dcp (std::shared_ptr<const Film> film) const override;
dcpomatic::DCPTime approximate_length () const override;
void examine (std::shared_ptr<const Film> film, std::shared_ptr<Job>) override;
}
DCPTime
-DCPSubtitleContent::full_length (shared_ptr<const Film> film) const
+DCPSubtitleContent::full_length_dcp (shared_ptr<const Film> film) const
{
FrameRateChange const frc (film, shared_from_this());
return DCPTime (_length, frc);
std::string summary () const override;
std::string technical_summary () const override;
void as_xml (xmlpp::Node *, bool with_paths) const override;
- dcpomatic::DCPTime full_length (std::shared_ptr<const Film> film) const override;
+ dcpomatic::DCPTime full_length_dcp (std::shared_ptr<const Film> film) const override;
dcpomatic::DCPTime approximate_length () const override;
private:
DCPTime
-FFmpegContent::full_length (shared_ptr<const Film> film) const
+FFmpegContent::full_length_dcp (shared_ptr<const Film> film) const
{
FrameRateChange const frc (film, shared_from_this());
if (video) {
std::string summary () const override;
std::string technical_summary () const override;
void as_xml (xmlpp::Node *, bool with_paths) const override;
- dcpomatic::DCPTime full_length (std::shared_ptr<const Film> film) const override;
+ dcpomatic::DCPTime full_length_dcp (std::shared_ptr<const Film> film) const override;
dcpomatic::DCPTime approximate_length () const override;
std::string identifier () const override;
/* Make sure all streams are the same length and round up to the next video frame */
auto const frc = film()->active_frame_rate_change(_ffmpeg_content->position());
- ContentTime full_length (_ffmpeg_content->full_length(film()), frc);
+ ContentTime full_length (_ffmpeg_content->full_length_dcp(film()), frc);
full_length = full_length.ceil (frc.source);
if (video) {
double const vfr = _ffmpeg_content->video_frame_rate().get();
}
DCPTime
-ImageContent::full_length (shared_ptr<const Film> film) const
+ImageContent::full_length_dcp (shared_ptr<const Film> film) const
{
FrameRateChange const frc (film, shared_from_this());
return DCPTime::from_frames (llrint(video->length_after_3d_combine() * frc.factor()), film->video_frame_rate());
std::string summary () const override;
std::string technical_summary () const override;
void as_xml (xmlpp::Node *, bool with_paths) const override;
- dcpomatic::DCPTime full_length (std::shared_ptr<const Film> film) const override;
+ dcpomatic::DCPTime full_length_dcp (std::shared_ptr<const Film> film) const override;
dcpomatic::DCPTime approximate_length () const override;
std::string identifier () const override;
DCPTime
-StringTextFileContent::full_length (shared_ptr<const Film> film) const
+StringTextFileContent::full_length_dcp (shared_ptr<const Film> film) const
{
FrameRateChange const frc (film, shared_from_this());
return DCPTime (_length, frc);
std::string summary () const override;
std::string technical_summary () const override;
void as_xml (xmlpp::Node *, bool with_paths) const override;
- dcpomatic::DCPTime full_length (std::shared_ptr<const Film> film) const override;
+ dcpomatic::DCPTime full_length_dcp (std::shared_ptr<const Film> film) const override;
dcpomatic::DCPTime approximate_length () const override;
std::string identifier () const override;
DCPTime
-VideoMXFContent::full_length (shared_ptr<const Film> film) const
+VideoMXFContent::full_length_dcp (shared_ptr<const Film> film) const
{
FrameRateChange const frc (film, shared_from_this());
return DCPTime::from_frames (llrint(video->length_after_3d_combine() * frc.factor()), film->video_frame_rate());
std::string technical_summary () const override;
std::string identifier () const override;
void as_xml (xmlpp::Node* node, bool with_paths) const override;
- dcpomatic::DCPTime full_length (std::shared_ptr<const Film> film) const override;
+ dcpomatic::DCPTime full_length_dcp (std::shared_ptr<const Film> film) const override;
dcpomatic::DCPTime approximate_length () const override;
void add_properties (std::shared_ptr<const Film> film, std::list<UserProperty>& p) const override;
cout << "\n"
<< c->path(0) << "\n"
<< "\tat " << c->position().seconds ()
- << " length " << c->full_length(film).seconds ()
+ << " length " << c->full_length_dcp(film).seconds ()
<< " start trim " << c->trim_start().seconds ()
<< " end trim " << c->trim_end().seconds () << "\n";
string const len = String::compose(
wx_to_std(_("Length: %1 (%2 frames)")),
- time_to_hmsf(dcp->full_length(fv->film()), lrint(*vfr)),
- dcp->full_length(fv->film()).frames_round(*vfr)
+ time_to_hmsf(dcp->full_length_dcp(fv->film()), lrint(*vfr)),
+ dcp->full_length_dcp(fv->film()).frames_round(*vfr)
);
checked_set (_dcp[r++], std_to_wx(len));
{
set<DCPTime> check;
for (auto i: _parent->selected()) {
- check.insert (i->full_length(_parent->film()));
+ check.insert (i->full_length_dcp(_parent->film()));
}
if (check.size() == 1) {
- _full_length->set (_parent->selected().front()->full_length(_parent->film()), _parent->film()->video_frame_rate());
+ _full_length->set (_parent->selected().front()->full_length_dcp(_parent->film()), _parent->film()->video_frame_rate());
} else {
_full_length->clear ();
}
for (auto i: _parent->selected()) {
FrameRateChange const frc = _parent->film()->active_frame_rate_change (i->position ());
i->set_trim_end (
- ContentTime (max(DCPTime(), i->full_length(_parent->film()) - play_length), frc) - i->trim_start()
+ ContentTime (max(DCPTime(), i->full_length_dcp(_parent->film()) - play_length), frc) - i->trim_start()
);
}
}
for (auto i: _parent->selected()) {
if (i->position() < ph && ph < i->end(film)) {
FrameRateChange const frc = film->active_frame_rate_change (i->position ());
- i->set_trim_end (ContentTime(i->position() + i->full_length(film) - ph, frc) - i->trim_start());
+ i->set_trim_end (ContentTime(i->position() + i->full_length_dcp(film) - ph, frc) - i->trim_start());
}
}
}
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
- BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(2).get());
+ BOOST_CHECK_EQUAL (content->full_length_dcp(film).get(), DCPTime::from_seconds(2).get());
content->only_text()->set_use (true);
content->only_text()->set_burn (false);
film->set_video_frame_rate (24);
A->video->set_length (3 * 24);
- BOOST_CHECK (A->full_length(film) == DCPTime::from_frames(3 * 24, 24));
- BOOST_CHECK (B->full_length(film) == DCPTime(289920));
+ BOOST_CHECK (A->full_length_dcp(film) == DCPTime::from_frames(3 * 24, 24));
+ BOOST_CHECK (B->full_length_dcp(film) == DCPTime(289920));
/* Length should be rounded up from B's length to the next video frame */
BOOST_CHECK (film->length() == DCPTime::from_frames(3 * 24 + 1, 24));
auto B = make_shared<FFmpegContent>("test/data/test.mp4");
film->examine_and_add_content (B);
BOOST_REQUIRE (!wait_for_jobs());
- BOOST_CHECK_EQUAL (A->full_length(film).get(), 288000);
+ BOOST_CHECK_EQUAL (A->full_length_dcp(film).get(), 288000);
film->set_reel_type (ReelType::SINGLE);
auto r = film->reels ();
BOOST_CHECK_EQUAL (i->to.get(), 96000 * 3);
++i;
BOOST_CHECK_EQUAL (i->from.get(), 96000 * 3);
- BOOST_CHECK_EQUAL (i->to.get(), sub->full_length(film).ceil(film->video_frame_rate()).get());
+ BOOST_CHECK_EQUAL (i->to.get(), sub->full_length_dcp(film).ceil(film->video_frame_rate()).get());
}
auto ts = dynamic_pointer_cast<StringTextFileContent> (content);
BOOST_REQUIRE (ts);
/* Make sure we got the subtitle data from the file */
- BOOST_REQUIRE_EQUAL (content->full_length(film).get(), 6052032);
+ BOOST_REQUIRE_EQUAL (content->full_length_dcp(film).get(), 6052032);
}
/* 25fps content, 25fps DCP */
film->set_video_frame_rate (25);
- BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(content->video->length() / 25.0).get());
+ BOOST_CHECK_EQUAL (content->full_length_dcp(film).get(), DCPTime::from_seconds(content->video->length() / 25.0).get());
/* 25fps content, 24fps DCP; length should be increased */
film->set_video_frame_rate (24);
- BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(content->video->length() / 24.0).get());
+ BOOST_CHECK_EQUAL (content->full_length_dcp(film).get(), DCPTime::from_seconds(content->video->length() / 24.0).get());
/* 25fps content, 30fps DCP; length should be decreased */
film->set_video_frame_rate (30);
- BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(content->video->length() / 30.0).get());
+ BOOST_CHECK_EQUAL (content->full_length_dcp(film).get(), DCPTime::from_seconds(content->video->length() / 30.0).get());
/* 25fps content, 50fps DCP; length should be the same */
film->set_video_frame_rate (50);
- BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(content->video->length() / 25.0).get());
+ BOOST_CHECK_EQUAL (content->full_length_dcp(film).get(), DCPTime::from_seconds(content->video->length() / 25.0).get());
/* 25fps content, 60fps DCP; length should be decreased */
film->set_video_frame_rate (60);
- BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(content->video->length() * (50.0 / 60) / 25.0).get());
+ BOOST_CHECK_EQUAL (content->full_length_dcp(film).get(), DCPTime::from_seconds(content->video->length() * (50.0 / 60) / 25.0).get());
/* Make the content audio-only */
content->video.reset ();
/* 24fps content, 24fps DCP */
film->set_video_frame_rate (24);
content->set_video_frame_rate (24);
- BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(1).get());
+ BOOST_CHECK_EQUAL (content->full_length_dcp(film).get(), DCPTime::from_seconds(1).get());
/* 25fps content, 25fps DCP */
film->set_video_frame_rate (25);
content->set_video_frame_rate (25);
- BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(1).get());
+ BOOST_CHECK_EQUAL (content->full_length_dcp(film).get(), DCPTime::from_seconds(1).get());
/* 25fps content, 24fps DCP; length should be increased */
film->set_video_frame_rate (24);
- BOOST_CHECK_SMALL (labs (content->full_length(film).get() - DCPTime::from_seconds(25.0 / 24).get()), 2L);
+ BOOST_CHECK_SMALL (labs (content->full_length_dcp(film).get() - DCPTime::from_seconds(25.0 / 24).get()), 2L);
/* 25fps content, 30fps DCP; length should be decreased */
film->set_video_frame_rate (30);
- BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(25.0 / 30).get());
+ BOOST_CHECK_EQUAL (content->full_length_dcp(film).get(), DCPTime::from_seconds(25.0 / 30).get());
/* 25fps content, 50fps DCP; length should be the same */
film->set_video_frame_rate (50);
- BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(1).get());
+ BOOST_CHECK_EQUAL (content->full_length_dcp(film).get(), DCPTime::from_seconds(1).get());
/* 25fps content, 60fps DCP; length should be decreased */
film->set_video_frame_rate (60);
- BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(50.0 / 60).get());
+ BOOST_CHECK_EQUAL (content->full_length_dcp(film).get(), DCPTime::from_seconds(50.0 / 60).get());
}