13
13
import static org .webrtc .MediaCodecUtils .EXYNOS_PREFIX ;
14
14
import static org .webrtc .MediaCodecUtils .INTEL_PREFIX ;
15
15
import static org .webrtc .MediaCodecUtils .QCOM_PREFIX ;
16
+ import static org .webrtc .MediaCodecUtils .HISI_PREFIX ;
16
17
17
18
import android .media .MediaCodecInfo ;
18
19
import android .media .MediaCodecList ;
@@ -213,6 +214,8 @@ private boolean isHardwareSupportedInCurrentSdkVp8(MediaCodecInfo info) {
213
214
String name = info .getName ();
214
215
// QCOM Vp8 encoder is supported in KITKAT or later.
215
216
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 )
216
219
// Exynos VP8 encoder is supported in M or later.
217
220
|| (name .startsWith (EXYNOS_PREFIX ) && Build .VERSION .SDK_INT >= Build .VERSION_CODES .M )
218
221
// Intel Vp8 encoder is supported in LOLLIPOP or later, with the intel encoder enabled.
@@ -222,7 +225,7 @@ private boolean isHardwareSupportedInCurrentSdkVp8(MediaCodecInfo info) {
222
225
223
226
private boolean isHardwareSupportedInCurrentSdkVp9 (MediaCodecInfo info ) {
224
227
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 ) )
226
229
// Both QCOM and Exynos VP9 encoders are supported in N or later.
227
230
&& Build .VERSION .SDK_INT >= Build .VERSION_CODES .N ;
228
231
}
@@ -246,7 +249,9 @@ private boolean isHardwareSupportedInCurrentSdkH265(MediaCodecInfo info) {
246
249
return (name .startsWith (QCOM_PREFIX ) && Build .VERSION .SDK_INT >= Build .VERSION_CODES .KITKAT )
247
250
// Exynos H265 encoder is supported in LOLLIPOP or later.
248
251
|| (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 );
250
255
}
251
256
252
257
private boolean isMediaCodecAllowed (MediaCodecInfo info ) {
0 commit comments