borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="1.1598677"
- inkscape:cx="652.92066"
- inkscape:cy="674.81101"
+ inkscape:zoom="3.0258297"
+ inkscape:cx="295.32748"
+ inkscape:cy="1324.6833"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
- inkscape:window-width="1366"
- inkscape:window-height="714"
+ inkscape:window-width="1280"
+ inkscape:window-height="997"
inkscape:window-x="1280"
- inkscape:window-y="283"
+ inkscape:window-y="0"
inkscape:window-maximized="1"
showguides="true"
inkscape:guide-bbox="true" />
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
+ <dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
id="path6726-3"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
- <path
- style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1, 4;stroke-dashoffset:0"
- d="m 623.11641,26.2839 0,431.46391"
- id="path7445"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cc" />
+ <rect
+ style="color:#000000;fill:none;stroke:#0000ff;stroke-width:0.99999988px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="rect2985-0-3"
+ width="139"
+ height="98.153183"
+ x="193.67656"
+ y="-344.28204" />
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#0000ff;fill-opacity:1;stroke:none;font-family:Latin Modern Mono;-inkscape-font-specification:Latin Modern Mono"
+ x="202.67656"
+ y="-328.79272"
+ id="text2987-4-2"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan2989-9-1"
+ x="202.67656"
+ y="-328.79272">Class</tspan></text>
+ <rect
+ style="color:#000000;fill:none;stroke:#0000ff;stroke-width:0.99999988px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="rect2991-8-1"
+ width="139"
+ height="24"
+ x="193.67656"
+ y="-344.28204" />
+ <text
+ xml:space="preserve"
+ style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;font-family:Latin Modern Mono;-inkscape-font-specification:Latin Modern Mono"
+ x="203.29256"
+ y="-278.13858"
+ id="text2993-9-50"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ x="203.29256"
+ y="-278.13858"
+ id="tspan2997-9-6">method()</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#008000;fill-opacity:1;stroke:none;font-family:Latin Modern Roman;-inkscape-font-specification:Latin Modern Roman"
+ x="202.94057"
+ y="-264.99423"
+ id="text2999-7-6"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ x="202.94057"
+ y="-264.99423"
+ id="tspan6126-5">Method description</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:8px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:125%;letter-spacing:0px;word-spacing:0px;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000080;fill-opacity:1;fill-rule:nonzero;stroke:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Latin Modern Roman;-inkscape-font-specification:Latin Modern Roman"
+ x="202.78856"
+ y="-305.98245"
+ id="text3438"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan3440"
+ x="202.78856"
+ y="-305.98245">Class description.</tspan></text>
+ <rect
+ style="color:#000000;fill:none;stroke:#0000ff;stroke-width:0.99999988px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="rect2991-8-1-2"
+ width="139"
+ height="24"
+ x="193.67656"
+ y="-320.29883" />
</g>
<g
inkscape:groupmode="layer"
public:
DCPExaminer (boost::shared_ptr<const DCPContent>);
- boost::optional<float> video_frame_rate () const {
+ boost::optional<double> video_frame_rate () const {
return _video_frame_rate;
}
}
private:
- boost::optional<float> _video_frame_rate;
+ boost::optional<double> _video_frame_rate;
boost::optional<dcp::Size> _video_size;
Frame _video_length;
boost::optional<int> _audio_channels;
return t;
}
-optional<float>
+optional<double>
FFmpegExaminer::video_frame_rate () const
{
/* This use of r_frame_rate is debateable; there's a few different
return max (Frame (1), _video_length);
}
-optional<float>
+optional<double>
FFmpegExaminer::sample_aspect_ratio () const
{
AVRational sar = av_guess_sample_aspect_ratio (_format_context, _format_context->streams[_video_stream], 0);
if (sar.num == 0) {
/* I assume this means that we don't know */
- return optional<float> ();
+ return optional<double> ();
}
- return float (sar.num) / sar.den;
+ return double (sar.num) / sar.den;
}
string
public:
FFmpegExaminer (boost::shared_ptr<const FFmpegContent>, boost::shared_ptr<Job> job = boost::shared_ptr<Job> ());
- boost::optional<float> video_frame_rate () const;
+ boost::optional<double> video_frame_rate () const;
dcp::Size video_size () const;
Frame video_length () const;
- boost::optional<float> sample_aspect_ratio () const;
+ boost::optional<double> sample_aspect_ratio () const;
std::vector<boost::shared_ptr<FFmpegSubtitleStream> > subtitle_streams () const {
return _subtitle_streams;
return _video_size.get ();
}
-optional<float>
+optional<double>
ImageExaminer::video_frame_rate () const
{
/* Don't know */
- return optional<float> ();
+ return optional<double> ();
}
public:
ImageExaminer (boost::shared_ptr<const Film>, boost::shared_ptr<const ImageContent>, boost::shared_ptr<Job>);
- boost::optional<float> video_frame_rate () const;
+ boost::optional<double> video_frame_rate () const;
dcp::Size video_size () const;
Frame video_length () const {
return _video_length;
shared_ptr<const ImageProxy> (new RawImageProxy (_black_image)),
time,
Crop (),
- optional<float> (),
+ optional<double> (),
_video_container_size,
_video_container_size,
EYES_BOTH,
shared_ptr<const VideoContent> vc = dynamic_pointer_cast<const VideoContent> (piece->content);
DCPTime s = t - piece->content->position ();
s = min (piece->content->length_after_trim(), s);
+ std::cout << "s=" << s << " " << ContentTime(s, piece->frc) << "\n";
+ std::cout << (ContentTime (s, piece->frc) + piece->content->trim_start ()) << "\n";
+ std::cout << s.get() << "\n";
+ std::cout << (s.get() * 24.0 / 96000) << "\n";
return max (ContentTime (), ContentTime (s, piece->frc) + piece->content->trim_start ()).frames (vc->video_frame_rate ());
}
shared_ptr<const ImageProxy> in,
DCPTime time,
Crop crop,
- boost::optional<float> fade,
+ boost::optional<double> fade,
dcp::Size inter_size,
dcp::Size out_size,
Eyes eyes,
{
_time = DCPTime (node->number_child<DCPTime::Type> ("Time"));
_crop = Crop (node);
- _fade = node->optional_number_child<float> ("Fade");
+ _fade = node->optional_number_child<double> ("Fade");
_inter_size = dcp::Size (node->number_child<int> ("InterWidth"), node->number_child<int> ("InterHeight"));
_out_size = dcp::Size (node->number_child<int> ("OutWidth"), node->number_child<int> ("OutHeight"));
boost::shared_ptr<const ImageProxy>,
DCPTime,
Crop,
- boost::optional<float>,
+ boost::optional<double>,
dcp::Size,
dcp::Size,
Eyes,
boost::shared_ptr<const ImageProxy> _in;
DCPTime _time;
Crop _crop;
- boost::optional<float> _fade;
+ boost::optional<double> _fade;
dcp::Size _inter_size;
dcp::Size _out_size;
Eyes _eyes;
{
_video_size.width = node->number_child<int> ("VideoWidth");
_video_size.height = node->number_child<int> ("VideoHeight");
- _video_frame_rate = node->number_child<float> ("VideoFrameRate");
+ _video_frame_rate = node->number_child<double> ("VideoFrameRate");
_video_length = node->number_child<Frame> ("VideoLength");
_video_frame_type = static_cast<VideoFrameType> (node->number_child<int> ("VideoFrameType"));
- _sample_aspect_ratio = node->optional_number_child<float> ("SampleAspectRatio");
+ _sample_aspect_ratio = node->optional_number_child<double> ("SampleAspectRatio");
_crop.left = node->number_child<int> ("LeftCrop");
_crop.right = node->number_child<int> ("RightCrop");
_crop.top = node->number_child<int> ("TopCrop");
{
/* These examiner calls could call other content methods which take a lock on the mutex */
dcp::Size const vs = d->video_size ();
- optional<float> const vfr = d->video_frame_rate ();
+ optional<double> const vfr = d->video_frame_rate ();
Frame vl = d->video_length ();
- optional<float> const ar = d->sample_aspect_ratio ();
+ optional<double> const ar = d->sample_aspect_ratio ();
{
boost::mutex::scoped_lock lm (_mutex);
/* Guess correct scale from size and sample aspect ratio */
_scale = VideoContentScale (
- Ratio::nearest_from_ratio (float (_video_size.width) * ar.get_value_or (1) / _video_size.height)
+ Ratio::nearest_from_ratio (double (_video_size.width) * ar.get_value_or (1) / _video_size.height)
);
}
}
void
-VideoContent::set_video_frame_rate (float r)
+VideoContent::set_video_frame_rate (double r)
{
{
boost::mutex::scoped_lock lm (_mutex);
signal_changed (VideoContentProperty::VIDEO_FRAME_RATE);
}
-optional<float>
+optional<double>
VideoContent::fade (Frame f) const
{
DCPOMATIC_ASSERT (f >= 0);
if (f < fade_in()) {
- return float (f) / fade_in();
+ return double (f) / fade_in();
}
Frame fade_out_start = video_length() - fade_out();
if (f >= fade_out_start) {
- return 1 - float (f - fade_out_start) / fade_out();
+ return 1 - double (f - fade_out_start) / fade_out();
}
- return optional<float> ();
+ return optional<double> ();
}
string
);
- float ratio = video_size_after_3d_split().ratio ();
+ double ratio = video_size_after_3d_split().ratio ();
if (sample_aspect_ratio ()) {
d << ", " << _("pixel aspect ratio") << " " << fixed << setprecision(2) << sample_aspect_ratio().get () << ":1";
return _video_size;
}
- float video_frame_rate () const {
+ double video_frame_rate () const {
boost::mutex::scoped_lock lm (_mutex);
return _video_frame_rate;
}
void set_video_frame_type (VideoFrameType);
- void set_video_frame_rate (float);
+ void set_video_frame_rate (double);
void set_left_crop (int);
void set_right_crop (int);
return _colour_conversion;
}
- boost::optional<float> sample_aspect_ratio () const {
+ boost::optional<double> sample_aspect_ratio () const {
boost::mutex::scoped_lock lm (_mutex);
return _sample_aspect_ratio;
}
ContentTime dcp_time_to_content_time (DCPTime) const;
- boost::optional<float> fade (Frame) const;
+ boost::optional<double> fade (Frame) const;
void scale_and_crop_to_fit_width ();
void scale_and_crop_to_fit_height ();
void add_properties (std::list<std::pair<std::string, std::string> > &) const;
Frame _video_length;
- float _video_frame_rate;
+ double _video_frame_rate;
boost::optional<ColourConversion> _colour_conversion;
private:
/** Sample aspect ratio obtained from the content file's header,
if there is one.
*/
- boost::optional<float> _sample_aspect_ratio;
+ boost::optional<double> _sample_aspect_ratio;
Frame _fade_in;
Frame _fade_out;
};
{
public:
virtual ~VideoExaminer () {}
- virtual boost::optional<float> video_frame_rate () const = 0;
+ virtual boost::optional<double> video_frame_rate () const = 0;
virtual dcp::Size video_size () const = 0;
virtual Frame video_length () const = 0;
- virtual boost::optional<float> sample_aspect_ratio () const {
- return boost::optional<float> ();
+ virtual boost::optional<double> sample_aspect_ratio () const {
+ return boost::optional<double> ();
}
};
shared_ptr<ImageProxy> (new RawImageProxy (image)),
DCPTime (),
Crop (),
- optional<float> (),
+ optional<double> (),
dcp::Size (1998, 1080),
dcp::Size (1998, 1080),
EYES_BOTH,
shared_ptr<ImageProxy> (new RawImageProxy (image)),
DCPTime (),
Crop (),
- optional<float> (),
+ optional<double> (),
dcp::Size (1998, 1080),
dcp::Size (1998, 1080),
EYES_BOTH,