public class AudioMixerMediaDevice extends AbstractMediaDevice implements MediaDeviceWrapper
AudioMixer
.Constructor and Description |
---|
AudioMixerMediaDevice(AudioMediaDeviceImpl device)
Initializes a new AudioMixerMediaDevice instance which is to
enable audio mixing on a specific AudioMediaDeviceImpl.
|
Modifier and Type | Method and Description |
---|---|
void |
connect(javax.media.protocol.DataSource captureDevice)
Connects to a specific CaptureDevice given in the form of a
DataSource.
|
AudioMixingPushBufferDataSource |
createOutputDataSource()
Creates a DataSource instance for this MediaDevice
which gives access to the captured media.
|
protected javax.media.Processor |
createPlayer(javax.media.protocol.DataSource dataSource)
Initializes a new Processor instance which is to be used to play
back media on this MediaDevice.
|
protected javax.media.Renderer |
createRenderer()
Initializes a new Renderer instance which is to play back media
on this MediaDevice.
|
MediaDeviceSession |
createSession()
Creates a new MediaDeviceSession instance which is to represent
the use of this MediaDevice by a MediaStream.
|
MediaDirection |
getDirection()
Returns the MediaDirection supported by this device.
|
MediaFormat |
getFormat()
Gets the MediaFormat in which this
|
MediaType |
getMediaType()
Gets the MediaType that this device supports.
|
java.util.List<RTPExtension> |
getSupportedExtensions()
Returns a List containing (at the time of writing) a single
extension descriptor indicating SENDRECV for mixer-to-client
audio levels.
|
java.util.List<MediaFormat> |
getSupportedFormats(QualityPreset sendPreset,
QualityPreset receivePreset)
Gets the list of MediaFormats supported by this
MediaDevice.
|
java.util.List<MediaFormat> |
getSupportedFormats(QualityPreset sendPreset,
QualityPreset receivePreset,
EncodingConfiguration encodingConfiguration)
Gets the list of MediaFormats supported by this
MediaDevice and enabled in encodingConfiguration.
|
TranscodingDataSource |
getTranscodingDataSource(javax.media.protocol.DataSource inputDataSource)
Returns the TranscodingDataSource associated with
inputDataSource in this object's AudioMixer.
|
MediaDevice |
getWrappedDevice()
Gets the actual MediaDevice which this MediaDevice is
effectively built on top of and forwarding to.
|
(package private) void |
removeInputDataSources(DataSourceFilter dataSourceFilter)
Removes the DataSource accepted by a specific
DataSourceFilter from the list of input DataSource of
the AudioMixer of this AudioMixerMediaDevice from
which it reads audio to be mixed.
|
void |
setReceiveStreamBufferListener(ReceiveStreamBufferListener listener)
Set the listener which gets notified when this MediaDevice
reads data from a ReceiveStream
|
getSupportedFormats
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSupportedFormats
public AudioMixerMediaDevice(AudioMediaDeviceImpl device)
device
- the AudioMediaDeviceImpl which the new instance is
to enable audio mixing onpublic void connect(javax.media.protocol.DataSource captureDevice) throws java.io.IOException
connect
in class AbstractMediaDevice
captureDevice
- the CaptureDevice to be connected tojava.io.IOException
- if anything wrong happens while connecting to the
specified captureDeviceAbstractMediaDevice.connect(DataSource)
public AudioMixingPushBufferDataSource createOutputDataSource()
createOutputDataSource
in class AbstractMediaDevice
AbstractMediaDevice.createOutputDataSource()
protected javax.media.Processor createPlayer(javax.media.protocol.DataSource dataSource) throws java.lang.Exception
AbstractMediaDevice.createPlayer(DataSource)
implementation of the MediaDevice on which this instance enables
mixing i.e. getWrappedDevice()
.createPlayer
in class AbstractMediaDevice
dataSource
- the DataSource which is to be played back by
the new Processor instancejava.lang.Exception
- if an exception is thrown by
DataSource.connect()
,
Manager.createProcessor(DataSource)
, or
DataSource.disconnect()
protected javax.media.Renderer createRenderer()
AbstractMediaDevice.createRenderer()
implementation of the MediaDevice on which this instance enables
mixing i.e. getWrappedDevice()
.createRenderer
in class AbstractMediaDevice
public MediaDeviceSession createSession()
createSession
in class AbstractMediaDevice
AbstractMediaDevice.createSession()
public MediaDirection getDirection()
getDirection
in interface MediaDevice
MediaDirection.SENDONLY
if this is a read-only device,
MediaDirection.RECVONLY
if this is a write-only device or
MediaDirection.SENDRECV
if this MediaDevice can both
capture and render mediaMediaDevice.getDirection()
public MediaFormat getFormat()
getFormat
in interface MediaDevice
MediaDevice.getFormat()
public MediaType getMediaType()
getMediaType
in interface MediaDevice
MediaType.AUDIO
if this is an audio device or
MediaType.VIDEO
if this is a video deviceMediaDevice.getMediaType()
public java.util.List<RTPExtension> getSupportedExtensions()
getSupportedExtensions
in interface MediaDevice
getSupportedExtensions
in class AbstractMediaDevice
public java.util.List<MediaFormat> getSupportedFormats(QualityPreset sendPreset, QualityPreset receivePreset)
getSupportedFormats
in interface MediaDevice
sendPreset
- not usedreceivePreset
- not usedMediaDevice.getSupportedFormats()
public void setReceiveStreamBufferListener(ReceiveStreamBufferListener listener)
listener
- the ReceiveStreamBufferListener which gets notifiedpublic java.util.List<MediaFormat> getSupportedFormats(QualityPreset sendPreset, QualityPreset receivePreset, EncodingConfiguration encodingConfiguration)
getSupportedFormats
in interface MediaDevice
sendPreset
- not usedreceivePreset
- not usedencodingConfiguration
- the EncodingConfiguration instance
to useMediaDevice.getSupportedFormats(QualityPreset, QualityPreset,
EncodingConfiguration)
public MediaDevice getWrappedDevice()
getWrappedDevice
in interface MediaDeviceWrapper
MediaDeviceWrapper.getWrappedDevice()
void removeInputDataSources(DataSourceFilter dataSourceFilter)
dataSourceFilter
- the DataSourceFilter which selects the
DataSources to be removedpublic TranscodingDataSource getTranscodingDataSource(javax.media.protocol.DataSource inputDataSource)
inputDataSource
- the DataSource to search forAudioMixer.getTranscodingDataSource(javax.media.protocol.DataSource)
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.