summaryrefslogtreecommitdiffstats
path: root/media/video/ffmpeg_video_decode_engine_unittest.cc
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-16 02:03:16 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-16 02:03:16 +0000
commit4c51bc66e6496234d5a3a7cbdfb1cf07cca2167e (patch)
tree03e28346b7752cec02e91ba925694548b49b8184 /media/video/ffmpeg_video_decode_engine_unittest.cc
parent9cadfb34adaf42ad30e398b24ab06e5bc587e57a (diff)
downloadchromium_src-4c51bc66e6496234d5a3a7cbdfb1cf07cca2167e.zip
chromium_src-4c51bc66e6496234d5a3a7cbdfb1cf07cca2167e.tar.gz
chromium_src-4c51bc66e6496234d5a3a7cbdfb1cf07cca2167e.tar.bz2
Implement webkit media metrics in chromium.
This implements the chromium side of the webkit media statistics feature. A followup cl (in webkit) will wire the two sides together. Patch by sjl@chromium.org: http://codereview.chromium.org/6246091/ BUG=71255 TEST=media_unittests git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75050 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/video/ffmpeg_video_decode_engine_unittest.cc')
-rw-r--r--media/video/ffmpeg_video_decode_engine_unittest.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/media/video/ffmpeg_video_decode_engine_unittest.cc b/media/video/ffmpeg_video_decode_engine_unittest.cc
index 5f8a866..666e522 100644
--- a/media/video/ffmpeg_video_decode_engine_unittest.cc
+++ b/media/video/ffmpeg_video_decode_engine_unittest.cc
@@ -7,6 +7,7 @@
#include "media/base/data_buffer.h"
#include "media/base/mock_ffmpeg.h"
#include "media/base/mock_task.h"
+#include "media/base/pipeline.h"
#include "media/video/ffmpeg_video_decode_engine.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -117,7 +118,7 @@ class FFmpegVideoDecodeEngineTest : public testing::Test,
EXPECT_CALL(*this, ProduceVideoSample(_))
.WillOnce(DemuxComplete(test_engine_.get(), buffer_));
- EXPECT_CALL(*this, ConsumeVideoFrame(_))
+ EXPECT_CALL(*this, ConsumeVideoFrame(_, _))
.WillOnce(DecodeComplete(this));
test_engine_->ProduceVideoFrame(video_frame_);
}
@@ -130,8 +131,9 @@ class FFmpegVideoDecodeEngineTest : public testing::Test,
}
public:
- MOCK_METHOD1(ConsumeVideoFrame,
- void(scoped_refptr<VideoFrame> video_frame));
+ MOCK_METHOD2(ConsumeVideoFrame,
+ void(scoped_refptr<VideoFrame> video_frame,
+ const PipelineStatistics& statistics));
MOCK_METHOD1(ProduceVideoSample,
void(scoped_refptr<Buffer> buffer));
MOCK_METHOD1(OnInitializeComplete,
@@ -262,7 +264,7 @@ TEST_F(FFmpegVideoDecodeEngineTest, DecodeFrame_0ByteFrame) {
EXPECT_CALL(*this, ProduceVideoSample(_))
.WillOnce(DemuxComplete(test_engine_.get(), buffer_))
.WillOnce(DemuxComplete(test_engine_.get(), buffer_));
- EXPECT_CALL(*this, ConsumeVideoFrame(_))
+ EXPECT_CALL(*this, ConsumeVideoFrame(_, _))
.WillOnce(DecodeComplete(this));
test_engine_->ProduceVideoFrame(video_frame_);
@@ -280,7 +282,7 @@ TEST_F(FFmpegVideoDecodeEngineTest, DecodeFrame_DecodeError) {
EXPECT_CALL(*this, ProduceVideoSample(_))
.WillOnce(DemuxComplete(test_engine_.get(), buffer_));
- EXPECT_CALL(*this, ConsumeVideoFrame(_))
+ EXPECT_CALL(*this, ConsumeVideoFrame(_, _))
.WillOnce(DecodeComplete(this));
test_engine_->ProduceVideoFrame(video_frame_);