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

Unified Diff: device/capture/video/mac/video_capture_device_mac.mm

Issue 2214533002: move //media/capture to //device/capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/capture/video/mac/video_capture_device_mac.h ('k') | device/capture/video/scoped_result_callback.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/capture/video/mac/video_capture_device_mac.mm
diff --git a/media/capture/video/mac/video_capture_device_mac.mm b/device/capture/video/mac/video_capture_device_mac.mm
similarity index 96%
rename from media/capture/video/mac/video_capture_device_mac.mm
rename to device/capture/video/mac/video_capture_device_mac.mm
index 8a87ec94387a2295a460182739de511a3c46e42c..b5c1ba278cbf03d3c90867ce0e3229e7eecad5f2 100644
--- a/media/capture/video/mac/video_capture_device_mac.mm
+++ b/device/capture/video/mac/video_capture_device_mac.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "media/capture/video/mac/video_capture_device_mac.h"
+#include "device/capture/video/mac/video_capture_device_mac.h"
#include <IOKit/IOCFPlugIn.h>
#include <IOKit/usb/IOUSBLib.h>
@@ -23,9 +23,9 @@
#include "base/strings/string_number_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
+#import "device/capture/video/mac/video_capture_device_avfoundation_mac.h"
#import "media/base/mac/avfoundation_glue.h"
#include "media/base/timestamp_constants.h"
-#import "media/capture/video/mac/video_capture_device_avfoundation_mac.h"
#include "ui/gfx/geometry/size.h"
@implementation DeviceNameAndTransportType
@@ -48,7 +48,7 @@
@end // @implementation DeviceNameAndTransportType
-namespace media {
+namespace device {
// Mac specific limits for minimum and maximum frame rate.
const float kMinFrameRate = 1.0f;
@@ -162,7 +162,7 @@ static bool FindVideoControlInterfaceInDeviceInterface(
// set the appropriate Power Line frequency for flicker removal.
static void SetAntiFlickerInVideoControlInterface(
IOCFPlugInInterface** plugin_interface,
- const PowerLineFrequency frequency) {
+ const media::PowerLineFrequency frequency) {
// Create, the control interface for the found plugin, and release
// the intermediate plugin.
IOUSBInterfaceInterface** control_interface = NULL;
@@ -223,7 +223,7 @@ static void SetAntiFlickerInVideoControlInterface(
command.wLength = kPuPowerLineFrequencyControlCommandSize;
command.wLenDone = 0;
int power_line_flag_value =
- (frequency == PowerLineFrequency::FREQUENCY_50HZ) ? k50Hz : k60Hz;
+ (frequency == media::PowerLineFrequency::FREQUENCY_50HZ) ? k50Hz : k60Hz;
command.pData = &power_line_flag_value;
IOReturn ret =
@@ -242,10 +242,11 @@ static void SetAntiFlickerInVideoControlInterface(
// devices matching the specified |vendor_id| and |product_id|; for each
// matching device, a device interface, and inside it a video control interface
// are created. The latter is used to a send a power frequency setting command.
-static void SetAntiFlickerInUsbDevice(const int vendor_id,
- const int product_id,
- const PowerLineFrequency frequency) {
- if (frequency == PowerLineFrequency::FREQUENCY_DEFAULT)
+static void SetAntiFlickerInUsbDevice(
+ const int vendor_id,
+ const int product_id,
+ const media::PowerLineFrequency frequency) {
+ if (frequency == media::PowerLineFrequency::FREQUENCY_DEFAULT)
return;
DVLOG(1) << "Setting Power Line Frequency to " << static_cast<int>(frequency)
<< " Hz, device " << std::hex << vendor_id << "-" << product_id;
@@ -333,7 +334,7 @@ void VideoCaptureDeviceMac::AllocateAndStart(
std::min(params.requested_format.frame_rate, kMaxFrameRate));
// Leave the pixel format selection to AVFoundation. The pixel format
// will be passed to |ReceiveFrame|.
- capture_format_.pixel_format = PIXEL_FORMAT_UNKNOWN;
+ capture_format_.pixel_format = media::PIXEL_FORMAT_UNKNOWN;
if (!UpdateCaptureResolution())
return;
@@ -427,7 +428,7 @@ void VideoCaptureDeviceMac::OnPhotoTaken(const uint8_t* image_data,
return;
}
- mojom::BlobPtr blob = mojom::Blob::New();
+ media::mojom::BlobPtr blob = media::mojom::Blob::New();
blob->data.assign(image_data, image_data + image_length);
blob->mime_type = mime_type;
photo_callback_->Run(std::move(blob));
@@ -495,4 +496,4 @@ bool VideoCaptureDeviceMac::UpdateCaptureResolution() {
return true;
}
-} // namespace media
+} // namespace device
« no previous file with comments | « device/capture/video/mac/video_capture_device_mac.h ('k') | device/capture/video/scoped_result_callback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698