Package org.jitsi.impl.neomedia.device
Class AudioMediaDeviceImpl
- java.lang.Object
-
- org.jitsi.impl.neomedia.device.AbstractMediaDevice
-
- org.jitsi.impl.neomedia.device.MediaDeviceImpl
-
- org.jitsi.impl.neomedia.device.AudioMediaDeviceImpl
-
- All Implemented Interfaces:
MediaDevice
- Direct Known Subclasses:
AudioSilenceMediaDevice
public class AudioMediaDeviceImpl extends MediaDeviceImpl
Extends MediaDeviceImpl with audio-specific functionality.- Author:
- Lyubomir Marinov
-
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnect(javax.media.protocol.DataSource captureDevice)Connects to a specific CaptureDevice given in the form of a DataSource.protected javax.media.protocol.CaptureDevicecreateCaptureDevice()Creates the JMF CaptureDevice this instance represents and provides an implementation of MediaDevice for.protected javax.media.RenderercreateRenderer()Initializes a new Renderer instance which is to play back media on this MediaDevice.List<RTPExtension>getSupportedExtensions()Returns a List containing extension descriptor indicating RECVONLY support for mixer-to-client audio levels, and extension descriptor indicating SENDRECV support for client-to-mixer audio levels.protected javax.media.protocol.CaptureDevicesuperCreateCaptureDevice()Invokes the super (with respect to the AudioMediaDeviceImpl class) implementation ofMediaDeviceImpl.createCaptureDevice().-
Methods inherited from class org.jitsi.impl.neomedia.device.MediaDeviceImpl
createOutputDataSource, createTracingCaptureDevice, getCaptureDeviceInfo, getCaptureDeviceInfoLocatorProtocol, getDirection, getFormat, getMediaType, getSupportedFormats, getSupportedFormats, getSupportedFormats, toString
-
Methods inherited from class org.jitsi.impl.neomedia.device.AbstractMediaDevice
createPlayer, createSession, getSupportedFormats
-
-
-
-
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 IOExceptionConnects to a specific CaptureDevice given in the form of a DataSource.- Overrides:
connectin classAbstractMediaDevice- 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
protected javax.media.protocol.CaptureDevice createCaptureDevice()
Creates the JMF CaptureDevice this instance represents and provides an implementation of MediaDevice for.- Overrides:
createCaptureDevicein classMediaDeviceImpl- Returns:
- the JMF CaptureDevice this instance represents and provides an implementation of MediaDevice for; null if the creation fails
-
createRenderer
protected javax.media.Renderer createRenderer()
Initializes a new Renderer instance which is to play back media on this MediaDevice. Allows extenders to initialize a specific Renderer instance. The implementation of AbstractMediaDevice returns null which means that it is left to FMJ to choose a suitable Renderer irrespective of this MediaDevice. Tries to delegate the initialization of a new Renderer instance to the AudioSystem which provides the CaptureDevice of this instance. This way both the capture and the playback are given a chance to happen within the same AudioSystem. If the discovery of the delegate fails, the implementation of MediaDeviceImpl is executed and it currently leaves it to FMJ to choose a Renderer irrespective of this MediaDevice.- Overrides:
createRendererin classAbstractMediaDevice- 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 extension descriptor indicating RECVONLY support for mixer-to-client audio levels, and extension descriptor indicating SENDRECV support for client-to-mixer audio levels. We add the ssrc audio levels as first element, in order when making offer to be the first one (id 1) as some other systems have this hardcoded it as 1 (jicofo).- Specified by:
getSupportedExtensionsin interfaceMediaDevice- Overrides:
getSupportedExtensionsin classAbstractMediaDevice- Returns:
- a List containing the CSRC_AUDIO_LEVEL_URN and SSRC_AUDIO_LEVEL_URN extension descriptor.
-
superCreateCaptureDevice
protected javax.media.protocol.CaptureDevice superCreateCaptureDevice()
Invokes the super (with respect to the AudioMediaDeviceImpl class) implementation ofMediaDeviceImpl.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.
-
-