summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-10-17 13:47:50 +0100
committerCarl Hetherington <cth@carlh.net>2012-10-17 13:47:50 +0100
commit4dfce74792c3ea55ecf2479568f76d7e54b826e0 (patch)
treed21aa7e386be12027239c4a1f5a25e6f42d04b8b /src/lib/ffmpeg_decoder.h
parent91e8c79235abccac95c63952192fd63840727f99 (diff)
Basic support for selection of audio / subtitle streams.
Diffstat (limited to 'src/lib/ffmpeg_decoder.h')
-rw-r--r--src/lib/ffmpeg_decoder.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/ffmpeg_decoder.h b/src/lib/ffmpeg_decoder.h
index ec822bf79..9abc7f49a 100644
--- a/src/lib/ffmpeg_decoder.h
+++ b/src/lib/ffmpeg_decoder.h
@@ -39,6 +39,7 @@ struct AVFormatContext;
struct AVFrame;
struct AVBufferContext;
struct AVCodec;
+struct AVStream;
class Job;
class FilmState;
class Options;
@@ -65,6 +66,12 @@ public:
int64_t audio_channel_layout () const;
bool has_subtitles () const;
+ std::vector<Stream> audio_streams () const;
+ std::vector<Stream> subtitle_streams () const;
+
+ void set_audio_stream (int id);
+ void set_subtitle_stream (int id);
+
private:
bool do_pass ();
@@ -81,11 +88,16 @@ private:
void maybe_add_subtitle ();
+ std::string stream_name (AVStream* s) const;
+
AVFormatContext* _format_context;
int _video_stream;
int _audio_stream; ///< may be < 0 if there is no audio
int _subtitle_stream; ///< may be < 0 if there is no subtitle
AVFrame* _frame;
+
+ std::vector<Stream> _audio_streams;
+ std::vector<Stream> _subtitle_streams;
AVCodecContext* _video_codec_context;
AVCodec* _video_codec;