Chromium Code Reviews| Index: webrtc/sdk/android/api/org/webrtc/MediaCodecVideoEncoder.java |
| diff --git a/webrtc/sdk/android/api/org/webrtc/MediaCodecVideoEncoder.java b/webrtc/sdk/android/api/org/webrtc/MediaCodecVideoEncoder.java |
| index 0c47c38c8aae827c6a1d663d5baeffc8bc7f4f62..15a10edc18bd94dc3cfe2a8edf352bd1baf126aa 100644 |
| --- a/webrtc/sdk/android/api/org/webrtc/MediaCodecVideoEncoder.java |
| +++ b/webrtc/sdk/android/api/org/webrtc/MediaCodecVideoEncoder.java |
| @@ -142,6 +142,18 @@ public class MediaCodecVideoEncoder { |
| private static final MediaCodecProperties[] h264HwList = |
| new MediaCodecProperties[] {qcomH264HwProperties, exynosH264HwProperties}; |
| + // List of supported HW high profile H.264 encoders. |
|
magjed_webrtc
2017/01/26 19:05:37
We will need something like this when we enable Hi
AlexG
2017/01/27 01:08:39
Done.
|
| + private static final MediaCodecProperties qcomH264HighProfileHwProperties = |
| + new MediaCodecProperties( |
| + "OMX.qcom.", Build.VERSION_CODES.LOLLIPOP, BitrateAdjustmentType.NO_ADJUSTMENT); |
| + private static MediaCodecProperties[] h264HighProfileHwList() { |
| + final ArrayList<MediaCodecProperties> supported_codecs = new ArrayList<MediaCodecProperties>(); |
| + if (PeerConnectionFactory.fieldTrialsFindFullName("WebRTC-H264HighProfile").equals("Enabled")) { |
| + supported_codecs.add(qcomH264HighProfileHwProperties); |
| + } |
| + return supported_codecs.toArray(new MediaCodecProperties[supported_codecs.size()]); |
| + } |
| + |
| // List of devices with poor H.264 encoder quality. |
| // HW H.264 encoder on below devices has poor bitrate control - actual |
| // bitrates deviates a lot from the target value. |
| @@ -233,6 +245,11 @@ public class MediaCodecVideoEncoder { |
| && (findHwEncoder(H264_MIME_TYPE, h264HwList, supportedColorList) != null); |
| } |
| + public static boolean isH264HighProfileHwSupported() { |
| + return !hwEncoderDisabledTypes.contains(H264_MIME_TYPE) && h264HighProfileHwList().length > 0 |
| + && (findHwEncoder(H264_MIME_TYPE, h264HighProfileHwList(), supportedColorList) != null); |
| + } |
| + |
| public static boolean isVp8HwSupportedUsingTextures() { |
| return !hwEncoderDisabledTypes.contains(VP8_MIME_TYPE) |
| && (findHwEncoder(VP8_MIME_TYPE, vp8HwList(), supportedSurfaceColorList) != null); |