简体   繁体   English

Google WebRTC是否支持Cisco Open H.264?

[英]Does Google WebRTC support Cisco Open H.264?

Knowing the fact that Cisco has its h.264 codec made as open source I wanted to add it to the Android WebRTC SDK. 知道Cisco已将h.264编解码器作为开放源代码这一事实,我想将其添加到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. 我尝试使用webRTC API创建自定义VideoEncoder ,但是我发现编解码器的选择由其名称决定。 The SoftwareVideoEncoderFactory class returns a class which represents the specific codec based on VideoCodecInfo name: link . SoftwareVideoEncoderFactory类返回一个类,该类表示基于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. 然后将其添加到我的PeerConnectionFactory。 Unfortunately, as I suppose the webRTC library doesn't know where the binary with open h264 is. 不幸的是,由于我想webRTC库不知道打开h264的二进制文件在哪里。

The question is: do I need to create my own class which will support Open H.264 and then re-build the webRTC library? 问题是:我是否需要创建自己的类以支持Open H.264,然后重新构建webRTC库? 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. 如果不是这种情况,那就太好了,API可以选择执行此操作,但我找不到它。

WebRTC ( https://webrtc.googlesource.com/src ) supports h264 using openH264. WebRTC( https://webrtc.googlesource.com/src )使用openH264支持h264。 but it needs to be build for target platform. 但需要针对目标平台进行构建。 For Android is has been build in chrome or chromium but not on the Android SDK. 对于Android,已使用chrome或Chrome构建,但未在Android SDK上构建。 so you can't have openH264 using Android SDK. 因此您无法使用Android SDK使用openH264。 you need to build WebRTC for android yourself and then add the wrapper class to call the native apis. 您需要自己为Android构建WebRTC,然后添加包装器类以调用本地api。 You can use WebRTC JS API on a web application thou. 您可以在Web应用程序上使用WebRTC JS API。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM