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

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: Merge Ownership into BufferAccessProvider. 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 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<BufferAccessProvider> access_provider)
22 : id(buffer_id),
23 frame_feedback_id(frame_feedback_id),
24 access_provider(std::move(access_provider)) {}
25
26 VideoCaptureDevice::Client::Buffer::Buffer(
27 VideoCaptureDevice::Client::Buffer&& other) = default;
28
29 VideoCaptureDevice::Client::Buffer::~Buffer() = default;
30
31 VideoCaptureDevice::Client::Buffer& VideoCaptureDevice::Client::Buffer::
32 operator=(VideoCaptureDevice::Client::Buffer&& other) = default;
18 33
19 VideoCaptureDevice::~VideoCaptureDevice() { 34 VideoCaptureDevice::~VideoCaptureDevice() {
20 } 35 }
21 36
22 void VideoCaptureDevice::GetPhotoCapabilities( 37 void VideoCaptureDevice::GetPhotoCapabilities(
23 GetPhotoCapabilitiesCallback callback) {} 38 GetPhotoCapabilitiesCallback callback) {}
24 39
25 void VideoCaptureDevice::SetPhotoOptions(mojom::PhotoSettingsPtr settings, 40 void VideoCaptureDevice::SetPhotoOptions(mojom::PhotoSettingsPtr settings,
26 SetPhotoOptionsCallback callback) {} 41 SetPhotoOptionsCallback callback) {}
27 42
(...skipping 25 matching lines...) Expand all
53 switch (params.power_line_frequency) { 68 switch (params.power_line_frequency) {
54 case media::PowerLineFrequency::FREQUENCY_50HZ: // fall through 69 case media::PowerLineFrequency::FREQUENCY_50HZ: // fall through
55 case media::PowerLineFrequency::FREQUENCY_60HZ: 70 case media::PowerLineFrequency::FREQUENCY_60HZ:
56 return params.power_line_frequency; 71 return params.power_line_frequency;
57 default: 72 default:
58 return GetPowerLineFrequencyForLocation(); 73 return GetPowerLineFrequencyForLocation();
59 } 74 }
60 } 75 }
61 76
62 } // namespace media 77 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698