public class FakePushBufferDataSource extends AbstractPushBufferCaptureDevice
PushBufferDataSource
for the purposes of
RTPTranslatorImpl
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, streams
public FakePushBufferDataSource(javax.media.Format... supportedFormats)
supportedFormats
- the list of Formats to be reported as
supported by the new instancepublic void connect() throws java.io.IOException
connect
in interface javax.media.protocol.CaptureDevice
connect
in class AbstractPushBufferCaptureDevice
java.io.IOException
- 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 AbstractPushBufferCaptureDevice
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 instancepublic void disconnect()
disconnect
in interface javax.media.protocol.CaptureDevice
disconnect
in class AbstractPushBufferCaptureDevice
protected javax.media.Format[] getSupportedFormats(int streamIndex)
getSupportedFormats
in class AbstractPushBufferCaptureDevice
streamIndex
- 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 AbstractPushBufferCaptureDevice
streamIndex
- 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 java.io.IOException
start
in interface javax.media.protocol.CaptureDevice
start
in class AbstractPushBufferCaptureDevice
java.io.IOException
- if anything goes wrong while starting the transfer of
media data from this DataSourcepublic void stop() throws java.io.IOException
stop
in interface javax.media.protocol.CaptureDevice
stop
in class AbstractPushBufferCaptureDevice
java.io.IOException
- if anything goes wrong while stopping the transfer of
media data from this DataSource
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.