public class FakePushBufferDataSource extends AbstractPushBufferCaptureDevice
PushBufferDataSource for the purposes of
RTPTranslator when it does not have a CaptureDevice yet
RTPManager.createSendStream(DataSource, int) has to be called to
have RTPTranslatorImpl send packets.| Constructor and Description |
|---|
FakePushBufferDataSource(javax.media.Format... supportedFormats)
Initializes a new FakePushBufferCaptureDevice instance which is
to report a specific list of Formats as supported.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Opens a connection to the media source specified by the
MediaLocator of this DataSource.
|
protected org.jitsi.impl.neomedia.protocol.FakePushBufferDataSource.FakePushBufferStream |
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.
|
void |
disconnect()
Closes the connection to the media source specified of this
AbstractBufferCaptureDevice.
|
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.
|
protected javax.media.Format |
setFormat(int streamIndex,
javax.media.Format oldValue,
javax.media.Format newValue)
Attempts to set the Format to be reported by the
FormatControl of a PushBufferStream at a specific
zero-based index in the list of streams of this
PushBufferDataSource.
|
void |
start()
Starts the transfer of media data from this DataSource.
|
void |
stop()
Stops the transfer of media data from this DataSource.
|
createFrameRateControl, doConnect, doDisconnect, doStart, doStop, getCaptureDeviceInfo, getContentType, getControl, getControls, getDuration, getFormat, getFormatControls, getStreams, getStreamSyncRoot, streamspublic FakePushBufferDataSource(javax.media.Format... supportedFormats)
supportedFormats - the list of Formats to be reported as
supported by the new instancepublic void connect()
throws IOException
connect in interface javax.media.protocol.CaptureDeviceconnect in class AbstractPushBufferCaptureDeviceIOException - if anything goes wrong while opening the connection
to the media source specified by the MediaLocator of this
DataSourceprotected org.jitsi.impl.neomedia.protocol.FakePushBufferDataSource.FakePushBufferStream createStream(int streamIndex,
javax.media.control.FormatControl formatControl)
createStream in class AbstractPushBufferCaptureDevicestreamIndex - 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 instancepublic void disconnect()
disconnect in interface javax.media.protocol.CaptureDevicedisconnect in class AbstractPushBufferCaptureDeviceprotected javax.media.Format[] getSupportedFormats(int streamIndex)
getSupportedFormats in class AbstractPushBufferCaptureDevicestreamIndex - the zero-based index of the PushBufferStream
for which the specified FormatControl is to report the list of
supported Formatsprotected javax.media.Format setFormat(int streamIndex,
javax.media.Format oldValue,
javax.media.Format newValue)
setFormat in class AbstractPushBufferCaptureDevicestreamIndex - the zero-based index of the PushBufferStream
the Format of which is to be setoldValue - the last-known Format for the
PushBufferStream at the specified streamIndexnewValue - the Format which is to be setpublic void start()
throws IOException
start in interface javax.media.protocol.CaptureDevicestart in class AbstractPushBufferCaptureDeviceIOException - if anything goes wrong while starting the transfer of
media data from this DataSourcepublic void stop()
throws IOException
stop in interface javax.media.protocol.CaptureDevicestop in class AbstractPushBufferCaptureDeviceIOException - if anything goes wrong while stopping the transfer of
media data from this DataSourceCopyright © 2022 jitsi.org. All rights reserved.