Class DSCaptureDevice


  • public class DSCaptureDevice
    extends Object
    DirectShow capture device.
    Author:
    Sebastien Vincent, Lyubomir Marinov
    • Constructor Detail

      • DSCaptureDevice

        public DSCaptureDevice​(long ptr)
        Constructor.
        Parameters:
        ptr - native pointer
    • Method Detail

      • connect

        public void connect()
        Connects to this DirectShow video capture device.
      • disconnect

        public void disconnect()
        Disconnects from this DirectShow video capture device.
      • getFormat

        public DSFormat getFormat()
        Get current format.
        Returns:
        current format used
      • getName

        public String getName()
        Get name of the capture device.
        Returns:
        name of the capture device
      • getSupportedFormats

        public DSFormat[] getSupportedFormats()
        Get the supported video format this capture device supports.
        Returns:
        array of DSFormat
      • setDelegate

        public void setDelegate​(DSCaptureDevice.ISampleGrabberCB delegate)
        Set a delegate to use when a frame is received.
        Parameters:
        delegate - delegate
      • setFormat

        public int setFormat​(DSFormat format)
        Set format to use with this capture device.
        Parameters:
        format - format to set
        Returns:
        an HRESULT value indicating whether the specified format was successfully set or describing a failure
      • start

        public int start()
      • stop

        public int stop()