【发布时间】:2019-09-26 00:59:42
【问题描述】:
我刚刚在谷歌上读到一个帖子,荣耀和华为在使用 webrtc 时无法编码为 H264: https://groups.google.com/forum/#!searchin/discuss-webrtc/huawei$20h264%7Csort:date/discuss-webrtc/EA14U8FMT_k/Jn3CEG7YCQAJ
这是真的吗??? 这看起来很奇怪,我们不能这样做......
另外,我读了那个帖子是因为,我用三星而不是华为 P20 来编码我的流。 (使用华为创建的流保持 PV8 而不是我测试的其他 H.264 设备)
这是向不支持购买华为和荣耀的人证明的 WebRTC 中的代码:
final ArrayList<MediaCodecProperties> supported_codecs = new ArrayList<MediaCodecProperties>();
supported_codecs.add(qcomH264HwProperties);
supported_codecs.add(exynosH264HwProperties);
if (PeerConnectionFactory.fieldTrialsFindFullName("WebRTC-MediaTekH264").equals("Enabled")) {
supported_codecs.add(mediatekH264HwProperties);
}
return supported_codecs.toArray(new MediaCodecProperties[supported_codecs.size()]);
}
如果需要,我可以添加一段代码。 感谢阅读。
【问题讨论】:
-
我只是看到了,所以我认为这是真的groups.google.com/forum/#!searchin/discuss-webrtc/huawei/…