1313import static org .webrtc .MediaCodecUtils .EXYNOS_PREFIX ;
1414import static org .webrtc .MediaCodecUtils .INTEL_PREFIX ;
1515import static org .webrtc .MediaCodecUtils .QCOM_PREFIX ;
16+ import static org .webrtc .MediaCodecUtils .HISI_PREFIX ;
1617
1718import android .media .MediaCodecInfo ;
1819import android .media .MediaCodecList ;
@@ -213,6 +214,8 @@ private boolean isHardwareSupportedInCurrentSdkVp8(MediaCodecInfo info) {
213214 String name = info .getName ();
214215 // QCOM Vp8 encoder is supported in KITKAT or later.
215216 return (name .startsWith (QCOM_PREFIX ) && Build .VERSION .SDK_INT >= Build .VERSION_CODES .KITKAT )
217+ // Hisi VP8 encoder seems to be supported. Needs more testing.
218+ || (name .startsWith (HISI_PREFIX ) && Build .VERSION .SDK_INT >= Build .VERSION_CODES .KITKAT )
216219 // Exynos VP8 encoder is supported in M or later.
217220 || (name .startsWith (EXYNOS_PREFIX ) && Build .VERSION .SDK_INT >= Build .VERSION_CODES .M )
218221 // Intel Vp8 encoder is supported in LOLLIPOP or later, with the intel encoder enabled.
@@ -222,7 +225,7 @@ private boolean isHardwareSupportedInCurrentSdkVp8(MediaCodecInfo info) {
222225
223226 private boolean isHardwareSupportedInCurrentSdkVp9 (MediaCodecInfo info ) {
224227 String name = info .getName ();
225- return (name .startsWith (QCOM_PREFIX ) || name .startsWith (EXYNOS_PREFIX ))
228+ return (name .startsWith (QCOM_PREFIX ) || name .startsWith (EXYNOS_PREFIX ) || name . startsWith ( HISI_PREFIX ) )
226229 // Both QCOM and Exynos VP9 encoders are supported in N or later.
227230 && Build .VERSION .SDK_INT >= Build .VERSION_CODES .N ;
228231 }
@@ -246,7 +249,9 @@ private boolean isHardwareSupportedInCurrentSdkH265(MediaCodecInfo info) {
246249 return (name .startsWith (QCOM_PREFIX ) && Build .VERSION .SDK_INT >= Build .VERSION_CODES .KITKAT )
247250 // Exynos H265 encoder is supported in LOLLIPOP or later.
248251 || (name .startsWith (EXYNOS_PREFIX )
249- && Build .VERSION .SDK_INT >= Build .VERSION_CODES .LOLLIPOP );
252+ && Build .VERSION .SDK_INT >= Build .VERSION_CODES .LOLLIPOP )
253+ // Hisi VP8 encoder seems to be supported. Needs more testing.
254+ || (name .startsWith (HISI_PREFIX ) && Build .VERSION .SDK_INT >= Build .VERSION_CODES .KITKAT );
250255 }
251256
252257 private boolean isMediaCodecAllowed (MediaCodecInfo info ) {
0 commit comments