AbstractBufferStreamT
- the type of AbstractBufferStream
through which this AbstractBufferCaptureDevice is to give access to
its media datapublic abstract class AbstractBufferCaptureDevice<AbstractBufferStreamT extends AbstractBufferStream<?>>
extends java.lang.Object
implements javax.media.protocol.CaptureDevice, javax.media.Controls
Constructor and Description |
---|
AbstractBufferCaptureDevice() |
Modifier and Type | Method and Description |
---|---|
void |
connect()
Opens a connection to the media source of this
AbstractBufferCaptureDevice.
|
protected javax.media.control.FormatControl |
createFormatControl(int streamIndex)
Creates a new FormatControl instance which is to be associated
with a PushBufferStream at a specific zero-based index in the
list of streams of this PushBufferDataSource.
|
protected javax.media.control.FormatControl[] |
createFormatControls()
Creates the FormatControls of this CaptureDevice.
|
protected javax.media.control.FrameRateControl |
createFrameRateControl()
Creates a new FrameRateControl instance which is to allow the
getting and setting of the frame rate of this
AbstractBufferCaptureDevice.
|
protected net.sf.fmj.media.util.RTPInfo |
createRTPInfo()
Creates a new RTPInfo instance of this
AbstractBufferCaptureDevice.
|
protected abstract AbstractBufferStreamT |
createStream(int streamIndex,
javax.media.control.FormatControl formatControl)
Create a new AbstractBufferStream which is to be at a specific
zero-based index in the list of streams of this
AbstractBufferCaptureDevice.
|
(package private) void |
defaultDoStart()
Provides the default implementation of
AbstractBufferCaptureDevice for
doStart() . |
(package private) void |
defaultDoStop()
Provides the default implementation of
AbstractBufferCaptureDevice for
doStop() . |
(package private) java.lang.Object[] |
defaultGetControls()
Provides the default implementation of
AbstractBufferCaptureDevice for
getControls() . |
(package private) javax.media.Format |
defaultGetFormat(int streamIndex,
javax.media.Format oldValue)
Provides the default implementation of
AbstractBufferCaptureDevice for
getFormat(int, Format) . |
(package private) javax.media.Format[] |
defaultGetSupportedFormats(int streamIndex)
Provides the default implementation of
AbstractBufferCaptureDevice for
getSupportedFormats(int) . |
void |
disconnect()
Closes the connection to the media source specified of this
AbstractBufferCaptureDevice.
|
protected abstract void |
doConnect()
Opens a connection to the media source of this
AbstractBufferCaptureDevice.
|
protected abstract void |
doDisconnect()
Closes the connection to the media source of this
AbstractBufferCaptureDevice.
|
protected abstract void |
doStart()
Starts the transfer of media data from this
AbstractBufferCaptureDevice.
|
protected abstract void |
doStop()
Stops the transfer of media data from this
AbstractBufferCaptureDevice.
|
abstract javax.media.CaptureDeviceInfo |
getCaptureDeviceInfo()
Gets the CaptureDeviceInfo of this CaptureDevice which
describes it.
|
static javax.media.CaptureDeviceInfo |
getCaptureDeviceInfo(javax.media.protocol.DataSource captureDevice)
Gets the CaptureDeviceInfo of a specific CaptureDevice
by locating its registration in JMF using its MediaLocator.
|
java.lang.Object |
getControl(java.lang.String controlType)
Gets the control of the specified type available for this instance.
|
java.lang.Object[] |
getControls()
Implements
Controls.getControls() . |
protected abstract javax.media.Format |
getFormat(int streamIndex,
javax.media.Format oldValue)
Gets the Format to be reported by the FormatControl of
an AbstractBufferStream at a specific zero-based index in the
list of streams of this AbstractBufferCaptureDevice.
|
javax.media.control.FormatControl[] |
getFormatControls()
Gets an array of FormatControl instances each one of which can
be used before
connect() to get and set the capture
Format of each one of the capture streams. |
<SourceStreamT extends javax.media.protocol.SourceStream> |
getStreams(java.lang.Class<SourceStreamT> clz)
Gets the AbstractBufferStreams through which this
AbstractBufferCaptureDevice gives access to its media data.
|
(package private) java.lang.Object |
getStreamSyncRoot()
Gets the Object which is to synchronize the access to
streams() and its return value. |
protected abstract javax.media.Format[] |
getSupportedFormats(int streamIndex)
Gets the Formats which are to be reported by a
FormatControl as supported formats for a
AbstractBufferStream at a specific zero-based index in the list
of streams of this AbstractBufferCaptureDevice.
|
protected abstract 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 AbstractBufferStream at a specific
zero-based index in the list of streams of this
AbstractBufferCaptureDevice.
|
void |
start()
Starts the transfer of media data from this
AbstractBufferCaptureDevice.
|
void |
stop()
Stops the transfer of media data from this
AbstractBufferCaptureDevice.
|
(package private) AbstractBufferStream<?>[] |
streams()
Gets the internal array of AbstractBufferStreams through which
this AbstractBufferCaptureDevice gives access to its media data.
|
public void connect() throws java.io.IOException
connect
in interface javax.media.protocol.CaptureDevice
java.io.IOException
- if anything goes wrong while opening the connection
to the media source of this AbstractBufferCaptureDeviceprotected javax.media.control.FormatControl createFormatControl(int streamIndex)
connect()
, its PushBufferStreams may
not exist at the time of the request for the creation of the
FormatControl.streamIndex
- the zero-based index of the PushBufferStream
in the list of streams of this PushBufferDataSource which is to
be associated with the new FormatControl instanceprotected javax.media.control.FormatControl[] createFormatControls()
protected javax.media.control.FrameRateControl createFrameRateControl()
protected net.sf.fmj.media.util.RTPInfo createRTPInfo()
protected abstract AbstractBufferStreamT createStream(int streamIndex, javax.media.control.FormatControl formatControl)
streamIndex
- the zero-based index of the
AbstractBufferStream in the list of streams of this
AbstractBufferCaptureDeviceformatControl
- the FormatControl which is to abstract the
Format-related information of the new instancefinal void defaultDoStart() throws java.io.IOException
doStart()
.java.io.IOException
- if anything goes wrong while starting the transfer of
media data from this AbstractBufferCaptureDevicedoStart()
final void defaultDoStop() throws java.io.IOException
doStop()
.java.io.IOException
- if anything goes wrong while stopping the transfer of
media data from this AbstractBufferCaptureDevicedoStop()
final java.lang.Object[] defaultGetControls()
getControls()
.final javax.media.Format defaultGetFormat(int streamIndex, javax.media.Format oldValue)
getFormat(int, Format)
.streamIndex
- the zero-based index of the
AbstractBufferStream the Format of which is to be
retrievedoldValue
- the last-known Format for the
AbstractBufferStream at the specified streamIndexgetFormat(int, Format)
final javax.media.Format[] defaultGetSupportedFormats(int streamIndex)
getSupportedFormats(int)
.streamIndex
- the zero-based index of the
AbstractBufferStream for which the specified
FormatControl is to report the list of supported
Formatspublic void disconnect()
disconnect
in interface javax.media.protocol.CaptureDevice
protected abstract void doConnect() throws java.io.IOException
java.io.IOException
- if anything goes wrong while opening the connection
to the media source of this AbstractBufferCaptureDeviceprotected abstract void doDisconnect()
protected abstract void doStart() throws java.io.IOException
java.io.IOException
- if anything goes wrong while starting the transfer of
media data from this AbstractBufferCaptureDeviceprotected abstract void doStop() throws java.io.IOException
java.io.IOException
- if anything goes wrong while stopping the transfer of
media data from this AbstractBufferCaptureDevicepublic abstract javax.media.CaptureDeviceInfo getCaptureDeviceInfo()
getCaptureDeviceInfo
in interface javax.media.protocol.CaptureDevice
public static javax.media.CaptureDeviceInfo getCaptureDeviceInfo(javax.media.protocol.DataSource captureDevice)
captureDevice
- the CaptureDevice to gets the
CaptureDeviceInfo ofpublic java.lang.Object getControl(java.lang.String controlType)
getControl
in interface javax.media.Controls
controlType
- the type of the control available for this instance to
be retrievedpublic java.lang.Object[] getControls()
Controls.getControls()
. Gets the controls
available for this instance.getControls
in interface javax.media.Controls
protected abstract javax.media.Format getFormat(int streamIndex, javax.media.Format oldValue)
streamIndex
- the zero-based index of the
AbstractBufferStream the Format of which is to be
retrievedoldValue
- the last-known Format for the
PushBufferStream at the specified streamIndexpublic javax.media.control.FormatControl[] getFormatControls()
connect()
to get and set the capture
Format of each one of the capture streams.getFormatControls
in interface javax.media.protocol.CaptureDevice
connect()
to get and set the capture
Format of each one of the capture streamsjava.lang.Object getStreamSyncRoot()
streams()
and its return value.streams()
and its return valuepublic <SourceStreamT extends javax.media.protocol.SourceStream> SourceStreamT[] getStreams(java.lang.Class<SourceStreamT> clz)
SourceStreamT
- the type of SourceStream which is to be
the element type of the returned arrayclz
- the Class of SourceStream which is to be the
element type of the returned arrayprotected abstract javax.media.Format[] getSupportedFormats(int streamIndex)
streamIndex
- the zero-based index of the
AbstractBufferStream for which the specified
FormatControl is to report the list of supported
Formatsprotected abstract javax.media.Format setFormat(int streamIndex, javax.media.Format oldValue, javax.media.Format newValue)
streamIndex
- the zero-based index of the
AbstractBufferStream the Format of which is to be setoldValue
- the last-known Format for the
AbstractBufferStream at the specified streamIndexnewValue
- the Format which is to be setpublic void start() throws java.io.IOException
start
in interface javax.media.protocol.CaptureDevice
java.io.IOException
- if anything goes wrong while starting the transfer of
media data from this AbstractBufferCaptureDevicepublic void stop() throws java.io.IOException
stop
in interface javax.media.protocol.CaptureDevice
java.io.IOException
- if anything goes wrong while stopping the transfer of
media data from this AbstractBufferCaptureDeviceAbstractBufferStream<?>[] streams()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.