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..f3e79bed680aefc5b4172ccbfb04682bbef51cda 100644 |
--- a/content/renderer/media/capture_video_decoder.h |
+++ b/content/renderer/media/capture_video_decoder.h |
@@ -44,9 +44,8 @@ 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 gfx::Size natural_size() OVERRIDE; |
+ virtual void Read(const ReadCB& callback) OVERRIDE; |
+ virtual const gfx::Size& natural_size() OVERRIDE; |
// VideoCapture::EventHandler implementation. |
virtual void OnStarted(media::VideoCapture* capture) OVERRIDE; |
@@ -67,7 +66,6 @@ class CONTENT_EXPORT CaptureVideoDecoder |
enum DecoderState { |
kUnInitialized, |
kNormal, |
- kSeeking, |
kStopped, |
kPaused |
}; |
@@ -82,19 +80,22 @@ 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_; |
+ gfx::Size natural_size_; |
DecoderState state_; |
- std::deque<scoped_refptr<media::VideoFrame> > available_frames_; |
+ ReadCB read_cb_; |
base::Closure pending_stop_cb_; |
media::StatisticsCallback statistics_callback_; |