Use isHardwareAccelerated on Q+
Bug: none Change-Id: Ic3f478c5cde12e8a4d1d121749c0414b254a3ea3 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251695 Reviewed-by: Stefan Holmer <stefan@webrtc.org> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36014}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
454d2309de
commit
b903e3b185
@ -195,6 +195,10 @@ public class HardwareVideoEncoderFactory implements VideoEncoderFactory {
|
||||
// Returns true if the given MediaCodecInfo indicates a hardware module that is supported on the
|
||||
// current SDK.
|
||||
private boolean isHardwareSupportedInCurrentSdk(MediaCodecInfo info, VideoCodecMimeType type) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
return info.isHardwareAccelerated();
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case VP8:
|
||||
return isHardwareSupportedInCurrentSdkVp8(info);
|
||||
|
||||
Reference in New Issue
Block a user