summaryrefslogtreecommitdiff
path: root/src/lib/decoder.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-10-15 12:42:22 +0100
committerCarl Hetherington <cth@carlh.net>2012-10-15 12:42:22 +0100
commit13511ed2fcc23f4d5f9c507c775c3c5cfd82d155 (patch)
tree5ab1d1600725873a199725e50d67da9791c25d67 /src/lib/decoder.h
parentcb33319a820b17a05cfb2ef78ba1799f4d0c54b9 (diff)
parent43990add893eccf350f280e2dd3f947a94f3e9aa (diff)
Merge branch 'master' of /home/carl/git/dvdomatic
Diffstat (limited to 'src/lib/decoder.h')
-rw-r--r--src/lib/decoder.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/decoder.h b/src/lib/decoder.h
index 04ff512eb..805955b9d 100644
--- a/src/lib/decoder.h
+++ b/src/lib/decoder.h
@@ -37,6 +37,7 @@ class Options;
class Image;
class Log;
class DelayLine;
+class Subtitle;
/** @class Decoder.
* @brief Parent class for decoders of content.
@@ -66,6 +67,7 @@ public:
/** @return format of audio samples */
virtual AVSampleFormat audio_sample_format () const = 0;
virtual int64_t audio_channel_layout () const = 0;
+ virtual bool has_subtitles () const = 0;
void process_begin ();
bool pass ();
@@ -80,8 +82,9 @@ public:
/** Emitted when a video frame is ready.
* First parameter is the frame.
* Second parameter is its index within the content.
+ * Third parameter is either 0 or a subtitle that should be on this frame.
*/
- sigc::signal<void, boost::shared_ptr<Image>, int> Video;
+ sigc::signal<void, boost::shared_ptr<Image>, int, boost::shared_ptr<Subtitle> > Video;
/** Emitted when some audio data is ready.
* First parameter is the interleaved sample data, format is given in the FilmState.
@@ -100,6 +103,7 @@ protected:
void process_video (AVFrame *);
void process_audio (uint8_t *, int);
+ void process_subtitle (boost::shared_ptr<Subtitle>);
/** our FilmState */
boost::shared_ptr<const FilmState> _fs;
@@ -135,6 +139,8 @@ private:
(at the DCP sample rate).
*/
int64_t _audio_frames_processed;
+
+ boost::shared_ptr<Subtitle> _subtitle;
};
#endif