Knowing the fact that Cisco has its h.264 codec made as open source I wanted to add it to the Android WebRTC SDK. I tried to create custom VideoEncoder
using the webRTC API but I found that the choice of the codec is made by its name. The SoftwareVideoEncoderFactory
class returns a class which represents the specific codec based on VideoCodecInfo
name: link. In my case, I did it like that:
VideoCodecInfo codecInfo = new VideoCodecInfo("H264", getDefaultH264Params(false));
SoftwareVideoEncoderFactory softwareVideoEncoderFactory = new SoftwareVideoEncoderFactory();
softwareVideoEncoderFactory.createEncoder(codecInfo);
then added it to my PeerConnectionFactory. Unfortunately, as I suppose the webRTC library doesn't know where the binary with open h264 is.
The question is: do I need to create my own class which will support Open H.264 and then re-build the webRTC library? Would be great if that won't be the case and the API would have an option to make this but I cannot find it.