X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fsubtitle_content.h;h=c29485feeb6796bf1bbe942c0949da96d1fe4501;hb=c719feb3cc4a5627827f8576a9b34756f701d59d;hp=5eb4e500dacd1a7bca230d5bd41b249d110bef63;hpb=f0d79f2ee79becbcb7bc9065155eaa0963a6aa99;p=dcpomatic.git diff --git a/src/lib/subtitle_content.h b/src/lib/subtitle_content.h index 5eb4e500d..c29485fee 100644 --- a/src/lib/subtitle_content.h +++ b/src/lib/subtitle_content.h @@ -37,26 +37,28 @@ public: void as_xml (xmlpp::Node *) const; - void set_subtitle_offset (int); - void set_subtitle_scale (float); + void set_subtitle_offset (double); + void set_subtitle_scale (double); - int subtitle_offset () const { + double subtitle_offset () const { boost::mutex::scoped_lock lm (_mutex); return _subtitle_offset; } - float subtitle_scale () const { + double subtitle_scale () const { boost::mutex::scoped_lock lm (_mutex); return _subtitle_scale; } -private: - /** y offset for placing subtitles, in source pixels; +ve is further down - the frame, -ve is further up. +private: + friend class ffmpeg_pts_offset_test; + + /** y offset for placing subtitles, as a proportion of the container height; + +ve is further down the frame, -ve is further up. */ - int _subtitle_offset; + double _subtitle_offset; /** scale factor to apply to subtitles */ - float _subtitle_scale; + double _subtitle_scale; }; #endif