Index: content/renderer/media/capture_video_decoder.h |
diff --git a/content/renderer/media/capture_video_decoder.h b/content/renderer/media/capture_video_decoder.h |
index 0c874abf8e4df3059bf8c0efa84304216be41b83..945e2603419fb350588f39a4caba8c5a14feec65 100644 |
--- a/content/renderer/media/capture_video_decoder.h |
+++ b/content/renderer/media/capture_video_decoder.h |
@@ -44,8 +44,7 @@ class CONTENT_EXPORT CaptureVideoDecoder |
media::DemuxerStream* demuxer_stream, |
const base::Closure& filter_callback, |
const media::StatisticsCallback& stat_callback) OVERRIDE; |
- virtual void ProduceVideoFrame( |
- scoped_refptr<media::VideoFrame> video_frame) OVERRIDE; |
+ virtual void Read(const ReadCB& callback) OVERRIDE; |
virtual gfx::Size natural_size() OVERRIDE; |
// VideoCapture::EventHandler implementation. |
@@ -67,7 +66,6 @@ class CONTENT_EXPORT CaptureVideoDecoder |
enum DecoderState { |
kUnInitialized, |
kNormal, |
- kSeeking, |
kStopped, |
kPaused |
}; |
@@ -82,19 +80,21 @@ class CONTENT_EXPORT CaptureVideoDecoder |
media::DemuxerStream* demuxer_stream, |
const base::Closure& filter_callback, |
const media::StatisticsCallback& stat_callback); |
- void ProduceVideoFrameOnDecoderThread( |
- scoped_refptr<media::VideoFrame> video_frame); |
+ void ReadOnDecoderThread(const ReadCB& callback); |
void OnStoppedOnDecoderThread(media::VideoCapture* capture); |
void OnBufferReadyOnDecoderThread( |
media::VideoCapture* capture, |
scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf); |
+ // Delivers the frame to |read_cb_| and resets the callback. |
+ void DeliverFrame(const scoped_refptr<media::VideoFrame>& video_frame); |
+ |
scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; |
scoped_refptr<VideoCaptureImplManager> vc_manager_; |
media::VideoCapture::VideoCaptureCapability capability_; |
DecoderState state_; |
- std::deque<scoped_refptr<media::VideoFrame> > available_frames_; |
+ ReadCB read_cb_; |
base::Closure pending_stop_cb_; |
media::StatisticsCallback statistics_callback_; |