+
+ public void onVideoFrame(Consumer<Frame> consumer) {
+ frameConsumer = consumer;
+ }
+
+ private void onFrame(Frame frame) {
+ updateWithFrame(frame.getLedFrame());
+ }
+
+ public void onVideoDeviceChange(Optional<File> videoDevice) {
+ // Should only happen when this mode is active!
+ if (thread != null) {
+ thread.interrupt();
+ }
+ videoDevice.ifPresent(this::startGrabberThread);
+ }