Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.neomedia.device
Interface MediaDevice

All Known Subinterfaces:
MediaDeviceWrapper
All Known Implementing Classes:
AbstractMediaDevice, AudioMediaDeviceImpl, AudioMixerMediaDevice, MediaDeviceImpl, VideoTranslatorMediaDevice

public interface MediaDevice

The MediaDevice class represents capture and playback devices that can be used to grab or render media. Sound cards, USB phones and webcams are examples of such media devices.

Author:
Emil Ivov

Method Summary
 MediaDirection getDirection()
          Returns the MediaDirection supported by this device.
 MediaFormat getFormat()
          Returns the MediaFormat that this device is currently set to use when capturing data.
 MediaType getMediaType()
          Returns the MediaType that this device supports.
 List<RTPExtension> getSupportedExtensions()
          Returns the List of RTPExtensions that this device know how to handle.
 List<MediaFormat> getSupportedFormats()
          Returns a list of MediaFormat instances representing the media formats supported by this MediaDevice.
 List<MediaFormat> getSupportedFormats(QualityPreset localPreset, QualityPreset remotePreset)
          Returns a list of MediaFormat instances representing the media formats supported by this MediaDevice.
 

Method Detail

getDirection

MediaDirection getDirection()
Returns the MediaDirection supported by this device.

Returns:
MediaDirection.SENDONLY if this is a read-only device, MediaDirection.RECVONLY if this is a write-only device and MediaDirection.SENDRECV if this MediaDevice can both capture and render media.

getFormat

MediaFormat getFormat()
Returns the MediaFormat that this device is currently set to use when capturing data.

Returns:
the MediaFormat that this device is currently set to provide media in.

getMediaType

MediaType getMediaType()
Returns the MediaType that this device supports.

Returns:
MediaType.AUDIO if this is an audio device or MediaType.VIDEO in case of a video device.

getSupportedExtensions

List<RTPExtension> getSupportedExtensions()
Returns the List of RTPExtensions that this device know how to handle.

Returns:
the List of RTPExtensions that this device know how to handle or null if the device does not support any RTP extensions.

getSupportedFormats

List<MediaFormat> getSupportedFormats()
Returns a list of MediaFormat instances representing the media formats supported by this MediaDevice.

Returns:
the list of MediaFormats supported by this device.

getSupportedFormats

List<MediaFormat> getSupportedFormats(QualityPreset localPreset,
                                      QualityPreset remotePreset)
Returns a list of MediaFormat instances representing the media formats supported by this MediaDevice.

Parameters:
localPreset - the preset used to set the send format parameters, used for video and settings.
remotePreset - the preset used to set the receive format parameters, used for video and settings.
Returns:
the list of MediaFormats supported by this device.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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