Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: webrtc/sdk/android/instrumentationtests/src/org/webrtc/HardwareVideoEncoderTest.java

Issue 2990583002: Move matrix from VideoFrame to TextureBuffer. (Closed)
Patch Set: Rebase & fix tests. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/sdk/android/instrumentationtests/src/org/webrtc/HardwareVideoEncoderTest.java
diff --git a/webrtc/sdk/android/instrumentationtests/src/org/webrtc/HardwareVideoEncoderTest.java b/webrtc/sdk/android/instrumentationtests/src/org/webrtc/HardwareVideoEncoderTest.java
index 7b0a38510f4a1993a089fa46d708c5d5450c87eb..39a9672dd3b537df6df7b29a412696c0d84fcbfb 100644
--- a/webrtc/sdk/android/instrumentationtests/src/org/webrtc/HardwareVideoEncoderTest.java
+++ b/webrtc/sdk/android/instrumentationtests/src/org/webrtc/HardwareVideoEncoderTest.java
@@ -101,8 +101,7 @@ public class HardwareVideoEncoderTest {
assertEquals(encoder.initEncode(SETTINGS, callback), VideoCodecStatus.OK);
VideoFrame.I420Buffer buffer = I420BufferImpl.allocate(SETTINGS.width, SETTINGS.height);
- VideoFrame frame =
- new VideoFrame(buffer, 0 /* rotation */, presentationTimestampUs * 1000, new Matrix());
+ VideoFrame frame = new VideoFrame(buffer, 0 /* rotation */, presentationTimestampUs * 1000);
VideoEncoder.EncodeInfo info = new VideoEncoder.EncodeInfo(
new EncodedImage.FrameType[] {EncodedImage.FrameType.VideoFrameKey});
@@ -162,6 +161,11 @@ public class HardwareVideoEncoderTest {
return oesTextureId;
}
+ @Override
+ public Matrix getTransformMatrix() {
+ return new Matrix();
+ }
+
@Override
public int getWidth() {
return SETTINGS.width;
@@ -182,9 +186,14 @@ public class HardwareVideoEncoderTest {
@Override
public void release() {}
+
+ @Override
+ public VideoFrame.Buffer cropAndScale(
+ int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight) {
+ return null;
+ }
};
- VideoFrame frame =
- new VideoFrame(buffer, 0 /* rotation */, presentationTimestampUs * 1000, new Matrix());
+ VideoFrame frame = new VideoFrame(buffer, 0 /* rotation */, presentationTimestampUs * 1000);
VideoEncoder.EncodeInfo info = new VideoEncoder.EncodeInfo(
new EncodedImage.FrameType[] {EncodedImage.FrameType.VideoFrameKey});

Powered by Google App Engine
This is Rietveld 408576698