diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-27 01:13:07 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-27 01:13:07 +0100 |
| commit | 7ffd5bd9b4571c2db06a8c50419fe90b06ef1a07 (patch) | |
| tree | ae1f013240e02da963c6067ab71379caf04162aa /src/lib/decoder.h | |
| parent | 520203da69da7b6638cba569ca1975a7dd036b5e (diff) | |
Try to separate out filter graph code and use a different one for each different pixel format / size of frame.
Diffstat (limited to 'src/lib/decoder.h')
| -rw-r--r-- | src/lib/decoder.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/decoder.h b/src/lib/decoder.h index 7940aed6c..b20adb511 100644 --- a/src/lib/decoder.h +++ b/src/lib/decoder.h @@ -31,6 +31,7 @@ #include <boost/signals2.hpp> #include "util.h" #include "stream.h" +#include "filter_graph.h" class Job; class Options; @@ -69,6 +70,11 @@ public: virtual int64_t audio_channel_layout () const = 0; virtual bool has_subtitles () const = 0; + virtual int time_base_numerator () const = 0; + virtual int time_base_denominator () const = 0; + virtual int sample_aspect_ratio_numerator () const = 0; + virtual int sample_aspect_ratio_denominator () const = 0; + void process_begin (); bool pass (); void process_end (); @@ -96,15 +102,12 @@ public: /** Emitted when some audio data is ready */ boost::signals2::signal<void (boost::shared_ptr<AudioBuffers>)> Audio; - + protected: + /** perform a single pass at our content */ virtual bool do_pass () = 0; virtual PixelFormat pixel_format () const = 0; - virtual int time_base_numerator () const = 0; - virtual int time_base_denominator () const = 0; - virtual int sample_aspect_ratio_numerator () const = 0; - virtual int sample_aspect_ratio_denominator () const = 0; void process_video (AVFrame *); void process_audio (uint8_t *, int); @@ -128,16 +131,13 @@ protected: bool _ignore_length; private: - void setup_video_filters (); void emit_audio (uint8_t* data, int size); /** last video frame to be processed */ int _video_frame; - AVFilterContext* _buffer_src_context; - AVFilterContext* _buffer_sink_context; + std::list<boost::shared_ptr<FilterGraph> > _filter_graphs; - bool _have_setup_video_filters; DelayLine* _delay_line; int _delay_in_bytes; |
