summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-10-14 21:06:47 +0100
committerCarl Hetherington <cth@carlh.net>2012-10-14 21:06:47 +0100
commit009a58293bf2e9727d544d1a2648422cc395d81e (patch)
treec581d457104195a0219a0197c523981756bf9ecd /src/lib/ffmpeg_decoder.h
parentb5001080a3e5b414f6cad1c52926ed757f2d8574 (diff)
parentade28a703b15af710161faa017cddf95d66c4118 (diff)
Merge branch 'subs'
Diffstat (limited to 'src/lib/ffmpeg_decoder.h')
-rw-r--r--src/lib/ffmpeg_decoder.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/ffmpeg_decoder.h b/src/lib/ffmpeg_decoder.h
index 4e5445f67..d34c22785 100644
--- a/src/lib/ffmpeg_decoder.h
+++ b/src/lib/ffmpeg_decoder.h
@@ -44,6 +44,7 @@ class FilmState;
class Options;
class Image;
class Log;
+class Subtitle;
/** @class FFmpegDecoder
* @brief A decoder using FFmpeg to decode content.
@@ -63,6 +64,7 @@ public:
int audio_sample_rate () const;
AVSampleFormat audio_sample_format () const;
int64_t audio_channel_layout () const;
+ bool has_subtitles () const;
private:
@@ -76,16 +78,22 @@ private:
void setup_general ();
void setup_video ();
void setup_audio ();
+ void setup_subtitle ();
+
+ void maybe_add_subtitle ();
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;
AVCodecContext* _video_codec_context;
AVCodec* _video_codec;
- AVCodecContext* _audio_codec_context; ///< may be 0 if there is no audio
- AVCodec* _audio_codec; ///< may be 0 if there is no audio
+ AVCodecContext* _audio_codec_context; ///< may be 0 if there is no audio
+ AVCodec* _audio_codec; ///< may be 0 if there is no audio
+ AVCodecContext* _subtitle_codec_context; ///< may be 0 if there is no subtitle
+ AVCodec* _subtitle_codec; ///< may be 0 if there is no subtitle
AVPacket _packet;
};