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

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

Issue 2592303002: Reland [Mojo Video Capture] Replace method OnIncomingCapturedVideoFrame() with OnIncomingCapturedBuf (Closed)
Patch Set: Rebase 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 OnIncomingCapturedVideoFrame( 53 void OnIncomingCapturedBufferExt(
54 std::unique_ptr<Buffer> buffer, 54 std::unique_ptr<Buffer> buffer,
55 scoped_refptr<media::VideoFrame> frame) override { 55 const media::VideoCaptureFormat& format,
56 base::TimeTicks reference_time,
57 base::TimeDelta timestamp,
58 gfx::Rect visible_rect,
59 const media::VideoFrameMetadata& additional_metadata) override {
56 DoOnIncomingCapturedVideoFrame(); 60 DoOnIncomingCapturedVideoFrame();
57 } 61 }
58 std::unique_ptr<Buffer> ResurrectLastOutputBuffer( 62 std::unique_ptr<Buffer> ResurrectLastOutputBuffer(
59 const gfx::Size& dimensions, 63 const gfx::Size& dimensions,
60 media::VideoPixelFormat format, 64 media::VideoPixelFormat format,
61 media::VideoPixelStorage storage, 65 media::VideoPixelStorage storage,
62 int frame_feedback_id) override { 66 int frame_feedback_id) override {
63 EXPECT_EQ(media::PIXEL_FORMAT_I420, format); 67 EXPECT_EQ(media::PIXEL_FORMAT_I420, format);
64 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage); 68 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage);
65 DoResurrectLastOutputBuffer(); 69 DoResurrectLastOutputBuffer();
(...skipping 27 matching lines...) Expand all
93 media::VideoCaptureParams capture_params; 97 media::VideoCaptureParams capture_params;
94 capture_params.requested_format.frame_size.SetSize(640, 480); 98 capture_params.requested_format.frame_size.SetSize(640, 480);
95 capture_params.requested_format.frame_rate = kFrameRate; 99 capture_params.requested_format.frame_rate = kFrameRate;
96 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420; 100 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420;
97 capture_device->AllocateAndStart(capture_params, std::move(client)); 101 capture_device->AllocateAndStart(capture_params, std::move(client));
98 capture_device->StopAndDeAllocate(); 102 capture_device->StopAndDeAllocate();
99 } 103 }
100 104
101 } // namespace 105 } // namespace
102 } // namespace Content 106 } // namespace Content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698