diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-11-12 21:04:06 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-11-12 21:04:06 +0000 |
| commit | 17cea71c34ed6bdba67aac8614572c7511844c2a (patch) | |
| tree | 41464576c5e2e6ab360789faf4b5fcc4358ee556 /src/lib/decoder.h | |
| parent | 13b935067e892875ea9e76c3d63fcc11d2c429b0 (diff) | |
Untested; more movement of stuff out of decoder.
Diffstat (limited to 'src/lib/decoder.h')
| -rw-r--r-- | src/lib/decoder.h | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/lib/decoder.h b/src/lib/decoder.h index d0e20b03a..71dfed1e0 100644 --- a/src/lib/decoder.h +++ b/src/lib/decoder.h @@ -31,6 +31,8 @@ #include <boost/signals2.hpp> #include "util.h" #include "stream.h" +#include "video_source.h" +#include "audio_source.h" class Job; class Options; @@ -49,11 +51,11 @@ class FilterGraph; * (by calling ::go), and they emit signals when video or audio data is ready for something else * to process. */ -class Decoder +class Decoder : public VideoSource, public AudioSource { public: Decoder (boost::shared_ptr<Film>, boost::shared_ptr<const Options>, Job *); - virtual ~Decoder (); + virtual ~Decoder () {} /* Methods to query our input video */ @@ -67,9 +69,7 @@ public: virtual int sample_aspect_ratio_numerator () const = 0; virtual int sample_aspect_ratio_denominator () const = 0; - void process_begin (); virtual bool pass () = 0; - void process_end (); void go (); SourceFrame video_frame () const { @@ -95,16 +95,6 @@ public: return _subtitle_streams; } - /** Emitted when a video frame is ready. - * First parameter is the frame within the source. - * Second parameter is its index within the content. - * Third parameter is either 0 or a subtitle that should be on this frame. - */ - boost::signals2::signal<void (boost::shared_ptr<Image>, SourceFrame, boost::shared_ptr<Subtitle>)> Video; - - /** Emitted when some audio data is ready */ - boost::signals2::signal<void (boost::shared_ptr<AudioBuffers>, int64_t)> Audio; - protected: virtual PixelFormat pixel_format () const = 0; @@ -129,16 +119,11 @@ protected: private: void emit_video (boost::shared_ptr<Image>, boost::shared_ptr<Subtitle>); - void emit_audio (boost::shared_ptr<AudioBuffers>); SourceFrame _video_frame; - int64_t _audio_frame; std::list<boost::shared_ptr<FilterGraph> > _filter_graphs; - DelayLine* _delay_line; - int _delay_in_frames; - boost::shared_ptr<TimedSubtitle> _timed_subtitle; boost::shared_ptr<Image> _last_image; |
