return true;
}
- float const vfr = _dcp_content->video_frame_rate ();
+ double const vfr = _dcp_content->video_frame_rate ();
int64_t const frame = _next.frames (vfr);
if ((*_reel)->main_picture ()) {
/* XXX: inefficient */
list<ContentTimePeriod> ctp;
- float const vfr = _dcp_content->video_frame_rate ();
+ double const vfr = _dcp_content->video_frame_rate ();
BOOST_FOREACH (shared_ptr<dcp::Reel> r, _reels) {
if (!r->main_subtitle ()) {
/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
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
using std::string;
static bool
-about_equal (float a, float b)
+about_equal (double a, double b)
{
/* A film of F seconds at f FPS will be Ff frames;
Consider some delta FPS d, so if we run the same
}
-FrameRateChange::FrameRateChange (float source_, int dcp_)
+FrameRateChange::FrameRateChange (double source_, int dcp_)
: source (source_)
, dcp (dcp_)
, skip (false)
}
if (change_speed) {
- float const pc = dcp * 100 / (source * factor());
+ double const pc = dcp * 100 / (source * factor());
description += String::compose (_("DCP will run at %1%% of the content speed.\n"), pc);
}
}
/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
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
struct FrameRateChange
{
- FrameRateChange (float, int);
+ FrameRateChange (double, int);
/** @return factor by which to multiply a source frame rate
to get the effective rate after any skip or repeat has happened.
*/
- float factor () const {
+ double factor () const {
if (skip) {
return 0.5;
}
return repeat;
}
- float source;
+ double source;
int dcp;
/** true to skip every other frame */
/** Amount by which the video is being sped-up in the DCP; e.g. for a
* 24fps source in a 25fps DCP this would be 25/24.
*/
- float speed_up;
+ double speed_up;
std::string description () const;
};
layout ();
}
-float
+double
ImageSequenceDialog::frame_rate () const
{
try {
- return raw_convert<float> (wx_to_std (_frame_rate->GetValue ()));
+ return raw_convert<double> (wx_to_std (_frame_rate->GetValue ()));
} catch (...) {
}
public:
ImageSequenceDialog (wxWindow* parent);
- float frame_rate () const;
+ double frame_rate () const;
private:
wxTextCtrl* _frame_rate;
}
if (property == VideoContentProperty::VIDEO_FRAME_RATE) {
- set<float> check;
+ set<double> check;
shared_ptr<VideoContent> vc;
for (ContentList::const_iterator i = cl.begin (); i != cl.end(); ++i) {
shared_ptr<VideoContent> t = dynamic_pointer_cast<VideoContent> (*i);
for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (*i);
if (vc) {
- vc->set_video_frame_rate (raw_convert<float> (wx_to_std (_video_frame_rate->GetValue ())));
+ vc->set_video_frame_rate (raw_convert<double> (wx_to_std (_video_frame_rate->GetValue ())));
}
_set_video_frame_rate->Enable (false);
}
}
wxString
-time_to_timecode (DCPTime t, float fps)
+time_to_timecode (DCPTime t, double fps)
{
double w = t.seconds ();
int const h = (w / 3600);
extern void dcpomatic_setup_i18n ();
extern wxString context_translation (wxString);
extern std::string string_client_data (wxClientData* o);
-extern wxString time_to_timecode (DCPTime t, float fps);
+extern wxString time_to_timecode (DCPTime t, double fps);
extern void checked_set (wxFilePickerCtrl* widget, std::string value);
extern void checked_set (wxSpinCtrl* widget, int value);