diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-11-17 22:06:12 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-11-17 22:06:12 +0000 |
| commit | cafa76a2b52449ce3c9eecfd0ea53b7318814951 (patch) | |
| tree | 81fe66f74256a54eb50f398790f2eea010bb3113 /src/lib/ffmpeg_decoder.h | |
| parent | 40532d61ea4909b3f8b12dd7024de217dbdfec6d (diff) | |
Another attempt to do external audio moderately nicely.
Diffstat (limited to 'src/lib/ffmpeg_decoder.h')
| -rw-r--r-- | src/lib/ffmpeg_decoder.h | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/src/lib/ffmpeg_decoder.h b/src/lib/ffmpeg_decoder.h index a4a9246f0..87eebe1ec 100644 --- a/src/lib/ffmpeg_decoder.h +++ b/src/lib/ffmpeg_decoder.h @@ -48,6 +48,36 @@ class Options; class Image; class Log; +class FFmpegAudioStream : public AudioStream +{ +public: + FFmpegAudioStream (std::string n, int i, int s, int64_t c) + : AudioStream (s, c) + , _name (n) + , _id (i) + {} + + std::string to_string () const; + + std::string name () const { + return _name; + } + + int id () const { + return _id; + } + + static boost::shared_ptr<FFmpegAudioStream> create (std::string t, boost::optional<int> v); + +private: + friend class stream_test; + + FFmpegAudioStream (std::string t, boost::optional<int> v); + + std::string _name; + int _id; +}; + /** @class FFmpegDecoder * @brief A decoder using FFmpeg to decode content. */ @@ -64,8 +94,8 @@ public: int sample_aspect_ratio_numerator () const; int sample_aspect_ratio_denominator () const; - void set_audio_stream (boost::optional<AudioStream>); - void set_subtitle_stream (boost::optional<SubtitleStream>); + void set_audio_stream (boost::shared_ptr<AudioStream>); + void set_subtitle_stream (boost::shared_ptr<SubtitleStream>); private: |
