Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.device.AbstractMediaDevice
      extended by net.java.sip.communicator.impl.neomedia.device.MediaDeviceImpl
          extended by net.java.sip.communicator.impl.neomedia.device.AudioMediaDeviceImpl
All Implemented Interfaces:
MediaDevice

public class AudioMediaDeviceImpl
extends MediaDeviceImpl

Extends MediaDeviceImpl with audio-specific functionality.

Author:
Lyubomir Marinov

Constructor Summary
AudioMediaDeviceImpl()
          Initializes a new AudioMediaDeviceImpl instance which represents a MediaDevice with MediaType AUDIO and a MediaDirection which does not allow sending.
AudioMediaDeviceImpl(javax.media.CaptureDeviceInfo captureDeviceInfo)
          Initializes a new AudioMediaDeviceImpl which is to provide an implementation of MediaDevice with MediaType AUDIO to a CaptureDevice with a specific CaptureDeviceInfo.
 
Method Summary
 void connect(javax.media.protocol.DataSource captureDevice)
          Connects to a specific CaptureDevice given in the form of a DataSource.
(package private)  javax.media.protocol.CaptureDevice createCaptureDevice()
          Creates the JMF CaptureDevice this instance represents and provides an implementation of MediaDevice for.
(package private)  javax.media.Renderer createRenderer()
          Initializes a new Renderer instance which is to play back media on this MediaDevice.
 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.
protected  javax.media.protocol.CaptureDevice superCreateCaptureDevice()
          Invokes the super (with respect to the AudioMediaDeviceImpl class) implementation of MediaDeviceImpl.createCaptureDevice().
 
Methods inherited from class net.java.sip.communicator.impl.neomedia.device.MediaDeviceImpl
createOutputDataSource, createTracingCaptureDevice, getCaptureDeviceInfo, getDirection, getFormat, getMediaType, getSupportedFormats, toString
 
Methods inherited from class net.java.sip.communicator.impl.neomedia.device.AbstractMediaDevice
createSession, getSupportedFormats
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AudioMediaDeviceImpl

public AudioMediaDeviceImpl()
Initializes a new AudioMediaDeviceImpl instance which represents a MediaDevice with MediaType AUDIO and a MediaDirection which does not allow sending.


AudioMediaDeviceImpl

public AudioMediaDeviceImpl(javax.media.CaptureDeviceInfo captureDeviceInfo)
Initializes a new AudioMediaDeviceImpl which is to provide an implementation of MediaDevice with MediaType AUDIO to a CaptureDevice with a specific CaptureDeviceInfo.

Parameters:
captureDeviceInfo - the CaptureDeviceInfo of the CaptureDevice to which the new instance is to provide an implementation of MediaDevice
Method Detail

connect

public void connect(javax.media.protocol.DataSource captureDevice)
             throws IOException
Connects to a specific CaptureDevice given in the form of a DataSource.

Overrides:
connect in class AbstractMediaDevice
Parameters:
captureDevice - the CaptureDevice to be connected to
Throws:
IOException - if anything wrong happens while connecting to the specified captureDevice
See Also:
AbstractMediaDevice.connect(DataSource)

createCaptureDevice

javax.media.protocol.CaptureDevice createCaptureDevice()
Creates the JMF CaptureDevice this instance represents and provides an implementation of MediaDevice for.

Overrides:
createCaptureDevice in class MediaDeviceImpl
Returns:
the JMF CaptureDevice this instance represents and provides an implementation of MediaDevice for; null if the creation fails

createRenderer

javax.media.Renderer createRenderer()
Initializes a new Renderer instance which is to play back media on this MediaDevice.

Overrides:
createRenderer in class MediaDeviceImpl
Returns:
a new Renderer instance which is to play back media on this MediaDevice or null if a suitable Renderer is to be chosen irrespective of this MediaDevice

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
Overrides:
getSupportedExtensions in class AbstractMediaDevice
Returns:
a List containing the CSRC_AUDIO_LEVEL_URN extension descriptor.

superCreateCaptureDevice

protected javax.media.protocol.CaptureDevice superCreateCaptureDevice()
Invokes the super (with respect to the AudioMediaDeviceImpl class) implementation of MediaDeviceImpl.createCaptureDevice(). Allows this instance to customize the very CaptureDevice which is to be possibly further wrapped by this instance.

Returns:
the CaptureDevice returned by the call to the super implementation of MediaDeviceImpl#createCaptureDevice.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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