Android WebRTC支持的编解码器

时间:2019-09-20 15:46:07

标签: android webrtc h.264

我只是读了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()]);
 }

如果需要,我可以添加一部分代码。 感谢您的阅读。

2 个答案:

答案 0 :(得分:0)

是的,如果您查看源代码here(功能为isHardwareSupportedInCurrentSdkH264()),那么就不会提及Hisilicon了,只是高通exynos。

我已经看到人们在此issue中解决了这个问题,只是强制要约中的sdp,但这对我不起作用。

答案 1 :(得分:0)

我不知道它是否会解决,我认为不是... 您可以切换到vp8编解码器,它具有sw编码/解码后备功能,并且可以在华为设备上使用。

相关问题