-
-private:
- /** y offset for placing subtitles, in source pixels; +ve is further down
- the frame, -ve is further up.
- */
- int _subtitle_offset;
- /** scale factor to apply to subtitles */
- float _subtitle_scale;
+
+ double subtitle_y_scale () const {
+ boost::mutex::scoped_lock lm (_mutex);
+ return _subtitle_y_scale;
+ }
+
+ std::list<boost::shared_ptr<Font> > fonts () const {
+ boost::mutex::scoped_lock lm (_mutex);
+ return _fonts;
+ }
+
+ std::string subtitle_language () const {
+ boost::mutex::scoped_lock lm (_mutex);
+ return _subtitle_language;
+ }
+
+protected:
+ /** subtitle language (e.g. "German") or empty if it is not known */
+ std::string _subtitle_language;
+
+private:
+ friend struct ffmpeg_pts_offset_test;
+ void font_changed ();
+ void connect_to_fonts ();
+
+ bool _use_subtitles;
+ bool _burn_subtitles;
+ /** x offset for placing subtitles, as a proportion of the container width;
+ * +ve is further right, -ve is further left.
+ */
+ double _subtitle_x_offset;
+ /** y offset for placing subtitles, as a proportion of the container height;
+ * +ve is further down the frame, -ve is further up.
+ */
+ double _subtitle_y_offset;
+ /** x scale factor to apply to subtitles */
+ double _subtitle_x_scale;
+ /** y scale factor to apply to subtitles */
+ double _subtitle_y_scale;
+ std::list<boost::shared_ptr<Font> > _fonts;
+ std::list<boost::signals2::connection> _font_connections;