net.java.sip.communicator.impl.neomedia.protocol
Class PushBufferDataSourceAdapter
java.lang.Object
javax.media.protocol.DataSource
javax.media.protocol.PushBufferDataSource
net.java.sip.communicator.impl.neomedia.protocol.CaptureDeviceDelegatePushBufferDataSource
net.java.sip.communicator.impl.neomedia.protocol.PushBufferDataSourceDelegate<javax.media.protocol.PullBufferDataSource>
net.java.sip.communicator.impl.neomedia.protocol.PushBufferDataSourceAdapter
- All Implemented Interfaces:
- javax.media.Controls, javax.media.Duration, javax.media.protocol.CaptureDevice
public class PushBufferDataSourceAdapter
- extends PushBufferDataSourceDelegate<javax.media.protocol.PullBufferDataSource>
Implements PushBufferDataSource for a specific
PullBufferDataSource.
- Author:
- Lubomir Marinov
| Fields inherited from interface javax.media.Duration |
DURATION_UNBOUNDED, DURATION_UNKNOWN |
|
Constructor Summary |
PushBufferDataSourceAdapter(javax.media.protocol.PullBufferDataSource dataSource)
Initializes a new PushBufferDataSourceAdapter which is to
implement PushBufferDataSource capabilities for a specific
PullBufferDataSource. |
|
Method Summary |
void |
disconnect()
Implements DataSource.disconnect(). |
javax.media.protocol.PushBufferStream[] |
getStreams()
Implements PushBufferDataSource.getStreams(). |
void |
start()
Implements DataSource.start(). |
void |
stop()
Implements DataSource.start(). |
| Methods inherited from class javax.media.protocol.DataSource |
initCheck, setLocator |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PushBufferDataSourceAdapter
public PushBufferDataSourceAdapter(javax.media.protocol.PullBufferDataSource dataSource)
- Initializes a new PushBufferDataSourceAdapter which is to
implement PushBufferDataSource capabilities for a specific
PullBufferDataSource.
- Parameters:
dataSource - the PullBufferDataSource the new instance is
to implement PushBufferDataSource capabilities for
disconnect
public void disconnect()
- Implements
DataSource.disconnect(). Disposes of the
PushBufferStreamAdapters which wrap the
PullBufferStreams of the PullBufferDataSource wrapped
by this instance.
- Specified by:
disconnect in interface javax.media.protocol.CaptureDevice- Overrides:
disconnect in class PushBufferDataSourceDelegate<javax.media.protocol.PullBufferDataSource>
start
public void start()
throws IOException
- Implements
DataSource.start(). Starts the wrapped
PullBufferDataSource and the pushing from the
PushBufferStreamAdapters which wrap the
PullBufferStreams of the PullBufferDataSource wrapped
by this instance.
- Specified by:
start in interface javax.media.protocol.CaptureDevice- Overrides:
start in class PushBufferDataSourceDelegate<javax.media.protocol.PullBufferDataSource>
- Throws:
IOException - if anything wrong happens while starting the wrapped
PullBufferDataSource or the pushing from the
PushBufferStreamAdapters which wrap the
PullBufferStreams of the PullBufferDataSource wrapped
by this instance
stop
public void stop()
throws IOException
- Implements
DataSource.start(). Stops the wrapped
PullBufferDataSource and the pushing from the
PushBufferStreamAdapters which wrap the
PullBufferStreams of the PullBufferDataSource wrapped
by this instance.
- Specified by:
stop in interface javax.media.protocol.CaptureDevice- Overrides:
stop in class PushBufferDataSourceDelegate<javax.media.protocol.PullBufferDataSource>
- Throws:
IOException - if anything wrong happens while stopping the wrapped
PullBufferDataSource or the pushing from the
PushBufferStreamAdapters which wrap the
PullBufferStreams of the PullBufferDataSource wrapped
by this instance
getStreams
public javax.media.protocol.PushBufferStream[] getStreams()
- Implements
PushBufferDataSource.getStreams(). Gets the
PushBufferStreams through which this
PushBufferDataSource gives access to its media data.
- Specified by:
getStreams in class PushBufferDataSourceDelegate<javax.media.protocol.PullBufferDataSource>
- Returns:
- an array of PushBufferStreams through which this
PushBufferDataSource gives access to its media data
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.