avfvideosrc: fix build in iOS with isEqualTo doesn't exists

This commit is contained in:
Andoni Morales Alastruey 2013-11-07 12:29:34 +01:00
parent a2b90eeb8c
commit 98e849a092

View file

@ -237,12 +237,13 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
AVCaptureScreenInput *screenInput = AVCaptureScreenInput *screenInput =
[[AVCaptureScreenInput alloc] initWithDisplayID:displayId]; [[AVCaptureScreenInput alloc] initWithDisplayID:displayId];
@try { @try {
[screenInput setValue:[NSNumber numberWithBool:captureScreenCursor] [screenInput setValue:[NSNumber numberWithBool:captureScreenCursor]
forKey:@"capturesCursor"]; forKey:@"capturesCursor"];
} @catch (NSException *exception) { } @catch (NSException *exception) {
if (![[exception name] isEqualTo:NSUndefinedKeyException]) { if (![[exception name] isEqualToString:NSUndefinedKeyException]) {
GST_WARNING ("An unexpected error occured: %s", GST_WARNING ("An unexpected error occured: %s",
[[exception reason] UTF8String]); [[exception reason] UTF8String]);
} }
@ -422,7 +423,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
/* Only available on OSX >= 10.8 and iOS >= 7.0 */ /* Only available on OSX >= 10.8 and iOS >= 7.0 */
[device setValue:max_frame_duration forKey:@"activeVideoMaxFrameDuration"]; [device setValue:max_frame_duration forKey:@"activeVideoMaxFrameDuration"];
} @catch (NSException *exception) { } @catch (NSException *exception) {
if (![[exception name] isEqualTo:NSUndefinedKeyException]) { if (![[exception name] isEqualToString:NSUndefinedKeyException]) {
GST_WARNING ("An unexcepted error occured: %s", GST_WARNING ("An unexcepted error occured: %s",
[exception.reason UTF8String]); [exception.reason UTF8String]);
} }
@ -548,7 +549,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
} @catch (NSException *exception) { } @catch (NSException *exception) {
if (![[exception name] isEqualTo:NSUndefinedKeyException]) { if (![[exception name] isEqualToString:NSUndefinedKeyException]) {
GST_WARNING ("An unexcepted error occured: %s", [exception.reason UTF8String]); GST_WARNING ("An unexcepted error occured: %s", [exception.reason UTF8String]);
return result; return result;
} }
@ -596,7 +597,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
} @catch (NSException *exception) { } @catch (NSException *exception) {
if (![[exception name] isEqualTo:NSUndefinedKeyException]) { if (![[exception name] isEqualToString:NSUndefinedKeyException]) {
GST_WARNING ("An unexcepted error occured: %s", [exception.reason UTF8String]); GST_WARNING ("An unexcepted error occured: %s", [exception.reason UTF8String]);
*successPtr = NO; *successPtr = NO;
return; return;