Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Unified Diff: content/renderer/media/capture_video_decoder.h

Issue 8417019: Simplify VideoDecodeEngine interface by making everything synchronous. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for CaptureVideoDecoder Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/media/capture_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | content/renderer/media/capture_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698