|
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.PullBufferDataSource
net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.AbstractPullBufferCaptureDevice
public abstract class AbstractPullBufferCaptureDevice
Provides a base implementation of PullBufferDataSource 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 |
AbstractPullBufferCaptureDevice()
Initializes a new AbstractPullBufferCaptureDevice instance. |
protected |
AbstractPullBufferCaptureDevice(javax.media.MediaLocator locator)
Initializes a new AbstractPullBufferCaptureDevice 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 AbstractPullBufferCaptureDevice. |
protected abstract AbstractPullBufferStream |
createStream(int streamIndex,
javax.media.control.FormatControl formatControl)
Creates a new PullBufferStream which is to be at a specific zero-based index in the list of streams of this PullBufferDataSource. |
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 Controls.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 PullBufferStream at a specific zero-based index in the list of streams of this PullBufferDataSource. |
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.PullBufferStream[] |
getStreams()
Gets the PullBufferStreams through which this PullBufferDataSource 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 PullBufferStream at a specific zero-based index in the list of streams of this PullBufferDataSource. |
void |
setCaptureDeviceInfo(javax.media.CaptureDeviceInfo deviceInfo)
Sets a specific CaptureDeviceInfo on this CaptureDevice. |
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 PullBufferStream at a specific zero-based index in the list of streams of this PullBufferDataSource. |
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 AbstractPullBufferCaptureDevice()
protected AbstractPullBufferCaptureDevice(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 AbstractPullBufferStream createStream(int streamIndex,
javax.media.control.FormatControl formatControl)
streamIndex - the zero-based index of the PullBufferStream
in the list of streams of this PullBufferDataSourceformatControl - 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()
Controls.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 PullBufferStream
the Format of which is to be retrievedoldValue - the last-known Format for the
PullBufferStream 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.PullBufferStream[] getStreams()
getStreams in class javax.media.protocol.PullBufferDataSourceprotected javax.media.Format[] getSupportedFormats(int streamIndex)
streamIndex - the zero-based index of the PullBufferStream
for which the specified FormatControl is to report the list of
supported Formats
public void setCaptureDeviceInfo(javax.media.CaptureDeviceInfo deviceInfo)
deviceInfo - the CaptureDeviceInfo on this
CaptureDevice
protected javax.media.Format setFormat(int streamIndex,
javax.media.Format oldValue,
javax.media.Format newValue)
streamIndex - the zero-based index of the PullBufferStream
the Format of which is to be setoldValue - the last-known Format for the
PullBufferStream 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 | |||||||||