|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.media.protocol.DataSource
javax.media.protocol.PushBufferDataSource
net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.AbstractPushBufferCaptureDevice
public abstract class AbstractPushBufferCaptureDevice
Provides a base implementation of PushBufferDataSource and CaptureDevice in order to facilitate implementers by taking care of boilerplate in the most common cases.
| Field Summary |
|---|
| Fields inherited from interface javax.media.Duration |
|---|
DURATION_UNBOUNDED, DURATION_UNKNOWN |
| Constructor Summary | |
|---|---|
protected |
AbstractPushBufferCaptureDevice()
Initializes a new AbstractPushBufferCaptureDevice instance. |
protected |
AbstractPushBufferCaptureDevice(javax.media.MediaLocator locator)
Initializes a new AbstractPushBufferCaptureDevice instance from a specific MediaLocator. |
| Method Summary | |
|---|---|
void |
connect()
Opens a connection to the media source specified by the MediaLocator of this DataSource. |
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 AbstractPushBufferCaptureDevice. |
protected abstract AbstractPushBufferStream |
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 by the MediaLocator of this DataSource. |
protected void |
doConnect()
Opens a connection to the media source specified by the MediaLocator of this DataSource. |
protected void |
doDisconnect()
Closes the connection to the media source specified by the MediaLocator of this DataSource. |
protected void |
doStart()
Starts the transfer of media data from this DataSource. |
protected void |
doStop()
Stops the transfer of media data from this DataSource. |
javax.media.CaptureDeviceInfo |
getCaptureDeviceInfo()
Gets the CaptureDeviceInfo of this CaptureDevice which describes it. |
String |
getContentType()
Gets the content type of the media represented by this instance. |
Object |
getControl(String controlType)
Gets the control of the specified type available for this instance. |
Object[] |
getControls()
Implements DataSource.getControls(). |
javax.media.Time |
getDuration()
Gets the duration of the media represented by this instance. |
protected javax.media.Format |
getFormat(int streamIndex,
javax.media.Format oldValue)
Gets 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. |
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. |
javax.media.protocol.PushBufferStream[] |
getStreams()
Gets the PushBufferStreams through which this PushBufferDataSource gives access to its media data. |
protected Object |
getStreamSyncRoot()
Gets the Object which is to synchronize the access to streams() and its return value. |
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. |
protected AbstractBufferStream[] |
streams()
Gets the internal array of AbstractPushBufferStreams through which this AbstractPushBufferCaptureDevice gives access to its media data. |
| Methods inherited from class javax.media.protocol.DataSource |
|---|
getLocator, initCheck, setLocator |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractPushBufferCaptureDevice()
protected AbstractPushBufferCaptureDevice(javax.media.MediaLocator locator)
locator - the MediaLocator to create the new instance from| Method Detail |
|---|
public void connect()
throws IOException
connect in interface javax.media.protocol.CaptureDeviceconnect in class javax.media.protocol.DataSourceIOException - if anything goes wrong while opening the connection
to the media source specified by the MediaLocator of this
DataSourceprotected javax.media.control.FrameRateControl createFrameRateControl()
protected abstract AbstractPushBufferStream createStream(int streamIndex,
javax.media.control.FormatControl formatControl)
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 instance
public void disconnect()
disconnect in interface javax.media.protocol.CaptureDevicedisconnect in class javax.media.protocol.DataSource
protected void doConnect()
throws IOException
IOException - if anything goes wrong while opening the connection
to the media source specified by the MediaLocator of this
DataSourceprotected void doDisconnect()
protected void doStart()
throws IOException
IOException - if anything goes wrong while starting the transfer of
media data from this DataSource
protected void doStop()
throws IOException
IOException - if anything goes wrong while stopping the transfer of
media data from this DataSourcepublic javax.media.CaptureDeviceInfo getCaptureDeviceInfo()
getCaptureDeviceInfo in interface javax.media.protocol.CaptureDevicepublic String getContentType()
ContentDescriptor.RAW.
getContentType in class javax.media.protocol.DataSourcepublic Object getControl(String controlType)
getControl in interface javax.media.ControlsgetControl in class javax.media.protocol.DataSourcecontrolType - the type of the control available for this instance to
be retrieved
public Object[] getControls()
DataSource.getControls(). Gets
the controls available for this instance.
getControls in interface javax.media.ControlsgetControls in class javax.media.protocol.DataSourcepublic javax.media.Time getDuration()
Duration.DURATION_UNBOUNDED.
getDuration in interface javax.media.DurationgetDuration in class javax.media.protocol.DataSource
protected javax.media.Format getFormat(int streamIndex,
javax.media.Format oldValue)
streamIndex - the zero-based index of the PushBufferStream
the Format of which is to be retrievedoldValue - the last-known Format for the
PushBufferStream at the specified streamIndex
public 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.CaptureDeviceconnect() to get and set the capture
Format of each one of the capture streamsprotected Object getStreamSyncRoot()
streams() and its return value.
streams() and its return valuepublic javax.media.protocol.PushBufferStream[] getStreams()
getStreams in class javax.media.protocol.PushBufferDataSourceprotected javax.media.Format[] getSupportedFormats(int streamIndex)
streamIndex - the zero-based index of the PushBufferStream
for which the specified FormatControl is to report the list of
supported Formats
protected javax.media.Format setFormat(int streamIndex,
javax.media.Format oldValue,
javax.media.Format newValue)
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 set
public void start()
throws IOException
start in interface javax.media.protocol.CaptureDevicestart in class javax.media.protocol.DataSourceIOException - if anything goes wrong while starting the transfer of
media data from this DataSource
public void stop()
throws IOException
stop in interface javax.media.protocol.CaptureDevicestop in class javax.media.protocol.DataSourceIOException - if anything goes wrong while stopping the transfer of
media data from this DataSourceprotected AbstractBufferStream[] streams()
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||