Replace AV1X with AV1
* Replace "AV1X" with "AV1"; * Keep mapping of "AV1X" payload name to kVideoCodecAv1 to not break support of injectable "AV1X". Bug: webrtc:13166 Change-Id: I9a50481209209f3857bbf28f4ed529ee6972377e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231560 Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Per Kjellander <perkj@webrtc.org> Reviewed-by: Emil Lundmark <lndmrk@webrtc.org> Reviewed-by: Philip Eliasson <philipel@webrtc.org> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org> Cr-Commit-Position: refs/heads/main@{#34987}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
52b9e1ecfb
commit
6b19d8273b
@ -46,7 +46,7 @@ class MediaCodecVideoDecoderFactory implements VideoDecoderFactory {
|
||||
@Nullable
|
||||
@Override
|
||||
public VideoDecoder createDecoder(VideoCodecInfo codecType) {
|
||||
VideoCodecMimeType type = VideoCodecMimeType.fromSdpCodecName(codecType.getName());
|
||||
VideoCodecMimeType type = VideoCodecMimeType.valueOf(codecType.getName());
|
||||
MediaCodecInfo info = findCodecForType(type);
|
||||
|
||||
if (info == null) {
|
||||
@ -68,7 +68,7 @@ class MediaCodecVideoDecoderFactory implements VideoDecoderFactory {
|
||||
VideoCodecMimeType.VP9, VideoCodecMimeType.H264, VideoCodecMimeType.AV1}) {
|
||||
MediaCodecInfo codec = findCodecForType(type);
|
||||
if (codec != null) {
|
||||
String name = type.toSdpCodecName();
|
||||
String name = type.name();
|
||||
if (type == VideoCodecMimeType.H264 && isH264HighProfileSupported(codec)) {
|
||||
supportedCodecInfos.add(new VideoCodecInfo(
|
||||
name, MediaCodecUtils.getCodecProperties(type, /* highProfile= */ true)));
|
||||
@ -110,7 +110,6 @@ class MediaCodecVideoDecoderFactory implements VideoDecoderFactory {
|
||||
|
||||
// Returns true if the given MediaCodecInfo indicates a supported encoder for the given type.
|
||||
private boolean isSupportedCodec(MediaCodecInfo info, VideoCodecMimeType type) {
|
||||
String name = info.getName();
|
||||
if (!MediaCodecUtils.codecSupportsType(info, type)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -26,12 +26,4 @@ enum VideoCodecMimeType {
|
||||
String mimeType() {
|
||||
return mimeType;
|
||||
}
|
||||
|
||||
static VideoCodecMimeType fromSdpCodecName(String codecName) {
|
||||
return codecName.equals("AV1X") ? AV1 : valueOf(codecName);
|
||||
}
|
||||
|
||||
String toSdpCodecName() {
|
||||
return this == AV1 ? "AV1X" : name();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user