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

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

Issue 8528045: corresponding change in CaptureVideoDecoder and RTCVideoDecoder due to pull model used in medi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: add more tests 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
Index: content/renderer/media/rtc_video_decoder.h
===================================================================
--- content/renderer/media/rtc_video_decoder.h (revision 109978)
+++ content/renderer/media/rtc_video_decoder.h (working copy)
@@ -5,7 +5,7 @@
#ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_
#define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_H_
-#include <deque>
+#include <queue>
#include <string>
#include "base/compiler_specific.h"
@@ -36,6 +36,7 @@
virtual void Seek(base::TimeDelta time,
const media::FilterStatusCB& cb) OVERRIDE;
virtual void Pause(const base::Closure& callback) OVERRIDE;
+ virtual void Flush(const base::Closure& callback) OVERRIDE;
virtual void Stop(const base::Closure& callback) OVERRIDE;
// Decoder implementation.
@@ -50,10 +51,14 @@
virtual bool SetSize(int width, int height, int reserved) OVERRIDE;
virtual bool RenderFrame(const cricket::VideoFrame* frame) OVERRIDE;
+ // Helper.
scherkus (not reviewing) 2011/11/17 02:05:22 ditto
+ void DeliverBlackFrame(const ReadCB& read_cb);
scherkus (not reviewing) 2011/11/17 02:05:22 should this be private?
+
private:
friend class RTCVideoDecoderTest;
FRIEND_TEST_ALL_PREFIXES(RTCVideoDecoderTest, Initialize_Successful);
FRIEND_TEST_ALL_PREFIXES(RTCVideoDecoderTest, DoSeek);
+ FRIEND_TEST_ALL_PREFIXES(RTCVideoDecoderTest, DoFlush);
FRIEND_TEST_ALL_PREFIXES(RTCVideoDecoderTest, DoRenderFrame);
FRIEND_TEST_ALL_PREFIXES(RTCVideoDecoderTest, DoSetSize);
@@ -68,9 +73,9 @@
gfx::Size visible_size_;
std::string url_;
DecoderState state_;
- ReadCB read_cb_;
+ std::queue<ReadCB> read_cbs_;
scherkus (not reviewing) 2011/11/17 02:05:22 ditto
- // Used for accessing |read_cb_| from another thread.
+ // Used for accessing |read_cbs_| from another thread.
base::Lock lock_;
DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder);

Powered by Google App Engine
This is Rietveld 408576698