fix(android) sort codecs in the same order as iOS

This commit is contained in:
Saúl Ibarra Corretgé 2022-11-22 12:18:08 +01:00 committed by Saúl Ibarra Corretgé
parent 752da71387
commit 30e5d213cb
2 changed files with 2 additions and 2 deletions

View File

@ -42,10 +42,10 @@ public class WebRTCVideoDecoderFactory implements VideoDecoderFactory {
public VideoCodecInfo[] getSupportedCodecs() {
List<VideoCodecInfo> codecs = new ArrayList<>();
codecs.add(H264Utils.DEFAULT_H264_BASELINE_PROFILE_CODEC);
codecs.add(new VideoCodecInfo(VideoCodecMimeType.VP8.name(), new HashMap<>()));
codecs.add(new VideoCodecInfo(VideoCodecMimeType.VP9.name(), new HashMap<>()));
codecs.add(new VideoCodecInfo(VideoCodecMimeType.AV1.name(), new HashMap<>()));
codecs.add(H264Utils.DEFAULT_H264_BASELINE_PROFILE_CODEC);
return codecs.toArray(new VideoCodecInfo[codecs.size()]);
}

View File

@ -43,10 +43,10 @@ public class WebRTCVideoEncoderFactory implements VideoEncoderFactory {
public VideoCodecInfo[] getSupportedCodecs() {
List<VideoCodecInfo> codecs = new ArrayList<>();
codecs.add(H264Utils.DEFAULT_H264_BASELINE_PROFILE_CODEC);
codecs.add(new VideoCodecInfo(VideoCodecMimeType.VP8.name(), new HashMap<>()));
codecs.add(new VideoCodecInfo(VideoCodecMimeType.VP9.name(), new HashMap<>()));
codecs.add(new VideoCodecInfo(VideoCodecMimeType.AV1.name(), new HashMap<>()));
codecs.add(H264Utils.DEFAULT_H264_BASELINE_PROFILE_CODEC);
return codecs.toArray(new VideoCodecInfo[codecs.size()]);
}