Remove codec options that are not supported

This commit is contained in:
Cameron Gutman 2023-12-03 20:30:40 -06:00
parent 86919bd263
commit e0808d6bfc

View File

@ -204,10 +204,10 @@ BOOL isCustomResolution(CGSize res) {
if (!VTIsHardwareDecodeSupported(kCMVideoCodecType_AV1)) if (!VTIsHardwareDecodeSupported(kCMVideoCodecType_AV1))
#endif #endif
{ {
[self.codecSelector setEnabled:NO forSegmentAtIndex:2]; [self.codecSelector removeSegmentAtIndex:2 animated:NO];
} }
if (!VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC)) { if (!VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC)) {
[self.codecSelector setEnabled:NO forSegmentAtIndex:1]; [self.codecSelector removeSegmentAtIndex:1 animated:NO];
// Only enable the 4K option for "recent" devices. We'll judge that by whether // Only enable the 4K option for "recent" devices. We'll judge that by whether
// they support HEVC decoding (A9 or later). // they support HEVC decoding (A9 or later).