我只是读了Google上的一个线程,当使用webrtc时,Honor和Huawei不可能将其编码为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()]);
}
如果需要,我可以添加一部分代码。 感谢您的阅读。