Class QTCaptureDevice


  • public class QTCaptureDevice
    extends NSObject
    Represents a QTKit capture device which is connected or has been previously connected to the user's computer during the lifetime of the application.
    Author:
    Lyubomir Marinov
    • Constructor Detail

      • QTCaptureDevice

        public QTCaptureDevice​(long ptr)
        Initializes a new QTCaptureDevice instance which is to represent a specific QTKit QTCaptureDevice object.
        Parameters:
        ptr - the pointer to the QTKit QTCaptureDevice object which is to be represented by the new instance
    • Method Detail

      • close

        public void close()
        Releases application control over this device acquired in the open() method.
      • deviceWithUniqueID

        public static QTCaptureDevice deviceWithUniqueID​(String deviceUID)
        Gets the QTCaptureDevice with a specific unique identifier.
        Parameters:
        deviceUID - the unique identifier of the QTCaptureDevice to be retrieved
        Returns:
        the QTCaptureDevice with the specified unique identifier if such a QTCaptureDevice exists; otherwise, null
      • finalize

        protected void finalize()
        Called by the garbage collector to release system resources and perform other cleanup.
        Overrides:
        finalize in class Object
        See Also:
        Object.finalize()
      • isConnected

        public boolean isConnected()
        Gets the indicator which determines whether this QTCaptureDevice is connected and available to applications.
        Returns:
        true if this QTCaptureDevice is connected and available to applications; otherwise, false
      • localizedDisplayName

        public String localizedDisplayName()
        Gets the localized human-readable name of this QTCaptureDevice.
        Returns:
        the localized human-readable name of this QTCaptureDevice
      • open

        public boolean open()
                     throws NSErrorException
        Attempts to give the application control over this QTCaptureDevice so that it can be used for capture.
        Returns:
        true if this device was opened successfully; otherwise, false
        Throws:
        NSErrorException - if this device was not opened successfully and carries an NSError describing why this device could not be opened
      • uniqueID

        public String uniqueID()
        Gets the unique identifier of this QTCaptureDevice.
        Returns:
        the unique identifier of this QTCaptureDevice
      • getVideoMinFrameDuration

        public double getVideoMinFrameDuration()
      • setVideoMinFrameDuration

        public double setVideoMinFrameDuration​(double videoMinframeDuration)