diff --git a/sdk/android/api/org/webrtc/TextureBufferImpl.java b/sdk/android/api/org/webrtc/TextureBufferImpl.java index c08fc4c29b..7e2bed84fc 100644 --- a/sdk/android/api/org/webrtc/TextureBufferImpl.java +++ b/sdk/android/api/org/webrtc/TextureBufferImpl.java @@ -140,18 +140,12 @@ public class TextureBufferImpl implements VideoFrame.TextureBuffer { (int) Math.round(unscaledHeight * cropHeight / (float) height), scaleWidth, scaleHeight); } - /** - * Returns the width of the texture in memory. This should only be used for downscaling, and you - * should still respect the width from getWidth(). - */ + @Override public int getUnscaledWidth() { return unscaledWidth; } - /** - * Returns the height of the texture in memory. This should only be used for downscaling, and you - * should still respect the height from getHeight(). - */ + @Override public int getUnscaledHeight() { return unscaledHeight; } diff --git a/sdk/android/api/org/webrtc/VideoFrame.java b/sdk/android/api/org/webrtc/VideoFrame.java index 52a378b8f8..443a0315af 100644 --- a/sdk/android/api/org/webrtc/VideoFrame.java +++ b/sdk/android/api/org/webrtc/VideoFrame.java @@ -146,6 +146,22 @@ public class VideoFrame implements RefCounted { Matrix transformMatrix, int newWidth, int newHeight) { throw new UnsupportedOperationException("Not implemented"); } + + /** + * Returns the width of the texture in memory. This should only be used for downscaling, and you + * should still respect the width from getWidth(). + */ + default public int getUnscaledWidth() { + return getWidth(); + } + + /** + * Returns the height of the texture in memory. This should only be used for downscaling, and + * you should still respect the height from getHeight(). + */ + default public int getUnscaledHeight() { + return getHeight(); + } } private final Buffer buffer;