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
@ -92,8 +92,6 @@ public final class Server {
|
|||||||
throw new ConfigurationException("Camera mirroring is not supported");
|
throw new ConfigurationException("Camera mirroring is not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
final Device device = new Device(options);
|
|
||||||
|
|
||||||
Thread initThread = startInitThread(options);
|
Thread initThread = startInitThread(options);
|
||||||
|
|
||||||
int scid = options.getScid();
|
int scid = options.getScid();
|
||||||
@ -102,7 +100,9 @@ public final class Server {
|
|||||||
boolean video = options.getVideo();
|
boolean video = options.getVideo();
|
||||||
boolean audio = options.getAudio();
|
boolean audio = options.getAudio();
|
||||||
boolean sendDummyByte = options.getSendDummyByte();
|
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);
|
Workarounds.apply(audio, camera);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user