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

Side by Side Diff: webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit_info_objc.mm

Issue 1644843003: Compile rtc_base_objc and rtc_api_objc for Mac (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 /// ***** Creates a message box with Cocoa framework 53 /// ***** Creates a message box with Cocoa framework
54 /// ***** Returns 0 on success, -1 otherwise. 54 /// ***** Returns 0 on success, -1 otherwise.
55 - (NSNumber*)displayCaptureSettingsDialogBoxWithDevice:(const char*)deviceUnique IdUTF8 55 - (NSNumber*)displayCaptureSettingsDialogBoxWithDevice:(const char*)deviceUnique IdUTF8
56 AndTitle:(const char*)dialogTitleUTF8 56 AndTitle:(const char*)dialogTitleUTF8
57 AndParentWindow:(void*) parentWindow 57 AndParentWindow:(void*) parentWindow
58 AtX:(uint32_t)positionX 58 AtX:(uint32_t)positionX
59 AndY:(uint32_t) positionY 59 AndY:(uint32_t) positionY
60 { 60 {
61 NSString* strTitle = [NSString stringWithFormat:@"%s", dialogTitleUTF8]; 61 NSString* strTitle = [NSString stringWithFormat:@"%s", dialogTitleUTF8];
62 NSString* strButton = @"Alright"; 62 NSString* strButton = @"Alright";
63 NSAlert* alert = [NSAlert alertWithMessageText:strTitle 63 NSAlert* alert = [[NSAlert alloc] init];
tkchin_webrtc 2016/01/28 21:09:44 QTKit! We should remove it altogether at some poin
hjon_webrtc 2016/01/28 23:49:51 Acknowledged.
64 defaultButton:strButton 64 alert.messageText = strTitle;
65 alternateButton:nil otherButton:nil 65 [alert addButtonWithTitle:strButton];
66 informativeTextWithFormat:@"Device %s is capturing", devic eUniqueIdUTF8]; 66 alert.informativeText =
67 [NSString stringWithFormat:@"Device %s is capturing",
68 deviceUniqueIdUTF8];
67 [alert setAlertStyle:NSInformationalAlertStyle]; 69 [alert setAlertStyle:NSInformationalAlertStyle];
68 [alert runModal]; 70 [alert runModal];
69 return [NSNumber numberWithInt:0]; 71 return [NSNumber numberWithInt:0];
70 } 72 }
71 73
72 - (NSNumber*)getCaptureDeviceCount{ 74 - (NSNumber*)getCaptureDeviceCount{
73 [self getCaptureDevices]; 75 [self getCaptureDevices];
74 return [NSNumber numberWithInt:_captureDeviceCountInfo]; 76 return [NSNumber numberWithInt:_captureDeviceCountInfo];
75 } 77 }
76 78
(...skipping 21 matching lines...) Expand all
98 if(!tempCaptureDevice) 100 if(!tempCaptureDevice)
99 { 101 {
100 return [NSNumber numberWithInt:-1]; 102 return [NSNumber numberWithInt:-1];
101 } 103 }
102 104
103 memset(deviceName, 0, deviceNameLength); 105 memset(deviceName, 0, deviceNameLength);
104 memset(deviceUniqueID, 0, deviceUniqueIDLength); 106 memset(deviceUniqueID, 0, deviceUniqueIDLength);
105 107
106 bool successful = NO; 108 bool successful = NO;
107 109
110 #pragma clang diagnostic push
111 #pragma clang diagnostic ignored "-Wdeprecated"
108 NSString* tempString = [tempCaptureDevice localizedDisplayName]; 112 NSString* tempString = [tempCaptureDevice localizedDisplayName];
109 successful = [tempString getCString:(char*)deviceName 113 successful = [tempString getCString:(char*)deviceName
110 maxLength:deviceNameLength encoding:NSUTF8StringEncoding]; 114 maxLength:deviceNameLength encoding:NSUTF8StringEncoding];
111 if(NO == successful) 115 if(NO == successful)
112 { 116 {
113 memset(deviceName, 0, deviceNameLength); 117 memset(deviceName, 0, deviceNameLength);
114 return [NSNumber numberWithInt:-1]; 118 return [NSNumber numberWithInt:-1];
115 } 119 }
116 120
117 tempString = [tempCaptureDevice uniqueID]; 121 tempString = [tempCaptureDevice uniqueID];
118 successful = [tempString getCString:(char*)deviceUniqueID 122 successful = [tempString getCString:(char*)deviceUniqueID
119 maxLength:deviceUniqueIDLength encoding:NSUTF8StringEncoding]; 123 maxLength:deviceUniqueIDLength encoding:NSUTF8StringEncoding];
120 if(NO == successful) 124 if(NO == successful)
121 { 125 {
122 memset(deviceUniqueID, 0, deviceNameLength); 126 memset(deviceUniqueID, 0, deviceNameLength);
123 return [NSNumber numberWithInt:-1]; 127 return [NSNumber numberWithInt:-1];
124 } 128 }
129 #pragma clang diagnostic pop
125 130
126 return [NSNumber numberWithInt:0]; 131 return [NSNumber numberWithInt:0];
127 132
128 } 133 }
129 134
130 // ****************** "private" category functions below here ***************** * 135 // ****************** "private" category functions below here ***************** *
131 #pragma mark **** "private" method implementations 136 #pragma mark **** "private" method implementations
132 137
133 - (NSNumber*)initializeVariables 138 - (NSNumber*)initializeVariables
134 { 139 {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 { 177 {
173 if(NO == _OSSupportedInfo) 178 if(NO == _OSSupportedInfo)
174 { 179 {
175 return [NSNumber numberWithInt:0]; 180 return [NSNumber numberWithInt:0];
176 } 181 }
177 182
178 if(_captureDevicesInfo) 183 if(_captureDevicesInfo)
179 { 184 {
180 [_captureDevicesInfo release]; 185 [_captureDevicesInfo release];
181 } 186 }
187 #pragma clang diagnostic push
188 #pragma clang diagnostic ignored "-Wdeprecated"
182 _captureDevicesInfo = [[NSArray alloc] 189 _captureDevicesInfo = [[NSArray alloc]
183 initWithArray:[QTCaptureDevice 190 initWithArray:[QTCaptureDevice
184 inputDevicesWithMediaType:QTMediaType Video]]; 191 inputDevicesWithMediaType:QTMediaType Video]];
192 #pragma clang diagnostic pop
185 193
186 _captureDeviceCountInfo = _captureDevicesInfo.count; 194 _captureDeviceCountInfo = _captureDevicesInfo.count;
187 195
188 return [NSNumber numberWithInt:0]; 196 return [NSNumber numberWithInt:0];
189 } 197 }
190 198
191 @end 199 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698