X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdecoder.h;h=85b256f5bbe592629b8dad0c2b9c12396816aa73;hb=6e8e4f7ae9a9ae243a1b7d9e17f6b6cacae277b3;hp=8a04ec9f2d77d4a553c80cf8f830d391bd383ec5;hpb=63b7da59cee71ab2ade744a8b547b5d8f2ff6bfc;p=dcpomatic.git diff --git a/src/lib/decoder.h b/src/lib/decoder.h index 8a04ec9f2..85b256f5b 100644 --- a/src/lib/decoder.h +++ b/src/lib/decoder.h @@ -30,6 +30,7 @@ #include #include #include "util.h" +#include "stream.h" class Job; class FilmState; @@ -79,6 +80,17 @@ public: int last_video_frame () const { return _video_frame; } + + virtual std::vector audio_streams () const { + return std::vector (); + } + + virtual std::vector subtitle_streams () const { + return std::vector (); + } + + virtual void set_audio_stream (Stream s) {} + virtual void set_subtitle_stream (Stream s) {} /** Emitted when a video frame is ready. * First parameter is the frame. @@ -87,11 +99,8 @@ public: */ sigc::signal, int, boost::shared_ptr > Video; - /** Emitted when some audio data is ready. - * First parameter is the interleaved sample data, format is given in the FilmState. - * Second parameter is the size of the data. - */ - sigc::signal Audio; + /** Emitted when some audio data is ready */ + sigc::signal > Audio; protected: /** perform a single pass at our content */ @@ -125,6 +134,8 @@ protected: private: void setup_video_filters (); + void emit_audio (uint8_t* data, int size); + int bytes_per_audio_sample () const; /** last video frame to be processed */ int _video_frame;