mirror of
https://github.com/androidx/media.git
synced 2025-05-04 22:20:47 +08:00
Find only REGULAR_CODECS in EncoderUtil.
We used "ALL_COOECS" previously, and it is not necessary because "ALL_CODECS" additionally the codecs that support tunneling/secure decoding, which there is no use case in Transformer. PiperOrigin-RevId: 458470278 (cherry picked from commit 3df4f3eb19aaa3486d2b3f8153be9167bd31027d)
This commit is contained in:
parent
f2b4701e92
commit
e0752a3a7a
@ -236,7 +236,7 @@ public final class EncoderUtil {
|
|||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public static String findCodecForFormat(MediaFormat format, boolean isDecoder) {
|
public static String findCodecForFormat(MediaFormat format, boolean isDecoder) {
|
||||||
MediaCodecList mediaCodecList = new MediaCodecList(MediaCodecList.ALL_CODECS);
|
MediaCodecList mediaCodecList = new MediaCodecList(MediaCodecList.REGULAR_CODECS);
|
||||||
// Format must not include KEY_FRAME_RATE on API21.
|
// Format must not include KEY_FRAME_RATE on API21.
|
||||||
// https://developer.android.com/reference/android/media/MediaCodecList#findDecoderForFormat(android.media.MediaFormat)
|
// https://developer.android.com/reference/android/media/MediaCodecList#findDecoderForFormat(android.media.MediaFormat)
|
||||||
@Nullable String frameRate = null;
|
@Nullable String frameRate = null;
|
||||||
@ -352,7 +352,7 @@ public final class EncoderUtil {
|
|||||||
ImmutableListMultimap.Builder<String, MediaCodecInfo> encoderInfosBuilder =
|
ImmutableListMultimap.Builder<String, MediaCodecInfo> encoderInfosBuilder =
|
||||||
new ImmutableListMultimap.Builder<>();
|
new ImmutableListMultimap.Builder<>();
|
||||||
|
|
||||||
MediaCodecList mediaCodecList = new MediaCodecList(MediaCodecList.ALL_CODECS);
|
MediaCodecList mediaCodecList = new MediaCodecList(MediaCodecList.REGULAR_CODECS);
|
||||||
MediaCodecInfo[] allCodecInfos = mediaCodecList.getCodecInfos();
|
MediaCodecInfo[] allCodecInfos = mediaCodecList.getCodecInfos();
|
||||||
|
|
||||||
for (MediaCodecInfo mediaCodecInfo : allCodecInfos) {
|
for (MediaCodecInfo mediaCodecInfo : allCodecInfos) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user