Remove useless configure() method
Inline its single call.
This commit is contained in:
parent
52f85fd6f1
commit
6cccf3ab2a
1 changed files with 1 additions and 5 deletions
|
@ -94,7 +94,7 @@ public class ScreenEncoder implements Device.RotationListener {
|
||||||
|
|
||||||
Surface surface = null;
|
Surface surface = null;
|
||||||
try {
|
try {
|
||||||
configure(codec, format);
|
codec.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);
|
||||||
surface = codec.createInputSurface();
|
surface = codec.createInputSurface();
|
||||||
setDisplaySurface(display, surface, videoRotation, contentRect, unlockedVideoRect, layerStack);
|
setDisplaySurface(display, surface, videoRotation, contentRect, unlockedVideoRect, layerStack);
|
||||||
codec.start();
|
codec.start();
|
||||||
|
@ -279,10 +279,6 @@ public class ScreenEncoder implements Device.RotationListener {
|
||||||
return SurfaceControl.createDisplay("scrcpy", secure);
|
return SurfaceControl.createDisplay("scrcpy", secure);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void configure(MediaCodec codec, MediaFormat format) {
|
|
||||||
codec.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void setSize(MediaFormat format, int width, int height) {
|
private static void setSize(MediaFormat format, int width, int height) {
|
||||||
format.setInteger(MediaFormat.KEY_WIDTH, width);
|
format.setInteger(MediaFormat.KEY_WIDTH, width);
|
||||||
format.setInteger(MediaFormat.KEY_HEIGHT, height);
|
format.setInteger(MediaFormat.KEY_HEIGHT, height);
|
||||||
|
|
Loading…
Reference in a new issue