public class MediaDeviceImpl extends AbstractMediaDevice
Constructor and Description |
---|
MediaDeviceImpl(javax.media.CaptureDeviceInfo captureDeviceInfo,
MediaType mediaType)
Initializes a new MediaDeviceImpl instance which is to provide
an implementation of MediaDevice for a CaptureDevice
with a specific CaptureDeviceInfo and which is of a specific
MediaType.
|
MediaDeviceImpl(MediaType mediaType)
Initializes a new MediaDeviceImpl instance with a specific
MediaType and with MediaDirection which does not allow
sending.
|
Modifier and Type | Method and Description |
---|---|
protected javax.media.protocol.CaptureDevice |
createCaptureDevice()
Creates the JMF CaptureDevice this instance represents and
provides an implementation of MediaDevice for.
|
protected javax.media.protocol.DataSource |
createOutputDataSource()
Creates a DataSource instance for this MediaDevice
which gives access to the captured media.
|
static javax.media.protocol.CaptureDevice |
createTracingCaptureDevice(javax.media.protocol.CaptureDevice captureDevice,
Logger logger)
Creates a new CaptureDevice which traces calls to a specific
CaptureDevice for debugging purposes.
|
javax.media.CaptureDeviceInfo |
getCaptureDeviceInfo()
Gets the CaptureDeviceInfo of the JMF CaptureDevice
represented by this instance.
|
java.lang.String |
getCaptureDeviceInfoLocatorProtocol()
Gets the protocol of the MediaLocator of the
CaptureDeviceInfo represented by this instance.
|
MediaDirection |
getDirection()
Returns the MediaDirection supported by this device.
|
MediaFormat |
getFormat()
Gets the MediaFormat in which this MediaDevice captures
media.
|
MediaType |
getMediaType()
Gets the MediaType that this device supports.
|
java.util.List<MediaFormat> |
getSupportedFormats(EncodingConfiguration encodingConfiguration)
Gets the list of MediaFormats supported by this
MediaDevice and enabled in encodingConfiguration.
|
java.util.List<MediaFormat> |
getSupportedFormats(QualityPreset sendPreset,
QualityPreset receivePreset)
Gets the list of MediaFormats supported by this
MediaDevice.
|
java.util.List<MediaFormat> |
getSupportedFormats(QualityPreset sendPreset,
QualityPreset receivePreset,
EncodingConfiguration encodingConfiguration)
Gets the list of MediaFormats supported by this
MediaDevice and enabled in encodingConfiguration.
|
java.lang.String |
toString()
Gets a human-readable String representation of this instance.
|
connect, createPlayer, createRenderer, createSession, getSupportedExtensions, getSupportedFormats
public MediaDeviceImpl(javax.media.CaptureDeviceInfo captureDeviceInfo, MediaType mediaType)
captureDeviceInfo
- the CaptureDeviceInfo of the JMF
CaptureDevice the new instance is to provide an implementation
of MediaDevice formediaType
- the MediaType of the new instancepublic MediaDeviceImpl(MediaType mediaType)
mediaType
- the MediaType of the new instancepublic static javax.media.protocol.CaptureDevice createTracingCaptureDevice(javax.media.protocol.CaptureDevice captureDevice, Logger logger)
captureDevice
- the CaptureDevice which is to have its
calls traced for debugging outputlogger
- the Logger to be used for logging the trace
messagesprotected javax.media.protocol.CaptureDevice createCaptureDevice()
protected javax.media.protocol.DataSource createOutputDataSource()
createOutputDataSource
in class AbstractMediaDevice
AbstractMediaDevice.createOutputDataSource()
public javax.media.CaptureDeviceInfo getCaptureDeviceInfo()
public java.lang.String getCaptureDeviceInfoLocatorProtocol()
public MediaDirection getDirection()
MediaDirection.SENDONLY
if this is a read-only device,
MediaDirection.RECVONLY
if this is a write-only device or
MediaDirection.SENDRECV
if this MediaDevice can both
capture and render mediaMediaDevice.getDirection()
public MediaFormat getFormat()
MediaDevice.getFormat()
public MediaType getMediaType()
MediaType.AUDIO
if this is an audio device or
MediaType.VIDEO
if this is a video deviceMediaDevice.getMediaType()
public java.util.List<MediaFormat> getSupportedFormats(EncodingConfiguration encodingConfiguration)
encodingConfiguration
- the EncodingConfiguration instance
to useMediaDevice.getSupportedFormats()
public java.util.List<MediaFormat> getSupportedFormats(QualityPreset sendPreset, QualityPreset receivePreset)
sendPreset
- the preset used to set some of the format parameters,
used for video and settings.receivePreset
- the preset used to set the receive format
parameters, used for video and settings.MediaDevice.getSupportedFormats()
public java.util.List<MediaFormat> getSupportedFormats(QualityPreset sendPreset, QualityPreset receivePreset, EncodingConfiguration encodingConfiguration)
sendPreset
- the preset used to set some of the format parameters,
used for video and settings.receivePreset
- the preset used to set the receive format
parameters, used for video and settings.encodingConfiguration
- the EncodingConfiguration instance
to useMediaDevice.getSupportedFormats()
public java.lang.String toString()
toString
in class java.lang.Object
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.