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

Unified Diff: remoting/codec/video_encoder_vp8_unittest.cc

Issue 12047101: Move screen capturers from remoting/capturer to media/video/capturer/screen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | « remoting/codec/video_encoder_vp8.cc ('k') | remoting/host/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/codec/video_encoder_vp8_unittest.cc
diff --git a/remoting/codec/video_encoder_vp8_unittest.cc b/remoting/codec/video_encoder_vp8_unittest.cc
index 11d5ded980434e503c989eb71ccd5b9ef24ea438..9a32fe2a6d1513a30fbaa05d2cccd2b036e1bc59 100644
--- a/remoting/codec/video_encoder_vp8_unittest.cc
+++ b/remoting/codec/video_encoder_vp8_unittest.cc
@@ -10,7 +10,7 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
-#include "remoting/capturer/capture_data.h"
+#include "media/video/capture/screen/screen_capture_data.h"
#include "remoting/codec/codec_test.h"
#include "remoting/proto/video.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -34,8 +34,8 @@ class VideoEncoderCallback {
}
};
-// Test that calling Encode with a differently-sized CaptureData does not
-// leak memory.
+// Test that calling Encode with a differently-sized media::ScreenCaptureData
+// does not leak memory.
TEST(VideoEncoderVp8Test, TestSizeChangeNoLeak) {
int height = 1000;
int width = 1000;
@@ -45,14 +45,15 @@ TEST(VideoEncoderVp8Test, TestSizeChangeNoLeak) {
VideoEncoderCallback callback;
std::vector<uint8> buffer(width * height * kBytesPerPixel);
- scoped_refptr<CaptureData> capture_data(new CaptureData(
- &buffer.front(), width * kBytesPerPixel, SkISize::Make(width, height)));
+ scoped_refptr<media::ScreenCaptureData> capture_data(
+ new media::ScreenCaptureData(&buffer.front(), width * kBytesPerPixel,
+ SkISize::Make(width, height)));
encoder.Encode(capture_data, false,
base::Bind(&VideoEncoderCallback::DataAvailable,
base::Unretained(&callback)));
height /= 2;
- capture_data = new CaptureData(
+ capture_data = new media::ScreenCaptureData(
&buffer.front(), width * kBytesPerPixel, SkISize::Make(width, height));
encoder.Encode(capture_data, false,
base::Bind(&VideoEncoderCallback::DataAvailable,
@@ -67,8 +68,8 @@ class VideoEncoderDpiCallback {
}
};
-// Test that the DPI information is correctly propagated from the CaptureData
-// to the VideoPacket.
+// Test that the DPI information is correctly propagated from the
+// media::ScreenCaptureData to the VideoPacket.
TEST(VideoEncoderVp8Test, TestDpiPropagation) {
int height = 32;
int width = 32;
@@ -78,8 +79,9 @@ TEST(VideoEncoderVp8Test, TestDpiPropagation) {
VideoEncoderDpiCallback callback;
std::vector<uint8> buffer(width * height * kBytesPerPixel);
- scoped_refptr<CaptureData> capture_data(new CaptureData(
- &buffer.front(), width * kBytesPerPixel, SkISize::Make(width, height)));
+ scoped_refptr<media::ScreenCaptureData> capture_data(
+ new media::ScreenCaptureData(&buffer.front(), width * kBytesPerPixel,
+ SkISize::Make(width, height)));
capture_data->set_dpi(SkIPoint::Make(96, 97));
encoder.Encode(capture_data, false,
base::Bind(&VideoEncoderDpiCallback::DataAvailable,
« no previous file with comments | « remoting/codec/video_encoder_vp8.cc ('k') | remoting/host/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698