Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia.quicktime
Class QTCaptureDevice

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.quicktime.NSObject
      extended by net.java.sip.communicator.impl.neomedia.quicktime.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:
Lubomir Marinov

Constructor Summary
QTCaptureDevice(long ptr)
          Initializes a new QTCaptureDevice instance which is to represent a specific QTKit QTCaptureDevice object.
 
Method Summary
 void close()
          Releases application control over this device acquired in the open() method.
static QTCaptureDevice deviceWithUniqueID(String deviceUID)
          Gets the QTCaptureDevice with a specific unique identifier.
protected  void finalize()
          Called by the garbage collector to release system resources and perform other cleanup.
 QTFormatDescription[] formatDescriptions()
           
static QTCaptureDevice[] inputDevicesWithMediaType(QTMediaType mediaType)
           
 boolean isConnected()
          Gets the indicator which determines whether this QTCaptureDevice is connected and available to applications.
 String localizedDisplayName()
          Gets the localized human-readable name of this QTCaptureDevice.
 boolean open()
          Attempts to give the application control over this QTCaptureDevice so that it can be used for capture.
 String uniqueID()
          Gets the unique identifier of this QTCaptureDevice.
 
Methods inherited from class net.java.sip.communicator.impl.neomedia.quicktime.NSObject
getPtr, release, release, retain, retain, setPtr
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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()

formatDescriptions

public QTFormatDescription[] formatDescriptions()

inputDevicesWithMediaType

public static QTCaptureDevice[] inputDevicesWithMediaType(QTMediaType mediaType)

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

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.