diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-05-05 14:06:47 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-05-05 14:06:47 +0100 |
| commit | 9f8bdc77426b15f1f89110118ccb5c9903228351 (patch) | |
| tree | 4684babffe03b8642fc75c6303287a3138a093fc /src/lib/player.h | |
| parent | 7fe0f3035f13d306d38c63740674e4fc2f652052 (diff) | |
Keep active subtitles around until the video they are on has been emitted.
Diffstat (limited to 'src/lib/player.h')
| -rw-r--r-- | src/lib/player.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/lib/player.h b/src/lib/player.h index 719e42895..18b47043a 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -152,7 +152,8 @@ private: AudioMerger _audio_merger; - class StreamState { + class StreamState + { public: StreamState () {} @@ -169,8 +170,22 @@ private: std::list<DCPTimePeriod> _no_video; std::list<DCPTimePeriod> _no_audio; - typedef std::map<boost::weak_ptr<Piece>, std::pair<PlayerSubtitles, DCPTime> > ActiveSubtitles; - ActiveSubtitles _active_subtitles; + class ActiveSubtitles + { + public: + ActiveSubtitles () {} + + ActiveSubtitles (PlayerSubtitles s, DCPTime f) + : subs (s) + , from (f) + {} + + PlayerSubtitles subs; + DCPTime from; + boost::optional<DCPTime> to; + }; + typedef std::map<boost::weak_ptr<Piece>, ActiveSubtitles> ActiveSubtitlesMap; + ActiveSubtitlesMap _active_subtitles; boost::shared_ptr<AudioProcessor> _audio_processor; typedef std::map<std::pair<boost::shared_ptr<const AudioContent>, AudioStreamPtr>, boost::shared_ptr<Resampler> > ResamplerMap; |
