From ca4d051ceafb77c281583c4e50b391f230544313 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 5 Nov 2012 10:36:55 +0000 Subject: Move trimming into the encoder; seems to be cleaner. --- src/lib/encoder.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'src/lib/encoder.h') diff --git a/src/lib/encoder.h b/src/lib/encoder.h index 704b55e46..2d9780b52 100644 --- a/src/lib/encoder.h +++ b/src/lib/encoder.h @@ -57,18 +57,15 @@ public: /** Called to indicate that a processing run is about to begin */ virtual void process_begin (int64_t audio_channel_layout) = 0; - /** Called with a frame of video. + /** Call with a frame of video. * @param i Video frame image. * @param f Frame number within the film's source. * @param s A subtitle that should be on this frame, or 0. */ - virtual void process_video (boost::shared_ptr i, SourceFrame f, boost::shared_ptr s) = 0; + void process_video (boost::shared_ptr i, SourceFrame f, boost::shared_ptr s); - /** Called with some audio data. - * @param d Array of pointers to floating point sample data for each channel. - * @param s Number of frames (ie number of samples in each channel) - */ - virtual void process_audio (boost::shared_ptr) = 0; + /** Call with some audio data */ + void process_audio (boost::shared_ptr, int64_t); /** Called when a processing run has finished */ virtual void process_end () = 0; @@ -78,6 +75,17 @@ public: SourceFrame last_frame () const; protected: + + /** Called with a frame of video. + * @param i Video frame image. + * @param f Frame number within the film's source. + * @param s A subtitle that should be on this frame, or 0. + */ + virtual void do_process_video (boost::shared_ptr i, SourceFrame f, boost::shared_ptr s) = 0; + + /** Called with some audio data */ + virtual void do_process_audio (boost::shared_ptr) = 0; + void frame_done (SourceFrame n); void frame_skipped (); -- cgit v1.2.3