Opt in for video encryption on A10 and later SoCs

This commit is contained in:
Cameron Gutman 2024-01-15 15:21:56 -06:00
parent 5501d85762
commit 9b28981b59

View File

@ -420,9 +420,16 @@ void ClSetControllerLED(uint16_t controllerNumber, uint8_t r, uint8_t g, uint8_t
_streamConfig.supportedVideoFormats = config.supportedVideoFormats;
_streamConfig.audioConfiguration = config.audioConfiguration;
// TODO: If/when video encryption is added, we'll probably want to
// limit that to devices that support the ARMv8 AES instructions.
_streamConfig.encryptionFlags = ENCFLG_AUDIO;
// Since we require iOS 12 or above, we're guaranteed to be running
// on a 64-bit device with ARMv8 crypto instructions, so we don't
// need to check for that here. Instead, we'll just check for more
// than 2 cores, which eliminates the early dual-core CPUs (A7-A9).
if (NSProcessInfo.processInfo.processorCount > 2) {
_streamConfig.encryptionFlags = ENCFLG_ALL;
}
else {
_streamConfig.encryptionFlags = ENCFLG_AUDIO;
}
if ([Utils isActiveNetworkVPN]) {
// Force remote streaming mode when a VPN is connected