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

Unified Diff: content/renderer/media/rtc_video_decoder_unittest.cc

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 | « content/renderer/media/rtc_video_decoder.cc ('k') | media/base/filters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_video_decoder_unittest.cc
diff --git a/content/renderer/media/rtc_video_decoder_unittest.cc b/content/renderer/media/rtc_video_decoder_unittest.cc
index 3ff5a75b4a4366f8b6c73600aea6c58c5c72c62c..8d5c8fa874361165a085f50d6c1f1349f4a9301e 100644
--- a/content/renderer/media/rtc_video_decoder_unittest.cc
+++ b/content/renderer/media/rtc_video_decoder_unittest.cc
@@ -141,6 +141,8 @@ class RTCVideoDecoderTest : public testing::Test {
base::Unretained(&stats_callback_object_));
}
+ MOCK_METHOD1(FrameReady, void(scoped_refptr<media::VideoFrame>));
+
// Fixture members.
scoped_refptr<RTCVideoDecoder> decoder_;
scoped_refptr<MockVideoRenderer> renderer_;
@@ -171,13 +173,7 @@ TEST_F(RTCVideoDecoderTest, DoSeek) {
InitializeDecoderSuccessfully();
- decoder_->set_consume_video_frame_callback(
- base::Bind(&MockVideoRenderer::ConsumeVideoFrame,
- base::Unretained(renderer_.get())));
-
- // Expect Seek and verify the results.
- EXPECT_CALL(*renderer_.get(), ConsumeVideoFrame(_))
- .Times(Limits::kMaxVideoFrames);
+ // Expect seek and verify the results.
decoder_->Seek(kZero, NewExpectedStatusCB(PIPELINE_OK));
message_loop_.RunAllPending();
@@ -190,18 +186,6 @@ TEST_F(RTCVideoDecoderTest, DoRenderFrame) {
InitializeDecoderSuccessfully();
- // Pass the frame back to decoder
- decoder_->set_consume_video_frame_callback(
- base::Bind(&RTCVideoDecoder::ProduceVideoFrame,
- base::Unretained(decoder_.get())));
- decoder_->Seek(kZero, NewExpectedStatusCB(PIPELINE_OK));
-
- decoder_->set_consume_video_frame_callback(
- base::Bind(&MockVideoRenderer::ConsumeVideoFrame,
- base::Unretained(renderer_.get())));
- EXPECT_CALL(*renderer_.get(), ConsumeVideoFrame(_))
- .Times(Limits::kMaxVideoFrames);
-
NullVideoFrame video_frame;
for (size_t i = 0; i < Limits::kMaxVideoFrames; ++i) {
« no previous file with comments | « content/renderer/media/rtc_video_decoder.cc ('k') | media/base/filters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698