diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-01-15 21:23:33 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-01-15 21:23:33 +0000 |
| commit | 8353a009aae1a604251c0160193c39741c2fa27c (patch) | |
| tree | 558d2b1951f2b4f05f0ab93b46d10afd0ebee929 /src/lib/audio_decoder.h | |
| parent | d0bca7d33b8101cd87f78d5a76b2512dea3988f8 (diff) | |
| parent | 4e5d5c7dcc6470b8dc918d03a00e30c07df60efe (diff) | |
Merge 1.0-seek and subtitle-content.
Diffstat (limited to 'src/lib/audio_decoder.h')
| -rw-r--r-- | src/lib/audio_decoder.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/lib/audio_decoder.h b/src/lib/audio_decoder.h index ab6c4b8a9..bb3aafccd 100644 --- a/src/lib/audio_decoder.h +++ b/src/lib/audio_decoder.h @@ -27,8 +27,10 @@ #include "decoder.h" #include "content.h" #include "audio_content.h" +#include "decoded.h" class AudioBuffers; +class Resampler; /** @class AudioDecoder. * @brief Parent class for audio decoders. @@ -37,17 +39,21 @@ class AudioDecoder : public virtual Decoder { public: AudioDecoder (boost::shared_ptr<const Film>, boost::shared_ptr<const AudioContent>); + + boost::shared_ptr<const AudioContent> audio_content () const { + return _audio_content; + } - bool has_audio () const; - - /** Emitted when some audio data is ready */ - boost::signals2::signal<void (boost::shared_ptr<const AudioBuffers>, AudioContent::Frame)> Audio; - + void seek (ContentTime time, bool accurate); + protected: - void audio (boost::shared_ptr<const AudioBuffers>, AudioContent::Frame); + void audio (boost::shared_ptr<const AudioBuffers>, ContentTime); + void flush (); + boost::shared_ptr<const AudioContent> _audio_content; - AudioContent::Frame _audio_position; + boost::shared_ptr<Resampler> _resampler; + boost::optional<AudioFrame> _audio_position; }; #endif |
