public class CaptureDeviceDelegatePullBufferDataSource
extends javax.media.protocol.PullBufferDataSource
implements javax.media.protocol.CaptureDevice
Modifier and Type | Field and Description |
---|---|
protected javax.media.protocol.CaptureDevice |
captureDevice
The CaptureDevice this instance delegates to in order to
implement its CaptureDevice functionality.
|
protected static javax.media.protocol.PullBufferStream[] |
EMPTY_STREAMS
The constant which represents an empty array with
PullBufferStream element type.
|
Constructor and Description |
---|
CaptureDeviceDelegatePullBufferDataSource(javax.media.protocol.CaptureDevice captureDevice)
Initializes a new CaptureDeviceDelegatePullBufferDataSource
instance which delegates to a specific CaptureDevice in order to
implement its CaptureDevice functionality.
|
Modifier and Type | Method and Description |
---|---|
void |
connect()
Implements
CaptureDevice.connect() . |
void |
disconnect()
Implements
CaptureDevice.disconnect() . |
javax.media.CaptureDeviceInfo |
getCaptureDeviceInfo()
Implements
CaptureDevice.getCaptureDeviceInfo() . |
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() . |
javax.media.Time |
getDuration()
Implements
DataSource.getDuration() . |
javax.media.control.FormatControl[] |
getFormatControls()
Implements
CaptureDevice.getFormatControls() . |
javax.media.protocol.PullBufferStream[] |
getStreams()
Implements
PullBufferDataSource.getStreams() . |
void |
start()
Implements
CaptureDevice.start() . |
void |
stop()
Implements
CaptureDevice.start() . |
protected final javax.media.protocol.CaptureDevice captureDevice
protected static final javax.media.protocol.PullBufferStream[] EMPTY_STREAMS
public CaptureDeviceDelegatePullBufferDataSource(javax.media.protocol.CaptureDevice captureDevice)
captureDevice
- the CaptureDevice the new instance is to
delegate to in order to provide its CaptureDevice functionalitypublic javax.media.protocol.PullBufferStream[] getStreams()
PullBufferDataSource.getStreams()
. Delegates to the
wrapped CaptureDevice if it implements
PullBufferDataSource; otherwise, returns an empty array with
PullBufferStream element type.getStreams
in class javax.media.protocol.PullBufferDataSource
public java.lang.String getContentType()
DataSource.getContentType()
. Delegates to the wrapped
CaptureDevice if it implements DataSource; otherwise,
returns ContentDescriptor.CONTENT_UNKNOWN
.getContentType
in class javax.media.protocol.DataSource
public void connect() throws java.io.IOException
CaptureDevice.connect()
. Delegates to the wrapped
CaptureDevice if available; otherwise, does nothing.connect
in interface javax.media.protocol.CaptureDevice
connect
in class javax.media.protocol.DataSource
java.io.IOException
- if the wrapped CaptureDevice throws such an
exceptionpublic void disconnect()
CaptureDevice.disconnect()
. Delegates to the wrapped
CaptureDevice if available; otherwise, does nothing.disconnect
in interface javax.media.protocol.CaptureDevice
disconnect
in class javax.media.protocol.DataSource
public void start() throws java.io.IOException
CaptureDevice.start()
. Delegates to the wrapped
CaptureDevice if available; otherwise, does nothing.start
in interface javax.media.protocol.CaptureDevice
start
in class javax.media.protocol.DataSource
java.io.IOException
- if the wrapped CaptureDevice throws such an
exceptionpublic void stop() throws java.io.IOException
CaptureDevice.start()
. Delegates to the wrapped
CaptureDevice if available; otherwise, does nothing.stop
in interface javax.media.protocol.CaptureDevice
stop
in class javax.media.protocol.DataSource
java.io.IOException
- if the wrapped CaptureDevice throws such an
exceptionpublic java.lang.Object getControl(java.lang.String controlType)
DataSource.getControl(String)
. Delegates to the
wrapped CaptureDevice if it implements DataSource;
otherwise, returns null.getControl
in interface javax.media.Controls
getControl
in class javax.media.protocol.DataSource
controlType
- a String value which names the type of the
control to be retrievedpublic java.lang.Object[] getControls()
DataSource.getControls()
. Delegates to the wrapped
CaptureDevice if it implements DataSource; otherwise,
returns an empty array with Object element type.getControls
in interface javax.media.Controls
getControls
in class javax.media.protocol.DataSource
public javax.media.Time getDuration()
DataSource.getDuration()
. Delegates to the wrapped
CaptureDevice if it implements DataSource; otherwise,
returns Duration.DURATION_UNKNOWN
.getDuration
in interface javax.media.Duration
getDuration
in class javax.media.protocol.DataSource
public javax.media.control.FormatControl[] getFormatControls()
CaptureDevice.getFormatControls()
. Delegates to the
wrapped CaptureDevice if available; otherwise, returns an empty
array with FormatControl element type.getFormatControls
in interface javax.media.protocol.CaptureDevice
public javax.media.CaptureDeviceInfo getCaptureDeviceInfo()
CaptureDevice.getCaptureDeviceInfo()
. Delegates to the
wrapped CaptureDevice if available; otherwise, returns
null.getCaptureDeviceInfo
in interface javax.media.protocol.CaptureDevice
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.