mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-20 03:25:03 +00:00
Do not create Device instance for camera
The device instance manages the display and the injection of input events. It is not necessary for camera capture.
This commit is contained in:
parent
7e3b935932
commit
45a073a333
1 changed files with 3 additions and 3 deletions
|
@ -92,8 +92,6 @@ public final class Server {
|
|||
throw new ConfigurationException("Camera mirroring is not supported");
|
||||
}
|
||||
|
||||
final Device device = new Device(options);
|
||||
|
||||
Thread initThread = startInitThread(options);
|
||||
|
||||
int scid = options.getScid();
|
||||
|
@ -102,7 +100,9 @@ public final class Server {
|
|||
boolean video = options.getVideo();
|
||||
boolean audio = options.getAudio();
|
||||
boolean sendDummyByte = options.getSendDummyByte();
|
||||
boolean camera = options.getVideoSource() == VideoSource.CAMERA;
|
||||
boolean camera = video && options.getVideoSource() == VideoSource.CAMERA;
|
||||
|
||||
final Device device = camera ? null : new Device(options);
|
||||
|
||||
Workarounds.apply(audio, camera);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue