Fix tests again

pull/545/head
Mattia Iavarone 6 years ago
parent f4ad4df643
commit 15618d9d82
  1. 2
      cameraview/src/androidTest/java/com/otaliastudios/cameraview/internal/DeviceEncodersTest.java
  2. 5
      cameraview/src/main/java/com/otaliastudios/cameraview/internal/DeviceEncoders.java

@ -38,7 +38,7 @@ public class DeviceEncodersTest extends BaseTest {
// This is guaranteed to work, see
// https://developer.android.com/guide/topics/media/media-formats
private final static Size GUARANTEED_SIZE = new Size(360, 380);
private final static Size GUARANTEED_SIZE = new Size(176, 144);
private boolean enabled;

@ -150,6 +150,11 @@ public class DeviceEncoders {
" Desired:" + height +
" Range:" + mVideoCapabilities.getSupportedHeights());
}
if (!mVideoCapabilities.isSizeSupported(width, height)) {
throw new RuntimeException("Size not supported for unknown reason." +
" Might be an aspect ratio issue." +
" Desired size:" + size);
}
Size adjusted = new Size(width, height);
LOG.i("getSupportedVideoSize -", "inputSize:", size, "adjustedSize:", adjusted);
return adjusted;

Loading…
Cancel
Save