Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia.device
Class AbstractMediaDevice

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.device.AbstractMediaDevice
All Implemented Interfaces:
MediaDevice
Direct Known Subclasses:
AudioMixerMediaDevice, MediaDeviceImpl, VideoTranslatorMediaDevice

public abstract class AbstractMediaDevice
extends Object
implements MediaDevice

Defines the interface for MediaDevice required by the net.java.sip.communicator.impl.neomedia implementation of net.java.sip.communicator.service.neomedia.

Author:
Lyubomir Marinov

Constructor Summary
AbstractMediaDevice()
           
 
Method Summary
 void close()
          Closes this MediaDevice.
 void connect(javax.media.protocol.DataSource captureDevice)
          Connects to a specific CaptureDevice given in the form of a DataSource.
(package private) abstract  javax.media.protocol.DataSource createOutputDataSource()
          Creates a DataSource instance for this MediaDevice which gives access to the captured media.
 MediaDeviceSession createSession()
          Creates a new MediaDeviceSession instance which is to represent the use of this MediaDevice by a MediaStream.
 MediaDeviceSession getSession()
          Get the last used MediaDeviceSession.
 List<RTPExtension> getSupportedExtensions()
          Returns a List containing (at the time of writing) a single extension descriptor indicating RECVONLY support for mixer-to-client audio levels.
 List<MediaFormat> getSupportedFormats()
          Gets a list of MediaFormats supported by this MediaDevice.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.java.sip.communicator.service.neomedia.device.MediaDevice
getDirection, getFormat, getMediaType, getSupportedFormats
 

Constructor Detail

AbstractMediaDevice

public AbstractMediaDevice()
Method Detail

close

public void close()
Closes this MediaDevice.


connect

public void connect(javax.media.protocol.DataSource captureDevice)
             throws IOException
Connects to a specific CaptureDevice given in the form of a DataSource. Explicitly defined in order to allow extenders to customize the connect procedure.

Parameters:
captureDevice - the CaptureDevice to be connected to
Throws:
IOException - if anything wrong happens while connecting to the specified captureDevice

createOutputDataSource

abstract javax.media.protocol.DataSource createOutputDataSource()
Creates a DataSource instance for this MediaDevice which gives access to the captured media.

Returns:
a DataSource instance which gives access to the media captured by this MediaDevice

createSession

public MediaDeviceSession createSession()
Creates a new MediaDeviceSession instance which is to represent the use of this MediaDevice by a MediaStream.

Returns:
a new MediaDeviceSession instance which is to represent the use of this MediaDevice by a MediaStream

getSession

public MediaDeviceSession getSession()
Get the last used MediaDeviceSession.

Returns:
MediaDeviceSession

getSupportedExtensions

public List<RTPExtension> getSupportedExtensions()
Returns a List containing (at the time of writing) a single extension descriptor indicating RECVONLY support for mixer-to-client audio levels.

Specified by:
getSupportedExtensions in interface MediaDevice
Returns:
a List containing the CSRC_AUDIO_LEVEL_URN extension descriptor.

getSupportedFormats

public List<MediaFormat> getSupportedFormats()
Gets a list of MediaFormats supported by this MediaDevice.

Specified by:
getSupportedFormats in interface MediaDevice
Returns:
the list of MediaFormats supported by this device
See Also:
MediaDevice.getSupportedFormats()

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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