Package org.jitsi.impl.neomedia.device
Class CaptureDeviceInfo2
- java.lang.Object
-
- javax.media.CaptureDeviceInfo
-
- org.jitsi.impl.neomedia.device.CaptureDeviceInfo2
-
- All Implemented Interfaces:
Serializable
public class CaptureDeviceInfo2 extends javax.media.CaptureDeviceInfoAdds some important information (i.e. device type, UID.) to FMJ CaptureDeviceInfo.- Author:
- Vincent Lucas, Lyubomir Marinov
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CaptureDeviceInfo2(String name, javax.media.MediaLocator locator, javax.media.Format[] formats, String uid, String transportType, String modelIdentifier)Initializes a new CaptureDeviceInfo2 instance with the specified name, media locator, and array of Format objects.CaptureDeviceInfo2(javax.media.CaptureDeviceInfo captureDeviceInfo, String uid, String transportType, String modelIdentifier)Initializes a new CaptureDeviceInfo2 instance from a specific CaptureDeviceInfo instance and additional information specific to the CaptureDeviceInfo2 class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Determines whether a specific Object is equal (by value) to this instance.StringgetIdentifier()Returns the device identifier used to save and load device preferences.StringgetModelIdentifier()Returns the model identifier of this instance.StringgetTransportType()Returns the device transport type of this instance.StringgetUID()Returns the device UID (unique identifier) of this instance, if available.inthashCode()Returns a hash code value for this object for the benefit of hashtables.booleanisSameTransportType(String transportType)Determines whether a specific transport type is equal to/the same as the transport type of this instance.
-
-
-
Constructor Detail
-
CaptureDeviceInfo2
public CaptureDeviceInfo2(javax.media.CaptureDeviceInfo captureDeviceInfo, String uid, String transportType, String modelIdentifier)Initializes a new CaptureDeviceInfo2 instance from a specific CaptureDeviceInfo instance and additional information specific to the CaptureDeviceInfo2 class. Because the properties of the specified captureDeviceInfo are copied into the new instance, the constructor is to be used when a CaptureDeviceInfo exists for other purposes already; otherwise, it is preferable to useCaptureDeviceInfo2(String, MediaLocator, Format[], String, String, String).- Parameters:
captureDeviceInfo- the CaptureDeviceInfo whose properties are to be copied into the new instanceuid- the unique identifier of the hardware device (interface) which is to be represented by the new instancetransportType- the transport type (e.g. USB) of the device to be represented by the new instancemodelIdentifier- the persistent identifier of the model of the hardware device to be represented by the new instance
-
CaptureDeviceInfo2
public CaptureDeviceInfo2(String name, javax.media.MediaLocator locator, javax.media.Format[] formats, String uid, String transportType, String modelIdentifier)
Initializes a new CaptureDeviceInfo2 instance with the specified name, media locator, and array of Format objects.- Parameters:
name- the human-readable name of the new instancelocator- the MediaLocator which uniquely identifies the device to be described by the new instanceformats- an array of the Formats supported by the device to be described by the new instanceuid- the unique identifier of the hardware device (interface) which is to be represented by the new instancetransportType- the transport type (e.g. USB) of the device to be represented by the new instancemodelIdentifier- the persistent identifier of the model of the hardware device to be represented by the new instance
-
-
Method Detail
-
equals
public boolean equals(Object obj)
Determines whether a specific Object is equal (by value) to this instance.- Overrides:
equalsin classjavax.media.CaptureDeviceInfo- Parameters:
obj- the Object to be determined whether it is equal (by value) to this instance- Returns:
- true if the specified obj is equal (by value) to this instance; otherwise, false
-
getIdentifier
public String getIdentifier()
Returns the device identifier used to save and load device preferences. It is composed by the system UID if not null. Otherwise returns the device name and (if not null) the transport type.- Returns:
- The device identifier.
-
getTransportType
public String getTransportType()
Returns the device transport type of this instance.- Returns:
- the device transport type of this instance
-
getUID
public String getUID()
Returns the device UID (unique identifier) of this instance, if available. If unavailable (e.g. because the device system does not have persistent names, like ALSA) it falls back togetModelIdentifier().- Returns:
- the device UID (unique identifier) of this instance
-
getModelIdentifier
public String getModelIdentifier()
Returns the model identifier of this instance.- Returns:
- the model identifier of this instance
-
hashCode
public int hashCode()
Returns a hash code value for this object for the benefit of hashtables.- Overrides:
hashCodein classjavax.media.CaptureDeviceInfo- Returns:
- a hash code value for this object for the benefit of hashtables
-
isSameTransportType
public boolean isSameTransportType(String transportType)
Determines whether a specific transport type is equal to/the same as the transport type of this instance.- Parameters:
transportType- the transport type to compare to the transport type of this instance- Returns:
- true if the specified transportType is equal to/the same as the transport type of this instance; otherwise, false
-
-