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

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

Issue 2618173002: Revert of Reland [Mojo Video Capture] Replace method OnIncomingCapturedVideoFrame() with OnIncomingCapturedBuf (Closed)
Patch Set: Created 3 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 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 "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "testing/gmock/include/gmock/gmock.h" 8 #include "testing/gmock/include/gmock/gmock.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage); 43 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage);
44 DoReserveOutputBuffer(); 44 DoReserveOutputBuffer();
45 return std::unique_ptr<Buffer>(); 45 return std::unique_ptr<Buffer>();
46 } 46 }
47 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer, 47 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer,
48 const media::VideoCaptureFormat& frame_format, 48 const media::VideoCaptureFormat& frame_format,
49 base::TimeTicks reference_time, 49 base::TimeTicks reference_time,
50 base::TimeDelta timestamp) override { 50 base::TimeDelta timestamp) override {
51 DoOnIncomingCapturedBuffer(); 51 DoOnIncomingCapturedBuffer();
52 } 52 }
53 void OnIncomingCapturedBufferExt( 53 void OnIncomingCapturedVideoFrame(
54 std::unique_ptr<Buffer> buffer, 54 std::unique_ptr<Buffer> buffer,
55 const media::VideoCaptureFormat& format, 55 scoped_refptr<media::VideoFrame> frame) override {
56 base::TimeTicks reference_time,
57 base::TimeDelta timestamp,
58 gfx::Rect visible_rect,
59 const media::VideoFrameMetadata& additional_metadata) override {
60 DoOnIncomingCapturedVideoFrame(); 56 DoOnIncomingCapturedVideoFrame();
61 } 57 }
62 std::unique_ptr<Buffer> ResurrectLastOutputBuffer( 58 std::unique_ptr<Buffer> ResurrectLastOutputBuffer(
63 const gfx::Size& dimensions, 59 const gfx::Size& dimensions,
64 media::VideoPixelFormat format, 60 media::VideoPixelFormat format,
65 media::VideoPixelStorage storage, 61 media::VideoPixelStorage storage,
66 int frame_feedback_id) override { 62 int frame_feedback_id) override {
67 EXPECT_EQ(media::PIXEL_FORMAT_I420, format); 63 EXPECT_EQ(media::PIXEL_FORMAT_I420, format);
68 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage); 64 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage);
69 DoResurrectLastOutputBuffer(); 65 DoResurrectLastOutputBuffer();
(...skipping 27 matching lines...) Expand all
97 media::VideoCaptureParams capture_params; 93 media::VideoCaptureParams capture_params;
98 capture_params.requested_format.frame_size.SetSize(640, 480); 94 capture_params.requested_format.frame_size.SetSize(640, 480);
99 capture_params.requested_format.frame_rate = kFrameRate; 95 capture_params.requested_format.frame_rate = kFrameRate;
100 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420; 96 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420;
101 capture_device->AllocateAndStart(capture_params, std::move(client)); 97 capture_device->AllocateAndStart(capture_params, std::move(client));
102 capture_device->StopAndDeAllocate(); 98 capture_device->StopAndDeAllocate();
103 } 99 }
104 100
105 } // namespace 101 } // namespace
106 } // namespace Content 102 } // namespace Content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698