PSA: WebRTC ObjC SDK will build without software video codecs (VP8/VP9) by default

1,703 views
Skip to first unread message

mag...@webrtc.org

unread,
Apr 18, 2018, 3:02:41 AM4/18/18
to discuss-webrtc
Hi,

In two weeks the WebRTC ObjC SDK will start building without SW video codecs by default. The purpose is to save binary size for clients that don't need SW video codecs.

This change will only affect clients who currently don't pass in any video codec factories to the ObjC API like this:
[[RTCPeerConnectionFactory alloc] init]

This call used to internally set up HW H264 and SW VP8, VP9 codec factories. Moving forward, this call will only include the H264 codec and not the SW video codecs. If you have been using this call and want to preserve existing behavior, update it to:
RTCDefaultVideoDecoderFactory *decoderFactory = [[RTCDefaultVideoDecoderFactory alloc] init];
RTCDefaultVideoEncoderFactory *encoderFactory = [[RTCDefaultVideoEncoderFactory alloc] init];
[[RTCPeerConnectionFactory alloc] initWithEncoderFactory:encoderFactory
                                          decoderFactory:decoderFactory];

If you want to use a subset of the video encoders/decoders, make custom factories on top of RTCVideoEncoderVP8/VP9/H264 and RTCVideoDecoderVP8/VP9/H264 and pass those to PeerConnectionFactory.

Thanks,
Magnus

Daljeet Singh

unread,
Oct 23, 2018, 2:04:32 AM10/23/18
to discuss-webrtc
Hi 

I am trying above code you mention but somehow I am getting below error:

Use of undeclared identifier 'RTCDefaultVideoDecoderFactory'

I have imported: 

#import <WebRTC/RTCVideoCodecFactory.h>


Could you please help me to resolve this issue.

and...@webrtc.org

unread,
Oct 23, 2018, 5:15:47 AM10/23/18
to discuss-webrtc
Hi,

Please import "WebRTC/RTCDefaultVideoDecoderFactory.h" instead. There has been a refactoring recently to make sure there is more of a 1:1 mapping between classes and headers.

Even better, if you can, just import the umbrella header:

#import <WebRTC/WebRTC.h>

Then you don't need to worry about in which header various classes are defined.

/ Anders
Reply all
Reply to author
Forward
0 new messages