Class DataSource
- java.lang.Object
-
- javax.media.protocol.DataSource
-
- javax.media.protocol.PushBufferDataSource
-
- org.jitsi.impl.neomedia.jmfext.media.protocol.AbstractPushBufferCaptureDevice
-
- org.jitsi.impl.neomedia.jmfext.media.protocol.audiosilence.DataSource
-
- All Implemented Interfaces:
javax.media.Controls,javax.media.Duration,javax.media.protocol.CaptureDevice,javax.media.protocol.Controls
public class DataSource extends AbstractPushBufferCaptureDevice
Implements a CaptureDevice which provides silence in the form of audio media.- Author:
- Lyubomir Marinov, Pawel Domas
-
-
Field Summary
Fields Modifier and Type Field Description static StringNO_TRANSFER_DATAThe optionalMediaLocatorremainder to indicate toDataSourceand its associatedAudioSilenceStreamthatBufferTransferHandler.transferData(PushBufferStream)is to not be invoked.static javax.media.Format[]SUPPORTED_FORMATSThe list of Formats supported by the AudioSilenceCaptureDevice instances.
-
Constructor Summary
Constructors Constructor Description DataSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.jitsi.impl.neomedia.jmfext.media.protocol.audiosilence.DataSource.AudioSilenceStreamcreateStream(int streamIndex, javax.media.control.FormatControl formatControl)Create a new PushBufferStream which is to be at a specific zero-based index in the list of streams of this PushBufferDataSource.protected javax.media.Format[]getSupportedFormats(int streamIndex)Gets the Formats which are to be reported by a FormatControl as supported formats for a PushBufferStream at a specific zero-based index in the list of streams of this PushBufferDataSource.-
Methods inherited from class org.jitsi.impl.neomedia.jmfext.media.protocol.AbstractPushBufferCaptureDevice
connect, createFrameRateControl, disconnect, doConnect, doDisconnect, doStart, doStop, getCaptureDeviceInfo, getContentType, getControl, getControls, getDuration, getFormat, getFormatControls, getStreams, getStreamSyncRoot, setFormat, start, stop, streams
-
-
-
-
Field Detail
-
NO_TRANSFER_DATA
public static final String NO_TRANSFER_DATA
The optionalMediaLocatorremainder to indicate toDataSourceand its associatedAudioSilenceStreamthatBufferTransferHandler.transferData(PushBufferStream)is to not be invoked. Iftrue, then theDataSourceis a dummy suitable for scenarios in which an capature device is required but no audio samples from it are necessary such as negotiating signaling for audio but actually RTP translating other participants/peers' audio.- See Also:
- Constant Field Values
-
SUPPORTED_FORMATS
public static final javax.media.Format[] SUPPORTED_FORMATS
The list of Formats supported by the AudioSilenceCaptureDevice instances.
-
-
Method Detail
-
createStream
protected org.jitsi.impl.neomedia.jmfext.media.protocol.audiosilence.DataSource.AudioSilenceStream createStream(int streamIndex, javax.media.control.FormatControl formatControl)Create a new PushBufferStream which is to be at a specific zero-based index in the list of streams of this PushBufferDataSource. The Format-related information of the new instance is to be abstracted by a specific FormatControl. ImplementsAbstractPushBufferCaptureDevice.createStream(int, FormatControl).- Specified by:
createStreamin classAbstractPushBufferCaptureDevice- Parameters:
streamIndex- the zero-based index of the PushBufferStream in the list of streams of this PushBufferDataSourceformatControl- the FormatControl which is to abstract the Format-related information of the new instance- Returns:
- a new PushBufferStream which is to be at the specified streamIndex in the list of streams of this PushBufferDataSource and which has its Format-related information abstracted by the specified formatControl
-
getSupportedFormats
protected javax.media.Format[] getSupportedFormats(int streamIndex)
Gets the Formats which are to be reported by a FormatControl as supported formats for a PushBufferStream at a specific zero-based index in the list of streams of this PushBufferDataSource. Overrides the super implementation in order to return the list of Formats hardcoded as supported in AudioSilenceCaptureDevice because the super looks them up by CaptureDeviceInfo and this instance does not have one.- Overrides:
getSupportedFormatsin classAbstractPushBufferCaptureDevice- Parameters:
streamIndex- the zero-based index of the PushBufferStream for which the specified FormatControl is to report the list of supported Formats- Returns:
- an array of Formats to be reported by a FormatControl as the supported formats for the PushBufferStream at the specified streamIndex in the list of streams of this PushBufferDataSource
-
-