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:
Lubomir 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.
 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.
 
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
close, createSession, getSession, 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

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.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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