AlexKMDev / WebRTC

Unofficial builds of Google WebRTC iOS Framework
https://webrtc.org/native-code/ios/
Other
292 stars 76 forks source link

The mode of decoding #31

Closed AMKaffiOS closed 7 years ago

AMKaffiOS commented 7 years ago

What is the default mode of decoding,How do I choose hardware decoding or software decoding? thanks!

AlexKMDev commented 7 years ago

It's software decoding by default (VP8 codec). In order to use hardware decoding with H264 you need to replace the order of codec priority in SDP. The appropriate code to do it can be found here.

Then just call it with needed argument:

let description = ARDSDPUtils.description(for: offerDescription, preferredVideoCodec: "H264")

And "VP8" if you need software decoding back.