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

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

Issue 10248002: Report VideoDecoder status through ReadCB instead of through FilterHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename VideoDecoder::Status to VideoDecoder::DecoderStatus since Status has been polluted by Xlib.h. Created 8 years, 8 months 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/capture_video_decoder.cc ('k') | content/renderer/media/rtc_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_unittest.cc
diff --git a/content/renderer/media/capture_video_decoder_unittest.cc b/content/renderer/media/capture_video_decoder_unittest.cc
index 670e6d6d2f5d89921f72ea13667252e31f1ae7e7..181c8a398b84bec9eed61ce1c4e7e39be5c4a8d7 100644
--- a/content/renderer/media/capture_video_decoder_unittest.cc
+++ b/content/renderer/media/capture_video_decoder_unittest.cc
@@ -9,7 +9,6 @@
#include "media/base/filters.h"
#include "media/base/limits.h"
#include "media/base/mock_callback.h"
-#include "media/base/mock_filter_host.h"
#include "media/base/mock_filters.h"
#include "media/base/pipeline_status.h"
#include "media/video/capture/video_capture_types.h"
@@ -98,7 +97,6 @@ class CaptureVideoDecoderTest : public ::testing::Test {
decoder_ = new CaptureVideoDecoder(message_loop_proxy_,
kVideoStreamId, vc_manager_, capability);
- decoder_->set_host(&host_);
EXPECT_CALL(statistics_cb_object_, OnStatistics(_))
.Times(AnyNumber());
@@ -120,7 +118,7 @@ class CaptureVideoDecoderTest : public ::testing::Test {
void Initialize() {
// Issue a read.
- EXPECT_CALL(*this, FrameReady(_));
+ EXPECT_CALL(*this, FrameReady(media::VideoDecoder::kOk, _));
decoder_->Read(read_cb_);
EXPECT_CALL(*vc_manager_, AddDevice(_, _))
@@ -148,7 +146,7 @@ class CaptureVideoDecoderTest : public ::testing::Test {
void Flush() {
// Issue a read.
- EXPECT_CALL(*this, FrameReady(_));
+ EXPECT_CALL(*this, FrameReady(media::VideoDecoder::kOk, _));
decoder_->Read(read_cb_);
decoder_->Pause(media::NewExpectedClosure());
@@ -170,14 +168,14 @@ class CaptureVideoDecoderTest : public ::testing::Test {
return static_cast<media::VideoCapture::EventHandler*>(decoder_);
}
- MOCK_METHOD1(FrameReady, void(scoped_refptr<media::VideoFrame>));
+ MOCK_METHOD2(FrameReady, void(media::VideoDecoder::DecoderStatus status,
+ scoped_refptr<media::VideoFrame>));
// Fixture members.
scoped_refptr<CaptureVideoDecoder> decoder_;
scoped_refptr<MockVideoCaptureImplManager> vc_manager_;
scoped_ptr<MockVideoCaptureImpl> vc_impl_;
media::MockStatisticsCB statistics_cb_object_;
- StrictMock<media::MockFilterHost> host_;
scoped_ptr<MessageLoop> message_loop_;
scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
media::VideoDecoder::ReadCB read_cb_;
« no previous file with comments | « content/renderer/media/capture_video_decoder.cc ('k') | content/renderer/media/rtc_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698