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

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: mcasas 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 }
18 17
19 VideoCaptureDevice::~VideoCaptureDevice() { 18 VideoCaptureDevice::Client::Buffer::Buffer(
20 } 19 int buffer_id,
20 int frame_feedback_id,
21 std::unique_ptr<HandleProvider> handle_provider,
22 std::unique_ptr<ScopedAccessPermission> access_permission)
23 : handle_provider_(std::move(handle_provider)),
24 access_permission_(std::move(access_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;
35
36 VideoCaptureDevice::~VideoCaptureDevice() {}
21 37
22 void VideoCaptureDevice::GetPhotoCapabilities( 38 void VideoCaptureDevice::GetPhotoCapabilities(
23 GetPhotoCapabilitiesCallback callback) {} 39 GetPhotoCapabilitiesCallback callback) {}
24 40
25 void VideoCaptureDevice::SetPhotoOptions(mojom::PhotoSettingsPtr settings, 41 void VideoCaptureDevice::SetPhotoOptions(mojom::PhotoSettingsPtr settings,
26 SetPhotoOptionsCallback callback) {} 42 SetPhotoOptionsCallback callback) {}
27 43
28 void VideoCaptureDevice::TakePhoto(TakePhotoCallback callback) {} 44 void VideoCaptureDevice::TakePhoto(TakePhotoCallback callback) {}
29 45
30 PowerLineFrequency VideoCaptureDevice::GetPowerLineFrequencyForLocation() 46 PowerLineFrequency VideoCaptureDevice::GetPowerLineFrequencyForLocation()
(...skipping 22 matching lines...) Expand all
53 switch (params.power_line_frequency) { 69 switch (params.power_line_frequency) {
54 case media::PowerLineFrequency::FREQUENCY_50HZ: // fall through 70 case media::PowerLineFrequency::FREQUENCY_50HZ: // fall through
55 case media::PowerLineFrequency::FREQUENCY_60HZ: 71 case media::PowerLineFrequency::FREQUENCY_60HZ:
56 return params.power_line_frequency; 72 return params.power_line_frequency;
57 default: 73 default:
58 return GetPowerLineFrequencyForLocation(); 74 return GetPowerLineFrequencyForLocation();
59 } 75 }
60 } 76 }
61 77
62 } // namespace media 78 } // namespace media
OLDNEW
« no previous file with comments | « media/capture/video/video_capture_device.h ('k') | media/capture/video/video_capture_device_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698