aboutsummaryrefslogtreecommitdiff
path: root/webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit_info.mm
diff options
context:
space:
mode:
authorChih-hung Hsieh <chh@google.com>2015-12-01 17:07:48 +0000
committerandroid-build-merger <android-build-merger@google.com>2015-12-01 17:07:48 +0000
commita4acd9d6bc9b3b033d7d274316e75ee067df8d20 (patch)
tree672a185b294789cf991f385c3e395dd63bea9063 /webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit_info.mm
parent3681b90ba4fe7a27232dd3e27897d5d7ed9d651c (diff)
parentfe8b4a657979b49e1701bd92f6d5814a99e0b2be (diff)
downloadwebrtc-a4acd9d6bc9b3b033d7d274316e75ee067df8d20.tar.gz
Merge changes I7bbf776e,I1b827825
am: fe8b4a6579 * commit 'fe8b4a657979b49e1701bd92f6d5814a99e0b2be': (7237 commits) WIP: Changes after merge commit 'cb3f9bd' Make the nonlinear beamformer steerable Utilize bitrate above codec max to protect video. Enable VP9 internal resize by default. Filter overlapping RTP header extensions. Make VCMEncodedFrameCallback const. MediaCodecVideoEncoder: Add number of quality resolution downscales to Encoded callback. Remove redudant encoder rate calls. Create isolate files for nonparallel tests. Register header extensions in RtpRtcpObserver to avoid log spam. Make an enum class out of NetEqDecoder, and hide the neteq_decoders_ table ACM: Move NACK functionality inside NetEq Fix chromium-style warnings in webrtc/sound/. Create a 'webrtc_nonparallel_tests' target. Update scalability structure data according to updates in the RTP payload profile. audio_coding: rename interface -> include Rewrote perform_action_on_all_files to be parallell. Update reference indices according to updates in the RTP payload profile. Disable P2PTransport...TestFailoverControlledSide on Memcheck pass clangcl compile options to ignore warnings in gflags.cc ...
Diffstat (limited to 'webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit_info.mm')
-rw-r--r--webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit_info.mm125
1 files changed, 125 insertions, 0 deletions
diff --git a/webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit_info.mm b/webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit_info.mm
new file mode 100644
index 0000000000..1251ecd830
--- /dev/null
+++ b/webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit_info.mm
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit_info_objc.h"
+#include "webrtc/modules/video_capture/include/video_capture.h"
+#include "webrtc/modules/video_capture/video_capture_config.h"
+#include "webrtc/system_wrappers/include/trace.h"
+
+namespace webrtc
+{
+namespace videocapturemodule
+{
+
+VideoCaptureMacQTKitInfo::VideoCaptureMacQTKitInfo(const int32_t id) :
+ DeviceInfoImpl(id)
+{
+ _captureInfo = [[VideoCaptureMacQTKitInfoObjC alloc] init];
+}
+
+VideoCaptureMacQTKitInfo::~VideoCaptureMacQTKitInfo()
+{
+ [_captureInfo release];
+
+}
+
+int32_t VideoCaptureMacQTKitInfo::Init()
+{
+
+ return 0;
+}
+
+uint32_t VideoCaptureMacQTKitInfo::NumberOfDevices()
+{
+
+ uint32_t captureDeviceCount =
+ [[_captureInfo getCaptureDeviceCount]intValue];
+ return captureDeviceCount;
+
+}
+
+int32_t VideoCaptureMacQTKitInfo::GetDeviceName(
+ uint32_t deviceNumber, char* deviceNameUTF8,
+ uint32_t deviceNameLength, char* deviceUniqueIdUTF8,
+ uint32_t deviceUniqueIdUTF8Length, char* productUniqueIdUTF8,
+ uint32_t productUniqueIdUTF8Length)
+{
+ int errNum = [[_captureInfo getDeviceNamesFromIndex:deviceNumber
+ DefaultName:deviceNameUTF8 WithLength:deviceNameLength
+ AndUniqueID:deviceUniqueIdUTF8
+ WithLength:deviceUniqueIdUTF8Length
+ AndProductID:productUniqueIdUTF8
+ WithLength:productUniqueIdUTF8Length]intValue];
+ return errNum;
+}
+
+int32_t VideoCaptureMacQTKitInfo::NumberOfCapabilities(
+ const char* deviceUniqueIdUTF8)
+{
+ // Not implemented. Mac doesn't use discrete steps in capabilities, rather
+ // "analog". QTKit will do it's best to convert frames to what ever format
+ // you ask for.
+ WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
+ "NumberOfCapabilities is not supported on the Mac platform.");
+ return -1;
+}
+
+
+int32_t VideoCaptureMacQTKitInfo::GetCapability(
+ const char* deviceUniqueIdUTF8,
+ const uint32_t deviceCapabilityNumber,
+ VideoCaptureCapability& capability)
+{
+ // Not implemented. Mac doesn't use discrete steps in capabilities, rather
+ // "analog". QTKit will do it's best to convert frames to what ever format
+ // you ask for.
+ WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
+ "NumberOfCapabilities is not supported on the Mac platform.");
+ return -1;
+}
+
+
+int32_t VideoCaptureMacQTKitInfo::GetBestMatchedCapability(
+ const char*deviceUniqueIdUTF8,
+ const VideoCaptureCapability& requested, VideoCaptureCapability& resulting)
+{
+ // Not implemented. Mac doesn't use discrete steps in capabilities, rather
+ // "analog". QTKit will do it's best to convert frames to what ever format
+ // you ask for.
+ WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideoCapture, _id,
+ "NumberOfCapabilities is not supported on the Mac platform.");
+ return -1;
+}
+
+int32_t VideoCaptureMacQTKitInfo::DisplayCaptureSettingsDialogBox(
+ const char* deviceUniqueIdUTF8,
+ const char* dialogTitleUTF8, void* parentWindow,
+ uint32_t positionX, uint32_t positionY)
+{
+
+ return [[_captureInfo
+ displayCaptureSettingsDialogBoxWithDevice:deviceUniqueIdUTF8
+ AndTitle:dialogTitleUTF8
+ AndParentWindow:parentWindow AtX:positionX AndY:positionY]
+ intValue];
+}
+
+int32_t VideoCaptureMacQTKitInfo::CreateCapabilityMap(
+ const char* deviceUniqueIdUTF8)
+{
+ // Not implemented. Mac doesn't use discrete steps in capabilities, rather
+ // "analog". QTKit will do it's best to convert frames to what ever format
+ // you ask for.
+ WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideoCapture, _id,
+ "NumberOfCapabilities is not supported on the Mac platform.");
+ return -1;
+}
+} // namespace videocapturemodule
+} // namespace webrtc