diff --git a/sdk/objc/Framework/Classes/PeerConnection/RTCDefaultVideoDecoderFactory.m b/sdk/objc/Framework/Classes/PeerConnection/RTCDefaultVideoDecoderFactory.m index 0ce0502cc0..ba27ad2b29 100644 --- a/sdk/objc/Framework/Classes/PeerConnection/RTCDefaultVideoDecoderFactory.m +++ b/sdk/objc/Framework/Classes/PeerConnection/RTCDefaultVideoDecoderFactory.m @@ -12,7 +12,9 @@ #import "WebRTC/RTCVideoCodecH264.h" #import "WebRTC/RTCVideoDecoderVP8.h" +#if !defined(RTC_DISABLE_VP9) #import "WebRTC/RTCVideoDecoderVP9.h" +#endif @implementation RTCDefaultVideoDecoderFactory @@ -21,8 +23,10 @@ return [[RTCVideoDecoderH264 alloc] init]; } else if ([info.name isEqualToString:kRTCVideoCodecVp8Name]) { return [RTCVideoDecoderVP8 vp8Decoder]; +#if !defined(RTC_DISABLE_VP9) } else if ([info.name isEqualToString:kRTCVideoCodecVp9Name]) { return [RTCVideoDecoderVP9 vp9Decoder]; +#endif } return nil; @@ -32,7 +36,9 @@ return @[ [[RTCVideoCodecInfo alloc] initWithName:kRTCVideoCodecH264Name], [[RTCVideoCodecInfo alloc] initWithName:kRTCVideoCodecVp8Name], +#if !defined(RTC_DISABLE_VP9) [[RTCVideoCodecInfo alloc] initWithName:kRTCVideoCodecVp9Name] +#endif ]; } diff --git a/sdk/objc/Framework/Classes/PeerConnection/RTCDefaultVideoEncoderFactory.m b/sdk/objc/Framework/Classes/PeerConnection/RTCDefaultVideoEncoderFactory.m index 71ffe2997a..154fac746b 100644 --- a/sdk/objc/Framework/Classes/PeerConnection/RTCDefaultVideoEncoderFactory.m +++ b/sdk/objc/Framework/Classes/PeerConnection/RTCDefaultVideoEncoderFactory.m @@ -13,7 +13,9 @@ #import "WebRTC/RTCVideoCodec.h" #import "WebRTC/RTCVideoCodecH264.h" #import "WebRTC/RTCVideoEncoderVP8.h" +#if !defined(RTC_DISABLE_VP9) #import "WebRTC/RTCVideoEncoderVP9.h" +#endif @implementation RTCDefaultVideoEncoderFactory @@ -40,9 +42,17 @@ RTCVideoCodecInfo *vp8Info = [[RTCVideoCodecInfo alloc] initWithName:kRTCVideoCodecVp8Name]; +#if !defined(RTC_DISABLE_VP9) RTCVideoCodecInfo *vp9Info = [[RTCVideoCodecInfo alloc] initWithName:kRTCVideoCodecVp9Name]; +#endif - return @[ constrainedHighInfo, constrainedBaselineInfo, vp8Info, vp9Info ]; + return @[ constrainedHighInfo, + constrainedBaselineInfo, + vp8Info, +#if !defined(RTC_DISABLE_VP9) + vp9Info +#endif + ]; } - (id)createEncoder:(RTCVideoCodecInfo *)info { @@ -50,8 +60,10 @@ return [[RTCVideoEncoderH264 alloc] initWithCodecInfo:info]; } else if ([info.name isEqualToString:kRTCVideoCodecVp8Name]) { return [RTCVideoEncoderVP8 vp8Encoder]; +#if !defined(RTC_DISABLE_VP9) } else if ([info.name isEqualToString:kRTCVideoCodecVp9Name]) { return [RTCVideoEncoderVP9 vp9Encoder]; +#endif } return nil;