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

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

Issue 2490153003: [Mojo Video Capture] Replace const scoped_refptr<T>& with scoped_refptr<T> and use std::move (Closed)
Patch Set: fix bots Created 4 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/desktop_capture_device_aura.h" 5 #include "content/browser/media/capture/desktop_capture_device_aura.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return std::unique_ptr<Buffer>(); 67 return std::unique_ptr<Buffer>();
68 } 68 }
69 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer, 69 void OnIncomingCapturedBuffer(std::unique_ptr<Buffer> buffer,
70 const media::VideoCaptureFormat& frame_format, 70 const media::VideoCaptureFormat& frame_format,
71 base::TimeTicks reference_time, 71 base::TimeTicks reference_time,
72 base::TimeDelta timestamp) override { 72 base::TimeDelta timestamp) override {
73 DoOnIncomingCapturedBuffer(); 73 DoOnIncomingCapturedBuffer();
74 } 74 }
75 void OnIncomingCapturedVideoFrame( 75 void OnIncomingCapturedVideoFrame(
76 std::unique_ptr<Buffer> buffer, 76 std::unique_ptr<Buffer> buffer,
77 const scoped_refptr<media::VideoFrame>& frame) override { 77 scoped_refptr<media::VideoFrame> frame) override {
78 DoOnIncomingCapturedVideoFrame(); 78 DoOnIncomingCapturedVideoFrame();
79 } 79 }
80 std::unique_ptr<Buffer> ResurrectLastOutputBuffer( 80 std::unique_ptr<Buffer> ResurrectLastOutputBuffer(
81 const gfx::Size& dimensions, 81 const gfx::Size& dimensions,
82 media::VideoPixelFormat format, 82 media::VideoPixelFormat format,
83 media::VideoPixelStorage storage) override { 83 media::VideoPixelStorage storage) override {
84 EXPECT_EQ(media::PIXEL_FORMAT_I420, format); 84 EXPECT_EQ(media::PIXEL_FORMAT_I420, format);
85 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage); 85 EXPECT_EQ(media::PIXEL_STORAGE_CPU, storage);
86 DoResurrectLastOutputBuffer(); 86 DoResurrectLastOutputBuffer();
87 return std::unique_ptr<Buffer>(); 87 return std::unique_ptr<Buffer>();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 media::VideoCaptureParams capture_params; 152 media::VideoCaptureParams capture_params;
153 capture_params.requested_format.frame_size.SetSize(640, 480); 153 capture_params.requested_format.frame_size.SetSize(640, 480);
154 capture_params.requested_format.frame_rate = kFrameRate; 154 capture_params.requested_format.frame_rate = kFrameRate;
155 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420; 155 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420;
156 capture_device->AllocateAndStart(capture_params, std::move(client)); 156 capture_device->AllocateAndStart(capture_params, std::move(client));
157 capture_device->StopAndDeAllocate(); 157 capture_device->StopAndDeAllocate();
158 } 158 }
159 159
160 } // namespace 160 } // namespace
161 } // namespace content 161 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698