Added supported H264 profiles for new iPhones
Bug: webrtc:9134, webrtc:7992
Change-Id: Ic5e92764ccd02803e626eb0db21175a13123dc33
Reviewed-on: https://webrtc-review.googlesource.com/c/107625
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25320}
diff --git a/sdk/objc/components/video_codec/UIDevice+H264Profile.mm b/sdk/objc/components/video_codec/UIDevice+H264Profile.mm
index a015f7c..852c3d4 100644
--- a/sdk/objc/components/video_codec/UIDevice+H264Profile.mm
+++ b/sdk/objc/components/video_codec/UIDevice+H264Profile.mm
@@ -24,6 +24,9 @@
constexpr SupportedH264Profile kH264MaxSupportedProfiles[] = {
// iPhones with at least iOS 9
+ {RTCDeviceTypeIPhoneXS, {kProfileHigh, kLevel5_2}}, // https://support.apple.com/kb/SP779
+ {RTCDeviceTypeIPhoneXSMax, {kProfileHigh, kLevel5_2}}, // https://support.apple.com/kb/SP780
+ {RTCDeviceTypeIPhoneXR, {kProfileHigh, kLevel5_2}}, // https://support.apple.com/kb/SP781
{RTCDeviceTypeIPhoneX, {kProfileHigh, kLevel5_2}}, // https://support.apple.com/kb/SP770
{RTCDeviceTypeIPhone8, {kProfileHigh, kLevel5_2}}, // https://support.apple.com/kb/SP767
{RTCDeviceTypeIPhone8Plus, {kProfileHigh, kLevel5_2}}, // https://support.apple.com/kb/SP768
diff --git a/sdk/objc/helpers/UIDevice+RTCDevice.h b/sdk/objc/helpers/UIDevice+RTCDevice.h
index eb39ea9..7362375 100644
--- a/sdk/objc/helpers/UIDevice+RTCDevice.h
+++ b/sdk/objc/helpers/UIDevice+RTCDevice.h
@@ -34,6 +34,9 @@
RTCDeviceTypeIPhone8,
RTCDeviceTypeIPhone8Plus,
RTCDeviceTypeIPhoneX,
+ RTCDeviceTypeIPhoneXS,
+ RTCDeviceTypeIPhoneXSMax,
+ RTCDeviceTypeIPhoneXR,
RTCDeviceTypeIPodTouch1G,
RTCDeviceTypeIPodTouch2G,
RTCDeviceTypeIPodTouch3G,
diff --git a/sdk/objc/helpers/UIDevice+RTCDevice.mm b/sdk/objc/helpers/UIDevice+RTCDevice.mm
index 96adb9a..6f68e9f 100644
--- a/sdk/objc/helpers/UIDevice+RTCDevice.mm
+++ b/sdk/objc/helpers/UIDevice+RTCDevice.mm
@@ -17,81 +17,85 @@
+ (RTCDeviceType)deviceType {
NSDictionary *machineNameToType = @{
- @"iPhone1,1": @(RTCDeviceTypeIPhone1G),
- @"iPhone1,2": @(RTCDeviceTypeIPhone3G),
- @"iPhone2,1": @(RTCDeviceTypeIPhone3GS),
- @"iPhone3,1": @(RTCDeviceTypeIPhone4),
- @"iPhone3,2": @(RTCDeviceTypeIPhone4),
- @"iPhone3,3": @(RTCDeviceTypeIPhone4Verizon),
- @"iPhone4,1": @(RTCDeviceTypeIPhone4S),
- @"iPhone5,1": @(RTCDeviceTypeIPhone5GSM),
- @"iPhone5,2": @(RTCDeviceTypeIPhone5GSM_CDMA),
- @"iPhone5,3": @(RTCDeviceTypeIPhone5CGSM),
- @"iPhone5,4": @(RTCDeviceTypeIPhone5CGSM_CDMA),
- @"iPhone6,1": @(RTCDeviceTypeIPhone5SGSM),
- @"iPhone6,2": @(RTCDeviceTypeIPhone5SGSM_CDMA),
- @"iPhone7,1": @(RTCDeviceTypeIPhone6Plus),
- @"iPhone7,2": @(RTCDeviceTypeIPhone6),
- @"iPhone8,1": @(RTCDeviceTypeIPhone6S),
- @"iPhone8,2": @(RTCDeviceTypeIPhone6SPlus),
- @"iPhone8,4": @(RTCDeviceTypeIPhoneSE),
- @"iPhone9,1": @(RTCDeviceTypeIPhone7),
- @"iPhone9,2": @(RTCDeviceTypeIPhone7Plus),
- @"iPhone9,3": @(RTCDeviceTypeIPhone7),
- @"iPhone9,4": @(RTCDeviceTypeIPhone7Plus),
- @"iPhone10,1": @(RTCDeviceTypeIPhone8),
- @"iPhone10,2": @(RTCDeviceTypeIPhone8Plus),
- @"iPhone10,3": @(RTCDeviceTypeIPhoneX),
- @"iPhone10,4": @(RTCDeviceTypeIPhone8),
- @"iPhone10,5": @(RTCDeviceTypeIPhone8Plus),
- @"iPhone10,6": @(RTCDeviceTypeIPhoneX),
- @"iPod1,1": @(RTCDeviceTypeIPodTouch1G),
- @"iPod2,1": @(RTCDeviceTypeIPodTouch2G),
- @"iPod3,1": @(RTCDeviceTypeIPodTouch3G),
- @"iPod4,1": @(RTCDeviceTypeIPodTouch4G),
- @"iPod5,1": @(RTCDeviceTypeIPodTouch5G),
- @"iPod7,1": @(RTCDeviceTypeIPodTouch6G),
- @"iPad1,1": @(RTCDeviceTypeIPad),
- @"iPad2,1": @(RTCDeviceTypeIPad2Wifi),
- @"iPad2,2": @(RTCDeviceTypeIPad2GSM),
- @"iPad2,3": @(RTCDeviceTypeIPad2CDMA),
- @"iPad2,4": @(RTCDeviceTypeIPad2Wifi2),
- @"iPad2,5": @(RTCDeviceTypeIPadMiniWifi),
- @"iPad2,6": @(RTCDeviceTypeIPadMiniGSM),
- @"iPad2,7": @(RTCDeviceTypeIPadMiniGSM_CDMA),
- @"iPad3,1": @(RTCDeviceTypeIPad3Wifi),
- @"iPad3,2": @(RTCDeviceTypeIPad3GSM_CDMA),
- @"iPad3,3": @(RTCDeviceTypeIPad3GSM),
- @"iPad3,4": @(RTCDeviceTypeIPad4Wifi),
- @"iPad3,5": @(RTCDeviceTypeIPad4GSM),
- @"iPad3,6": @(RTCDeviceTypeIPad4GSM_CDMA),
- @"iPad4,1": @(RTCDeviceTypeIPadAirWifi),
- @"iPad4,2": @(RTCDeviceTypeIPadAirCellular),
- @"iPad4,3": @(RTCDeviceTypeIPadAirWifiCellular),
- @"iPad4,4": @(RTCDeviceTypeIPadMini2GWifi),
- @"iPad4,5": @(RTCDeviceTypeIPadMini2GCellular),
- @"iPad4,6": @(RTCDeviceTypeIPadMini2GWifiCellular),
- @"iPad4,7": @(RTCDeviceTypeIPadMini3),
- @"iPad4,8": @(RTCDeviceTypeIPadMini3),
- @"iPad4,9": @(RTCDeviceTypeIPadMini3),
- @"iPad5,1": @(RTCDeviceTypeIPadMini4),
- @"iPad5,2": @(RTCDeviceTypeIPadMini4),
- @"iPad5,3": @(RTCDeviceTypeIPadAir2),
- @"iPad5,4": @(RTCDeviceTypeIPadAir2),
- @"iPad6,3": @(RTCDeviceTypeIPadPro9Inch),
- @"iPad6,4": @(RTCDeviceTypeIPadPro9Inch),
- @"iPad6,7": @(RTCDeviceTypeIPadPro12Inch),
- @"iPad6,8": @(RTCDeviceTypeIPadPro12Inch),
- @"iPad6,11": @(RTCDeviceTypeIPad5),
- @"iPad6,12": @(RTCDeviceTypeIPad5),
- @"iPad7,1": @(RTCDeviceTypeIPadPro12Inch2),
- @"iPad7,2": @(RTCDeviceTypeIPadPro12Inch2),
- @"iPad7,3": @(RTCDeviceTypeIPadPro10Inch),
- @"iPad7,4": @(RTCDeviceTypeIPadPro10Inch),
- @"iPad7,5": @(RTCDeviceTypeIPad6),
- @"iPad7,6": @(RTCDeviceTypeIPad6),
- @"i386": @(RTCDeviceTypeSimulatori386),
- @"x86_64": @(RTCDeviceTypeSimulatorx86_64),
+ @"iPhone1,1" : @(RTCDeviceTypeIPhone1G),
+ @"iPhone1,2" : @(RTCDeviceTypeIPhone3G),
+ @"iPhone2,1" : @(RTCDeviceTypeIPhone3GS),
+ @"iPhone3,1" : @(RTCDeviceTypeIPhone4),
+ @"iPhone3,2" : @(RTCDeviceTypeIPhone4),
+ @"iPhone3,3" : @(RTCDeviceTypeIPhone4Verizon),
+ @"iPhone4,1" : @(RTCDeviceTypeIPhone4S),
+ @"iPhone5,1" : @(RTCDeviceTypeIPhone5GSM),
+ @"iPhone5,2" : @(RTCDeviceTypeIPhone5GSM_CDMA),
+ @"iPhone5,3" : @(RTCDeviceTypeIPhone5CGSM),
+ @"iPhone5,4" : @(RTCDeviceTypeIPhone5CGSM_CDMA),
+ @"iPhone6,1" : @(RTCDeviceTypeIPhone5SGSM),
+ @"iPhone6,2" : @(RTCDeviceTypeIPhone5SGSM_CDMA),
+ @"iPhone7,1" : @(RTCDeviceTypeIPhone6Plus),
+ @"iPhone7,2" : @(RTCDeviceTypeIPhone6),
+ @"iPhone8,1" : @(RTCDeviceTypeIPhone6S),
+ @"iPhone8,2" : @(RTCDeviceTypeIPhone6SPlus),
+ @"iPhone8,4" : @(RTCDeviceTypeIPhoneSE),
+ @"iPhone9,1" : @(RTCDeviceTypeIPhone7),
+ @"iPhone9,2" : @(RTCDeviceTypeIPhone7Plus),
+ @"iPhone9,3" : @(RTCDeviceTypeIPhone7),
+ @"iPhone9,4" : @(RTCDeviceTypeIPhone7Plus),
+ @"iPhone10,1" : @(RTCDeviceTypeIPhone8),
+ @"iPhone10,2" : @(RTCDeviceTypeIPhone8Plus),
+ @"iPhone10,3" : @(RTCDeviceTypeIPhoneX),
+ @"iPhone10,4" : @(RTCDeviceTypeIPhone8),
+ @"iPhone10,5" : @(RTCDeviceTypeIPhone8Plus),
+ @"iPhone10,6" : @(RTCDeviceTypeIPhoneX),
+ @"iPhone11,2" : @(RTCDeviceTypeIPhoneXS),
+ @"iPhone11,4" : @(RTCDeviceTypeIPhoneXSMax),
+ @"iPhone11,6" : @(RTCDeviceTypeIPhoneXSMax),
+ @"iPhone11,8" : @(RTCDeviceTypeIPhoneXR),
+ @"iPod1,1" : @(RTCDeviceTypeIPodTouch1G),
+ @"iPod2,1" : @(RTCDeviceTypeIPodTouch2G),
+ @"iPod3,1" : @(RTCDeviceTypeIPodTouch3G),
+ @"iPod4,1" : @(RTCDeviceTypeIPodTouch4G),
+ @"iPod5,1" : @(RTCDeviceTypeIPodTouch5G),
+ @"iPod7,1" : @(RTCDeviceTypeIPodTouch6G),
+ @"iPad1,1" : @(RTCDeviceTypeIPad),
+ @"iPad2,1" : @(RTCDeviceTypeIPad2Wifi),
+ @"iPad2,2" : @(RTCDeviceTypeIPad2GSM),
+ @"iPad2,3" : @(RTCDeviceTypeIPad2CDMA),
+ @"iPad2,4" : @(RTCDeviceTypeIPad2Wifi2),
+ @"iPad2,5" : @(RTCDeviceTypeIPadMiniWifi),
+ @"iPad2,6" : @(RTCDeviceTypeIPadMiniGSM),
+ @"iPad2,7" : @(RTCDeviceTypeIPadMiniGSM_CDMA),
+ @"iPad3,1" : @(RTCDeviceTypeIPad3Wifi),
+ @"iPad3,2" : @(RTCDeviceTypeIPad3GSM_CDMA),
+ @"iPad3,3" : @(RTCDeviceTypeIPad3GSM),
+ @"iPad3,4" : @(RTCDeviceTypeIPad4Wifi),
+ @"iPad3,5" : @(RTCDeviceTypeIPad4GSM),
+ @"iPad3,6" : @(RTCDeviceTypeIPad4GSM_CDMA),
+ @"iPad4,1" : @(RTCDeviceTypeIPadAirWifi),
+ @"iPad4,2" : @(RTCDeviceTypeIPadAirCellular),
+ @"iPad4,3" : @(RTCDeviceTypeIPadAirWifiCellular),
+ @"iPad4,4" : @(RTCDeviceTypeIPadMini2GWifi),
+ @"iPad4,5" : @(RTCDeviceTypeIPadMini2GCellular),
+ @"iPad4,6" : @(RTCDeviceTypeIPadMini2GWifiCellular),
+ @"iPad4,7" : @(RTCDeviceTypeIPadMini3),
+ @"iPad4,8" : @(RTCDeviceTypeIPadMini3),
+ @"iPad4,9" : @(RTCDeviceTypeIPadMini3),
+ @"iPad5,1" : @(RTCDeviceTypeIPadMini4),
+ @"iPad5,2" : @(RTCDeviceTypeIPadMini4),
+ @"iPad5,3" : @(RTCDeviceTypeIPadAir2),
+ @"iPad5,4" : @(RTCDeviceTypeIPadAir2),
+ @"iPad6,3" : @(RTCDeviceTypeIPadPro9Inch),
+ @"iPad6,4" : @(RTCDeviceTypeIPadPro9Inch),
+ @"iPad6,7" : @(RTCDeviceTypeIPadPro12Inch),
+ @"iPad6,8" : @(RTCDeviceTypeIPadPro12Inch),
+ @"iPad6,11" : @(RTCDeviceTypeIPad5),
+ @"iPad6,12" : @(RTCDeviceTypeIPad5),
+ @"iPad7,1" : @(RTCDeviceTypeIPadPro12Inch2),
+ @"iPad7,2" : @(RTCDeviceTypeIPadPro12Inch2),
+ @"iPad7,3" : @(RTCDeviceTypeIPadPro10Inch),
+ @"iPad7,4" : @(RTCDeviceTypeIPadPro10Inch),
+ @"iPad7,5" : @(RTCDeviceTypeIPad6),
+ @"iPad7,6" : @(RTCDeviceTypeIPad6),
+ @"i386" : @(RTCDeviceTypeSimulatori386),
+ @"x86_64" : @(RTCDeviceTypeSimulatorx86_64),
};
RTCDeviceType deviceType = RTCDeviceTypeUnknown;