Add extended webcam device common interface

This commit is contained in:
Eduardo Ramos 2023-05-15 17:43:32 +02:00
parent ee165b50ff
commit 144a8a7463
3 changed files with 10 additions and 8 deletions

View File

@ -0,0 +1,6 @@
package com.github.eduramiba.webcamcapture.drivers;
import com.github.sarxos.webcam.WebcamDevice;
public interface WebcamDeviceExtended extends WebcamDevice, WebcamDevice.FPSSource, WebcamDevice.BufferAccess, WebcamDeviceWithId, WebcamDeviceWithBufferOperations {
}

View File

@ -10,9 +10,7 @@ import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Collection;
import com.github.eduramiba.webcamcapture.drivers.WebcamDeviceWithBufferOperations;
import com.github.eduramiba.webcamcapture.drivers.WebcamDeviceWithId;
import com.github.sarxos.webcam.WebcamDevice;
import com.github.eduramiba.webcamcapture.drivers.WebcamDeviceExtended;
import com.sun.jna.Native;
import javafx.scene.image.PixelFormat;
import javafx.scene.image.PixelWriter;
@ -22,7 +20,7 @@ import org.slf4j.LoggerFactory;
import static com.github.eduramiba.webcamcapture.drivers.avfoundation.driver.LibVideoCapture.STATUS_AUTHORIZED;
public class AVFVideoDevice implements WebcamDevice, WebcamDevice.FPSSource, WebcamDevice.BufferAccess, WebcamDeviceWithId, WebcamDeviceWithBufferOperations {
public class AVFVideoDevice implements WebcamDeviceExtended {
private static final Logger LOG = LoggerFactory.getLogger(AVFVideoDevice.class);
private final int deviceIndex;

View File

@ -1,13 +1,11 @@
package com.github.eduramiba.webcamcapture.drivers.capturemanager;
import com.github.eduramiba.webcamcapture.drivers.WebcamDeviceWithBufferOperations;
import com.github.eduramiba.webcamcapture.drivers.WebcamDeviceWithId;
import com.github.eduramiba.webcamcapture.drivers.WebcamDeviceExtended;
import com.github.eduramiba.webcamcapture.drivers.capturemanager.model.CaptureManagerMediaType;
import com.github.eduramiba.webcamcapture.drivers.capturemanager.model.CaptureManagerSource;
import com.github.eduramiba.webcamcapture.drivers.capturemanager.model.CaptureManagerStreamDescriptor;
import com.github.eduramiba.webcamcapture.drivers.capturemanager.model.sinks.CaptureManagerSinkFactory;
import com.github.eduramiba.webcamcapture.utils.Pair;
import com.github.sarxos.webcam.WebcamDevice;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.nio.ByteBuffer;
@ -19,7 +17,7 @@ import javafx.scene.image.WritableImage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class CaptureManagerVideoDevice implements WebcamDevice, WebcamDevice.FPSSource, WebcamDevice.BufferAccess, WebcamDeviceWithId, WebcamDeviceWithBufferOperations {
public class CaptureManagerVideoDevice implements WebcamDeviceExtended {
private static final Logger LOG = LoggerFactory.getLogger(CaptureManagerVideoDevice.class);