T
- the very type of DataSource to be wrapped in a
PullBufferDataSourceDelegatepublic abstract class PullBufferDataSourceDelegate<T extends javax.media.protocol.DataSource> extends CaptureDeviceDelegatePullBufferDataSource
PullBufferDataSource.getStreams()
. Intended to allow easier
overriding of the streams returned by a DataSource.Modifier and Type | Field and Description |
---|---|
protected T |
dataSource
The wrapped DataSource this instance delegates to.
|
captureDevice, EMPTY_STREAMS
Constructor and Description |
---|
PullBufferDataSourceDelegate(T dataSource)
Initializes a new PullBufferDataSourceDelegate which is to
delegate to a specific DataSource.
|
Modifier and Type | Method and Description |
---|---|
void |
connect()
Implements
DataSource.connect() . |
void |
disconnect()
Implements
DataSource.disconnect() . |
java.lang.String |
getContentType()
Implements
DataSource.getContentType() . |
java.lang.Object |
getControl(java.lang.String controlType)
Implements
DataSource.getControl(String) . |
java.lang.Object[] |
getControls()
Implements
DataSource.getControls() . |
T |
getDataSource()
Gets the DataSource wrapped by this instance.
|
javax.media.Time |
getDuration()
Implements
DataSource.getDuration() . |
javax.media.MediaLocator |
getLocator()
Implements
DataSource.getLocator() . |
abstract javax.media.protocol.PullBufferStream[] |
getStreams()
Gets the PullBufferStreams through which this
PullBufferDataSource gives access to its media data.
|
void |
start()
Implements
DataSource.start() . |
void |
stop()
Implements
DataSource.stop() . |
getCaptureDeviceInfo, getFormatControls
protected final T extends javax.media.protocol.DataSource dataSource
public PullBufferDataSourceDelegate(T dataSource)
dataSource
- the DataSource the new instance is to delegate
topublic void connect() throws java.io.IOException
DataSource.connect()
. Delegates to the wrapped
DataSource. Overrides
CaptureDeviceDelegatePullBufferDataSource.connect()
because the
wrapped DataSource may not be a CaptureDevice yet it
still needs to be connected.connect
in interface javax.media.protocol.CaptureDevice
connect
in class CaptureDeviceDelegatePullBufferDataSource
java.io.IOException
- if the wrapped DataSource throws such an
exceptionpublic void disconnect()
DataSource.disconnect()
. Delegates to the wrapped
DataSource. Overrides
CaptureDeviceDelegatePullBufferDataSource.disconnect()
because
the wrapped DataSource may not be a CaptureDevice yet
it still needs to be disconnected.disconnect
in interface javax.media.protocol.CaptureDevice
disconnect
in class CaptureDeviceDelegatePullBufferDataSource
public java.lang.String getContentType()
DataSource.getContentType()
. Delegates to the wrapped
DataSource. Overrides
CaptureDeviceDelegatePullBufferDataSource.getContentType()
because the wrapped DataSource may not be a
CaptureDevice yet it still needs to report the content type.getContentType
in class CaptureDeviceDelegatePullBufferDataSource
public javax.media.MediaLocator getLocator()
DataSource.getLocator()
. Delegates to the wrapped
DataSource.getLocator
in class javax.media.protocol.DataSource
public java.lang.Object getControl(java.lang.String controlType)
DataSource.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.getControl
in interface javax.media.Controls
getControl
in class CaptureDeviceDelegatePullBufferDataSource
controlType
- a String value which names the type of the
control to be retrievedpublic java.lang.Object[] getControls()
DataSource.getControls()
. Delegates to the wrapped
PullBufferDataSource. Overrides
CaptureDeviceDelegatePullBufferDataSource.getControls()
because
the wrapped DataSource may not be a CaptureDevice yet
it still needs to give access to the controls.getControls
in interface javax.media.Controls
getControls
in class CaptureDeviceDelegatePullBufferDataSource
public T getDataSource()
public javax.media.Time getDuration()
DataSource.getDuration()
. Delegates to the wrapped
DataSource. Overrides
CaptureDeviceDelegatePullBufferDataSource.getDuration()
because
the wrapped DataSource may not be a CaptureDevice yet
it still needs to report the duration.getDuration
in interface javax.media.Duration
getDuration
in class CaptureDeviceDelegatePullBufferDataSource
public abstract javax.media.protocol.PullBufferStream[] getStreams()
getStreams
in class CaptureDeviceDelegatePullBufferDataSource
public void start() throws java.io.IOException
DataSource.start()
. Delegates to the wrapped
DataSource. Overrides
CaptureDeviceDelegatePullBufferDataSource.start()
because the
wrapped DataSource may not be a CaptureDevice yet it
still needs to be started.start
in interface javax.media.protocol.CaptureDevice
start
in class CaptureDeviceDelegatePullBufferDataSource
java.io.IOException
- if the wrapped DataSource throws such an
exceptionpublic void stop() throws java.io.IOException
DataSource.stop()
. Delegates to the wrapped
DataSource. Overrides
CaptureDeviceDelegatePullBufferDataSource.stop()
because the
wrapped DataSource may not be a CaptureDevice yet it
still needs to be stopped.stop
in interface javax.media.protocol.CaptureDevice
stop
in class CaptureDeviceDelegatePullBufferDataSource
java.io.IOException
- if the wrapped DataSource throws such an
exception
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.