Android: Expose VideoFrame.TextureBuffer.applyTransformMatrix

Bug: None
Change-Id: Id1c35dd1aa231ea25831d0354b8125d6c29d3834
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274708
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Fabian Bergmark <fabianbergmark@google.com>
Cr-Commit-Position: refs/heads/main@{#38061}
diff --git a/sdk/android/api/org/webrtc/TextureBufferImpl.java b/sdk/android/api/org/webrtc/TextureBufferImpl.java
index 31d0456..c08fc4c 100644
--- a/sdk/android/api/org/webrtc/TextureBufferImpl.java
+++ b/sdk/android/api/org/webrtc/TextureBufferImpl.java
@@ -169,6 +169,7 @@
    * existing buffer is unchanged. The given transform matrix is applied first when texture
    * coordinates are still in the unmodified [0, 1] range.
    */
+  @Override
   public TextureBufferImpl applyTransformMatrix(
       Matrix transformMatrix, int newWidth, int newHeight) {
     return applyTransformMatrix(transformMatrix, /* unscaledWidth= */ newWidth,
diff --git a/sdk/android/api/org/webrtc/VideoFrame.java b/sdk/android/api/org/webrtc/VideoFrame.java
index e9f3b52..52a378b 100644
--- a/sdk/android/api/org/webrtc/VideoFrame.java
+++ b/sdk/android/api/org/webrtc/VideoFrame.java
@@ -136,6 +136,16 @@
      * the coordinate that should be used to sample that location from the buffer.
      */
     Matrix getTransformMatrix();
+
+    /**
+     * Create a new TextureBufferImpl with an applied transform matrix and a new size. The existing
+     * buffer is unchanged. The given transform matrix is applied first when texture coordinates are
+     * still in the unmodified [0, 1] range.
+     */
+    default TextureBuffer applyTransformMatrix(
+        Matrix transformMatrix, int newWidth, int newHeight) {
+      throw new UnsupportedOperationException("Not implemented");
+    }
   }
 
   private final Buffer buffer;