Google WebRTC是否支持Cisco Open H.264? [英] Does Google WebRTC support Cisco Open H.264?

查看:176
本文介绍了Google WebRTC是否支持Cisco Open H.264?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

了解到Cisco将其h.264编解码器作为开源软件这一事实,我想将其添加到Android WebRTC SDK中.我尝试使用webRTC API创建自定义VideoEncoder,但是我发现编解码器的选择由其名称决定. SoftwareVideoEncoderFactory类返回一个表示基于VideoCodecInfo名称的特定编解码器的类:

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);

然后将其添加到我的PeerConnectionFactory.不幸的是,因为我以为webRTC库不知道打开h264的二进制文件在哪里.

then added it to my PeerConnectionFactory. Unfortunately, as I suppose the webRTC library doesn't know where the binary with open h264 is.

问题是:我是否需要创建自己的类来支持Open H.264,然后重新构建webRTC库?如果不是这种情况,那太好了,API可以选择执行此操作,但我找不到它.

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.

推荐答案

WebRTC( https://webrtc.googlesource .com/src )使用openH264支持h264.但需要针对目标平台进行构建.对于Android,已使用chrome或Chrome构建,但未在Android SDK上构建.因此您无法使用Android SDK获得openH264.您需要自己为Android构建WebRTC,然后添加包装器类以调用本机api.您可以在Web应用程序上使用WebRTC JS API.

WebRTC (https://webrtc.googlesource.com/src) supports h264 using openH264. 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. so you can't have openH264 using Android SDK. you need to build WebRTC for android yourself and then add the wrapper class to call the native apis. You can use WebRTC JS API on a web application thou.

这篇关于Google WebRTC是否支持Cisco Open H.264?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆