diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-28 23:54:03 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-28 23:54:03 +0000 |
commit | 497d8a9857e7383f979b89694aff8dd403c176fe (patch) | |
tree | 2f07bb42d4a7a8e94e959c90dacbfa62eed1debd /remoting/codec/video_encoder_vp8_unittest.cc | |
parent | bac4ae80a786d68bfc18ca46f0adfcc4a1c43b0f (diff) | |
download | chromium_src-497d8a9857e7383f979b89694aff8dd403c176fe.zip chromium_src-497d8a9857e7383f979b89694aff8dd403c176fe.tar.gz chromium_src-497d8a9857e7383f979b89694aff8dd403c176fe.tar.bz2 |
Move screen capturers from remoting/capturer to media/video/capturer/screen
Screen capturers will be used in content, and so they have to be moved to
avoid dependency on remoting/capturer in content.
Beside moving the files this CL also renames classes as follows:
remoting::VideoFrameCapturer -> media::ScreenCapturer
remoting::VideoFrame -> media::ScreenCaptureFrame
remoting::CaptureData -> media::ScreenCaptureData
BUG=134249
Review URL: https://codereview.chromium.org/12047101
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179218 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/codec/video_encoder_vp8_unittest.cc')
-rw-r--r-- | remoting/codec/video_encoder_vp8_unittest.cc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/remoting/codec/video_encoder_vp8_unittest.cc b/remoting/codec/video_encoder_vp8_unittest.cc index 11d5ded..9a32fe2 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, |