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.
orientation.10
Romain Vimont 6 months ago
parent 7e3b935932
commit 45a073a333

@ -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…
Cancel
Save