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); |