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

Side by Side Diff: content/browser/media/capture/screen_capture_device_android_unittest.cc

Issue 2582883002: Revert of [Mojo Video Capture] Replace method OnIncomingCapturedVideoFrame with OnIncomingCapturedBufferExt (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/media/capture/screen_capture_device_android.h" 5 #include "content/browser/media/capture/screen_capture_device_android.h"
6 6
7 #include "testing/gmock/include/gmock/gmock.h" 7 #include "testing/gmock/include/gmock/gmock.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 using ::testing::_; 10 using ::testing::_;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage); 42 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage);
43 DoReserveOutputBuffer(); 43 DoReserveOutputBuffer();
44 return std::unique_ptr<Buffer>(); 44 return std::unique_ptr<Buffer>();
45 } 45 }
46 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer, 46 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer,
47 const media::VideoCaptureFormat& frame_format, 47 const media::VideoCaptureFormat& frame_format,
48 base::TimeTicks reference_time, 48 base::TimeTicks reference_time,
49 base::TimeDelta timestamp) override { 49 base::TimeDelta timestamp) override {
50 DoOnIncomingCapturedBuffer(); 50 DoOnIncomingCapturedBuffer();
51 } 51 }
52 void OnIncomingCapturedBufferExt( 52 void OnIncomingCapturedVideoFrame(
53 std::unique_ptr<Buffer> buffer, 53 std::unique_ptr<Buffer> buffer,
54 const media::VideoCaptureFormat& format, 54 scoped_refptr<media::VideoFrame> frame) override {
55 base::TimeTicks reference_time,
56 base::TimeDelta timestamp,
57 gfx::Rect visible_rect,
58 const media::VideoFrameMetadata& additional_metadata) override {
59 DoOnIncomingCapturedVideoFrame(); 55 DoOnIncomingCapturedVideoFrame();
60 } 56 }
61 std::unique_ptr<Buffer> ResurrectLastOutputBuffer( 57 std::unique_ptr<Buffer> ResurrectLastOutputBuffer(
62 const gfx::Size& dimensions, 58 const gfx::Size& dimensions,
63 media::VideoPixelFormat format, 59 media::VideoPixelFormat format,
64 media::VideoPixelStorage storage, 60 media::VideoPixelStorage storage,
65 int frame_feedback_id) override { 61 int frame_feedback_id) override {
66 EXPECT_EQ(media::PIXEL_FORMAT_I420, format); 62 EXPECT_EQ(media::PIXEL_FORMAT_I420, format);
67 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage); 63 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage);
68 DoResurrectLastOutputBuffer(); 64 DoResurrectLastOutputBuffer();
(...skipping 27 matching lines...) Expand all
96 media::VideoCaptureParams capture_params; 92 media::VideoCaptureParams capture_params;
97 capture_params.requested_format.frame_size.SetSize(640, 480); 93 capture_params.requested_format.frame_size.SetSize(640, 480);
98 capture_params.requested_format.frame_rate = kFrameRate; 94 capture_params.requested_format.frame_rate = kFrameRate;
99 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420; 95 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420;
100 capture_device->AllocateAndStart(capture_params, std::move(client)); 96 capture_device->AllocateAndStart(capture_params, std::move(client));
101 capture_device->StopAndDeAllocate(); 97 capture_device->StopAndDeAllocate();
102 } 98 }
103 99
104 } // namespace 100 } // namespace
105 } // namespace Content 101 } // namespace Content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698