From 15e4ec334c1fe28142b393d1840665cbc9685a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1ri=20Tristan=20Helgason?= Date: Fri, 30 Sep 2016 08:56:33 +0200 Subject: [PATCH] Remove compat for iOS 7/8 BUG=None R=magjed@webrtc.org, tkchin@webrtc.org Review URL: https://codereview.webrtc.org/2382713002 . Cr-Commit-Position: refs/heads/master@{#14448} --- .../video_capture/ios/rtc_video_capture_ios_objc.mm | 7 ++----- webrtc/modules/video_coding/codecs/h264/include/h264.h | 5 ++--- .../objc/Framework/Classes/avfoundationvideocapturer.mm | 9 ++------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/webrtc/modules/video_capture/ios/rtc_video_capture_ios_objc.mm b/webrtc/modules/video_capture/ios/rtc_video_capture_ios_objc.mm index e36c83bad9..f12ff0002b 100644 --- a/webrtc/modules/video_capture/ios/rtc_video_capture_ios_objc.mm +++ b/webrtc/modules/video_capture/ios/rtc_video_capture_ios_objc.mm @@ -44,11 +44,8 @@ using namespace webrtc::videocapturemodule; _owner = owner; _captureId = captureId; _captureSession = [[AVCaptureSession alloc] init]; -#if defined(__IPHONE_7_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_7_0 - NSString* version = [[UIDevice currentDevice] systemVersion]; - if ([version integerValue] >= 7) { - _captureSession.usesApplicationAudioSession = NO; - } +#if defined(WEBRTC_IOS) + _captureSession.usesApplicationAudioSession = NO; #endif _captureChanging = NO; _captureChangingCondition = [[NSCondition alloc] init]; diff --git a/webrtc/modules/video_coding/codecs/h264/include/h264.h b/webrtc/modules/video_coding/codecs/h264/include/h264.h index 54ad6eb09d..467845de8f 100644 --- a/webrtc/modules/video_coding/codecs/h264/include/h264.h +++ b/webrtc/modules/video_coding/codecs/h264/include/h264.h @@ -15,9 +15,8 @@ #if defined(WEBRTC_IOS) || defined(WEBRTC_MAC) #include -#if (defined(__IPHONE_8_0) && defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && \ - __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_8_0) || \ - (defined(__MAC_10_8) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_8) +#if defined(WEBRTC_IOS) || \ + defined(__MAC_10_8) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_8 #define WEBRTC_VIDEO_TOOLBOX_SUPPORTED 1 #endif diff --git a/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm b/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm index 115f7f847a..c71c9fdbd3 100644 --- a/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm +++ b/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm @@ -412,14 +412,9 @@ static NSString *GetSessionPresetForVideoFormat( - (BOOL)setupCaptureSession { AVCaptureSession *captureSession = [[AVCaptureSession alloc] init]; -#if defined(__IPHONE_7_0) && defined(__IPHONE_OS_VERSION_MAX_ALLOWED) \ - && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_7_0 - NSString *version = [[UIDevice currentDevice] systemVersion]; - if ([version integerValue] >= 7) { - captureSession.usesApplicationAudioSession = NO; - } +#if defined(WEBRTC_IOS) + captureSession.usesApplicationAudioSession = NO; #endif - // Add the output. AVCaptureVideoDataOutput *videoDataOutput = [self videoDataOutput]; if (![captureSession canAddOutput:videoDataOutput]) {