public class RewritablePullBufferDataSource extends PullBufferDataSourceDelegate<javax.media.protocol.PullBufferDataSource> implements MuteDataSource, InbandDTMFDataSource
Because the class wouldn't work for our use case without it, CaptureDevice is implemented and is being delegated to the wrapped DataSource (if it supports the interface in question).
dataSourcecaptureDevice, EMPTY_STREAMS| Constructor and Description |
|---|
RewritablePullBufferDataSource(javax.media.protocol.PullBufferDataSource dataSource)
Initializes a new RewritablePullBufferDataSource instance which
is to provide mute support for a specific PullBufferDataSource.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDTMF(DTMFInbandTone tone)
Adds a new inband DTMF tone to send.
|
Object |
getControl(String controlType)
Implements
Controls.getControl(String). |
javax.media.protocol.PullBufferStream[] |
getStreams()
Implements
PullBufferDataSource.getStreams(). |
javax.media.protocol.PullBufferDataSource |
getWrappedDataSource()
Get wrapped DataSource.
|
boolean |
isMute()
Determines whether this DataSource is mute.
|
boolean |
isSendingDTMF()
Determines whether this DataSource sends a DTMF tone.
|
void |
setMute(boolean mute)
Sets the mute state of this DataSource.
|
connect, disconnect, getContentType, getControls, getDataSource, getDuration, getLocator, start, stopgetCaptureDeviceInfo, getFormatControlspublic RewritablePullBufferDataSource(javax.media.protocol.PullBufferDataSource dataSource)
dataSource - the PullBufferDataSource the new instance is
to provide mute support forpublic void setMute(boolean mute)
setMute in interface MuteDataSourcemute - true to mute this DataSource; otherwise,
falsepublic boolean isMute()
isMute in interface MuteDataSourcepublic void addDTMF(DTMFInbandTone tone)
addDTMF in interface InbandDTMFDataSourcetone - the DTMF tone to send.public boolean isSendingDTMF()
public javax.media.protocol.PullBufferDataSource getWrappedDataSource()
public Object getControl(String controlType)
Controls.getControl(String). Delegates to the
wrapped DataSource. Overrides
CaptureDeviceDelegatePullBufferDataSource.getControl(String)
because the wrapped DataSource may not be a
CaptureDevice yet it still needs to give access to the control.
Overrides the super implementation to include the type hierarchy of the
very wrapped dataSource instance into the search for the
specified controlType.getControl in interface javax.media.ControlsgetControl in class PullBufferDataSourceDelegate<javax.media.protocol.PullBufferDataSource>controlType - a String value which names the type of the
control to be retrievedpublic javax.media.protocol.PullBufferStream[] getStreams()
PullBufferDataSource.getStreams(). Wraps the streams
of the wrapped PullBufferDataSource into
MutePullBufferStream instances in order to provide mute support
to them.getStreams in class PullBufferDataSourceDelegate<javax.media.protocol.PullBufferDataSource>Copyright © 2022 jitsi.org. All rights reserved.