From 83c296968eb998ae5bdb210f37305fc49f308c4f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 4 Nov 2012 17:30:50 +0000 Subject: Rework counting of audio / video in the decoder a bit. --- src/lib/decoder.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src/lib/decoder.h') diff --git a/src/lib/decoder.h b/src/lib/decoder.h index 5750858df..c60ae4e59 100644 --- a/src/lib/decoder.h +++ b/src/lib/decoder.h @@ -80,9 +80,9 @@ public: void process_end (); void go (); - /** @return the index of the last video frame to be processed */ - SourceFrame video_frame_index () const { - return _video_frame_index; + /** @return the number of video frames we got from the source in the last run */ + SourceFrame video_frames_in () const { + return _video_frames_in; } virtual std::vector audio_streams () const { @@ -127,21 +127,19 @@ protected: bool _minimal; private: + void emit_video (boost::shared_ptr, boost::shared_ptr); void emit_audio (uint8_t* data, int size); - - /** last video frame to be processed */ - SourceFrame _video_frame_index; + SourceFrame _video_frames_in; + SourceFrame _video_frames_out; + int64_t _audio_frames_in; + int64_t _audio_frames_out; + std::list > _filter_graphs; DelayLine* _delay_line; int _delay_in_bytes; - /* Number of audio frames that we have pushed to the encoder - (at the DCP sample rate). - */ - int64_t _audio_frames_processed; - boost::shared_ptr _timed_subtitle; boost::shared_ptr _last_image; -- cgit v1.2.3