From cafa76a2b52449ce3c9eecfd0ea53b7318814951 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 17 Nov 2012 22:06:12 +0000 Subject: Another attempt to do external audio moderately nicely. --- src/lib/ffmpeg_decoder.h | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'src/lib/ffmpeg_decoder.h') 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 create (std::string t, boost::optional v); + +private: + friend class stream_test; + + FFmpegAudioStream (std::string t, boost::optional 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); - void set_subtitle_stream (boost::optional); + void set_audio_stream (boost::shared_ptr); + void set_subtitle_stream (boost::shared_ptr); private: -- cgit v1.2.3