<< "_" << j2k_bandwidth()
<< "_" << lexical_cast<int> (colour_lut());
- if (trim_type() == ENCODE) {
- s << "_" << trim_start() << "_" << trim_end();
- }
-
if (ab()) {
pair<string, string> fa = Filter::ffmpeg_strings (Config::instance()->reference_filters());
s << "ab_" << Config::instance()->reference_scaler()->id() << "_" << fa.first << "_" << fa.second;
* in the coordinate space of the source.
* @param subtitle_scale scaling factor to apply to the subtitle image.
*/
-dvdomatic::Rect
+dcpomatic::Rect
subtitle_transformed_area (
float target_x_scale, float target_y_scale,
- dvdomatic::Rect sub_area, int subtitle_offset, float subtitle_scale
+ dcpomatic::Rect sub_area, int subtitle_offset, float subtitle_scale
)
{
- dvdomatic::Rect tx;
+ dcpomatic::Rect tx;
sub_area.y += subtitle_offset;
}
/** @return area that this subtitle takes up, in the original uncropped source's coordinate space */
-dvdomatic::Rect
+dcpomatic::Rect
Subtitle::area () const
{
- return dvdomatic::Rect (_position.x, _position.y, _image->size().width, _image->size().height);
+ return dcpomatic::Rect (_position.x, _position.y, _image->size().width, _image->size().height);
}
return _image;
}
- dvdomatic::Rect area () const;
+ dcpomatic::Rect area () const;
private:
Position _position;
boost::shared_ptr<Image> _image;
};
-dvdomatic::Rect
+dcpomatic::Rect
subtitle_transformed_area (
float target_x_scale, float target_y_scale,
- dvdomatic::Rect sub_area, int subtitle_offset, float subtitle_scale
+ dcpomatic::Rect sub_area, int subtitle_offset, float subtitle_scale
);
/** A Subtitle class with details of the time over which it should be shown */
/** @param other A Rect.
* @return The intersection of this with `other'.
*/
-Rect
-Rect::intersection (Rect const & other) const
+dcpomatic::Rect
+dcpomatic::Rect::intersection (Rect const & other) const
{
int const tx = max (x, other.x);
int const ty = max (y, other.y);
}
bool
-Rect::contains (Position p) const
+dcpomatic::Rect::contains (Position p) const
{
return (p.x >= x && p.x <= (x + width) && p.y >= y && p.y <= (y + height));
}
int y;
};
+namespace dcpomatic {
+
/** @struct Rect
* @brief A rectangle.
*/
bool contains (Position) const;
};
+}
+
#endif
}
if (sub) {
- Rect const tx = subtitle_transformed_area (
+ dcpomatic::Rect const tx = subtitle_transformed_area (
float (image_size.width) / video_size().width,
float (image_size.height) / video_size().height,
sub->area(), film->subtitle_offset(), film->subtitle_scale()
_timeline.force_redraw (bbox ());
}
- virtual Rect bbox () const = 0;
+ virtual dcpomatic::Rect bbox () const = 0;
protected:
virtual void do_paint (wxGraphicsContext *) = 0;
Timeline& _timeline;
private:
- Rect _last_paint_bbox;
+ dcpomatic::Rect _last_paint_bbox;
};
class ContentView : public View
_content_connection = c->Changed.connect (bind (&ContentView::content_changed, this, _2));
}
- Rect bbox () const
+ dcpomatic::Rect bbox () const
{
shared_ptr<const Film> film = _timeline.film ();
shared_ptr<const Content> content = _content.lock ();
if (!film || !content) {
- return Rect ();
+ return dcpomatic::Rect ();
}
- return Rect (
+ return dcpomatic::Rect (
time_x (content->start ()) - 8,
y_pos (_track) - 8,
content->length () * _timeline.pixels_per_time_unit() + 16,
, _y (y)
{}
- Rect bbox () const
+ dcpomatic::Rect bbox () const
{
- return Rect (0, _y - 4, _timeline.width(), 24);
+ return dcpomatic::Rect (0, _y - 4, _timeline.width(), 24);
}
void set_y (int y)
}
void
-Timeline::force_redraw (Rect const & r)
+Timeline::force_redraw (dcpomatic::Rect const & r)
{
RefreshRect (wxRect (r.x, r.y, r.width, r.height), false);
}
boost::shared_ptr<const Film> film () const;
- void force_redraw (Rect const &);
+ void force_redraw (dcpomatic::Rect const &);
int x_offset () const {
return 8;
{
shared_ptr<Film> film = new_test_film ("make_dcp_test");
film->set_name ("test_film2");
- film->examine_and_add_content (shared_ptr<FFmpegContent> (new FFmpegContent (film, "test/data/test.mp4")));
+ shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4"));
+ c->set_ratio (Ratio::from_id ("185"));
+ film->examine_and_add_content (c);
/* Wait for the examine to finish */
while (JobManager::instance()->work_to_do ()) {