diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-15 23:19:27 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-15 23:19:27 +0100 |
| commit | e946a66554185459043af2a8bdae575e255c743d (patch) | |
| tree | 42d7ee7da6f6646f91b5429ed20fe84db92387d8 /src/lib/subtitle.h | |
| parent | 43990add893eccf350f280e2dd3f947a94f3e9aa (diff) | |
Unholy melange of stuff; setup a standard test config; send / receive subs to / from servers; various other image stride-related fixes.
Diffstat (limited to 'src/lib/subtitle.h')
| -rw-r--r-- | src/lib/subtitle.h | 38 |
1 files changed, 13 insertions, 25 deletions
diff --git a/src/lib/subtitle.h b/src/lib/subtitle.h index 6fd0d8772..ef9571ad4 100644 --- a/src/lib/subtitle.h +++ b/src/lib/subtitle.h @@ -22,39 +22,16 @@ #include "util.h" struct AVSubtitle; -class SubtitleImage; class Image; -class FilmState; class Subtitle { public: Subtitle (AVSubtitle const &); + Subtitle (Position p, boost::shared_ptr<Image> i); bool displayed_at (double t); - std::list<boost::shared_ptr<SubtitleImage> > images () const { - return _images; - } - -private: - /** display from time in seconds from the start of the film */ - double _from; - /** display to time in seconds from the start of the film */ - double _to; - std::list<boost::shared_ptr<SubtitleImage> > _images; -}; - -extern Rectangle transformed_subtitle_area ( - float target_x_scale, float target_y_scale, - Rectangle sub_area, int subtitle_offset, float subtitle_scale - ); - -class SubtitleImage -{ -public: - SubtitleImage (AVSubtitleRect const *); - void set_position (Position p) { _position = p; } @@ -68,8 +45,19 @@ public: } Rectangle area () const; - + private: + /** display from time in seconds from the start of the film */ + double _from; + /** display to time in seconds from the start of the film */ + double _to; Position _position; boost::shared_ptr<Image> _image; }; + +Rectangle +subtitle_transformed_area ( + float target_x_scale, float target_y_scale, + Rectangle sub_area, int subtitle_offset, float subtitle_scale + ); + |
