Remove the `createDecoder(String)` overload This method has been deprecated since 2018-07: https://webrtc-review.googlesource.com/c/src/+/88368/ It is never called by WebRTC itself. Custom `VideoDecoderFactory` implementations overriding this method can switch to the overload accepting a `VideoCodecInfo` object. This is also adding a `toString()` implementation to `VideoCodecInfo`, to make logging of the value more useful. Bug: webrtc:7925 Change-Id: I70ec07a0cd4ffa07d165c9851e393439fcc5870b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221960 Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org> Reviewed-by: Paulina Hensman <phensman@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34302}
diff --git a/sdk/android/api/org/webrtc/SoftwareVideoDecoderFactory.java b/sdk/android/api/org/webrtc/SoftwareVideoDecoderFactory.java index 0c9dcbe..c59db3b 100644 --- a/sdk/android/api/org/webrtc/SoftwareVideoDecoderFactory.java +++ b/sdk/android/api/org/webrtc/SoftwareVideoDecoderFactory.java
@@ -16,13 +16,6 @@ import java.util.List; public class SoftwareVideoDecoderFactory implements VideoDecoderFactory { - @Deprecated - @Nullable - @Override - public VideoDecoder createDecoder(String codecType) { - return createDecoder(new VideoCodecInfo(codecType, new HashMap<>())); - } - @Nullable @Override public VideoDecoder createDecoder(VideoCodecInfo codecInfo) {
diff --git a/sdk/android/api/org/webrtc/VideoCodecInfo.java b/sdk/android/api/org/webrtc/VideoCodecInfo.java index 8dd9295..e11782d 100644 --- a/sdk/android/api/org/webrtc/VideoCodecInfo.java +++ b/sdk/android/api/org/webrtc/VideoCodecInfo.java
@@ -69,6 +69,11 @@ return Arrays.hashCode(values); } + @Override + public String toString() { + return "VideoCodec{" + name + " " + params + "}"; + } + @CalledByNative String getName() { return name;
diff --git a/sdk/android/api/org/webrtc/VideoDecoderFactory.java b/sdk/android/api/org/webrtc/VideoDecoderFactory.java index 2dd0967..3f0168f 100644 --- a/sdk/android/api/org/webrtc/VideoDecoderFactory.java +++ b/sdk/android/api/org/webrtc/VideoDecoderFactory.java
@@ -18,18 +18,7 @@ * Creates a VideoDecoder for the given codec. Supports the same codecs supported by * VideoEncoderFactory. */ - @Deprecated - @Nullable - default VideoDecoder createDecoder(String codecType) { - throw new UnsupportedOperationException("Deprecated and not implemented."); - } - - /** Creates a decoder for the given video codec. */ - @Nullable - @CalledByNative - default VideoDecoder createDecoder(VideoCodecInfo info) { - return createDecoder(info.getName()); - } + @Nullable @CalledByNative VideoDecoder createDecoder(VideoCodecInfo info); /** * Enumerates the list of supported video codecs.