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

Side by Side Diff: media/capture/video/video_capture_device.cc

Issue 2573223002: [Mojo Video Capture] Simplify media::VideoCaptureDevice::Client:Buffer to a struct (Closed)
Patch Set: miu's comments 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 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 "media/capture/video/video_capture_device.h" 5 #include "media/capture/video/video_capture_device.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/i18n/timezone.h" 8 #include "base/i18n/timezone.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "media/base/media_switches.h" 12 #include "media/base/media_switches.h"
13 13
14 namespace media { 14 namespace media {
15 15
16 VideoCaptureDevice::Client::Buffer::~Buffer() { 16 VideoCaptureDevice::Client::Buffer::Buffer() : id_(0), frame_feedback_id_(0) {}
17 } 17
18 VideoCaptureDevice::Client::Buffer::Buffer(
19 int buffer_id,
20 int frame_feedback_id,
21 std::unique_ptr<HandleProvider> handle_provider,
22 std::unique_ptr<ScopedAccessPermission> buffer_read_write_permission)
23 : handle_provider(std::move(handle_provider)),
24 buffer_read_write_permission(std::move(buffer_read_write_permission)),
25 id_(buffer_id),
26 frame_feedback_id_(frame_feedback_id) {}
27
28 VideoCaptureDevice::Client::Buffer::Buffer(
29 VideoCaptureDevice::Client::Buffer&& other) = default;
30
31 VideoCaptureDevice::Client::Buffer::~Buffer() = default;
32
33 VideoCaptureDevice::Client::Buffer& VideoCaptureDevice::Client::Buffer::
34 operator=(VideoCaptureDevice::Client::Buffer&& other) = default;
18 35
19 VideoCaptureDevice::~VideoCaptureDevice() { 36 VideoCaptureDevice::~VideoCaptureDevice() {
20 } 37 }
mcasas 2017/01/05 20:37:01 Can be put in l.37, and I think my clang-format do
chfremer 2017/01/05 22:44:48 Done.
21 38
22 void VideoCaptureDevice::GetPhotoCapabilities( 39 void VideoCaptureDevice::GetPhotoCapabilities(
23 GetPhotoCapabilitiesCallback callback) {} 40 GetPhotoCapabilitiesCallback callback) {}
24 41
25 void VideoCaptureDevice::SetPhotoOptions(mojom::PhotoSettingsPtr settings, 42 void VideoCaptureDevice::SetPhotoOptions(mojom::PhotoSettingsPtr settings,
26 SetPhotoOptionsCallback callback) {} 43 SetPhotoOptionsCallback callback) {}
27 44
28 void VideoCaptureDevice::TakePhoto(TakePhotoCallback callback) {} 45 void VideoCaptureDevice::TakePhoto(TakePhotoCallback callback) {}
29 46
30 PowerLineFrequency VideoCaptureDevice::GetPowerLineFrequencyForLocation() 47 PowerLineFrequency VideoCaptureDevice::GetPowerLineFrequencyForLocation()
(...skipping 22 matching lines...) Expand all
53 switch (params.power_line_frequency) { 70 switch (params.power_line_frequency) {
54 case media::PowerLineFrequency::FREQUENCY_50HZ: // fall through 71 case media::PowerLineFrequency::FREQUENCY_50HZ: // fall through
55 case media::PowerLineFrequency::FREQUENCY_60HZ: 72 case media::PowerLineFrequency::FREQUENCY_60HZ:
56 return params.power_line_frequency; 73 return params.power_line_frequency;
57 default: 74 default:
58 return GetPowerLineFrequencyForLocation(); 75 return GetPowerLineFrequencyForLocation();
59 } 76 }
60 } 77 }
61 78
62 } // namespace media 79 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698