From 17cea71c34ed6bdba67aac8614572c7511844c2a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 12 Nov 2012 21:04:06 +0000 Subject: Untested; more movement of stuff out of decoder. --- src/lib/decoder.h | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'src/lib/decoder.h') 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 #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, boost::shared_ptr, 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, SourceFrame, boost::shared_ptr)> Video; - - /** Emitted when some audio data is ready */ - boost::signals2::signal, int64_t)> Audio; - protected: virtual PixelFormat pixel_format () const = 0; @@ -129,16 +119,11 @@ protected: private: void emit_video (boost::shared_ptr, boost::shared_ptr); - void emit_audio (boost::shared_ptr); SourceFrame _video_frame; - int64_t _audio_frame; std::list > _filter_graphs; - DelayLine* _delay_line; - int _delay_in_frames; - boost::shared_ptr _timed_subtitle; boost::shared_ptr _last_image; -- cgit v1.2.3