Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.imgstreaming
Class DataSource

java.lang.Object
  extended by javax.media.protocol.DataSource
      extended by javax.media.protocol.PullBufferDataSource
          extended by net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.AbstractPullBufferCaptureDevice
              extended by net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.AbstractVideoPullBufferCaptureDevice
                  extended by net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.imgstreaming.DataSource
All Implemented Interfaces:
javax.media.Controls, javax.media.Duration, javax.media.protocol.CaptureDevice

public class DataSource
extends AbstractVideoPullBufferCaptureDevice

Implements CaptureDevice and DataSource for the purposes of image and desktop streaming.

Author:
Sebastien Vincent, Lyubomir Marinov, Damian Minkov

Field Summary
 
Fields inherited from interface javax.media.Duration
DURATION_UNBOUNDED, DURATION_UNKNOWN
 
Constructor Summary
DataSource()
          Initializes a new DataSource instance.
DataSource(javax.media.MediaLocator locator)
          Initializes a new DataSource instance.
 
Method Summary
protected  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 setOrigin(int streamIndex, int monitorIndex, int x, int y)
          Set origin of ImageStream.
 
Methods inherited from class net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.AbstractVideoPullBufferCaptureDevice
createFrameRateControl
 
Methods inherited from class net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.AbstractPullBufferCaptureDevice
connect, disconnect, doConnect, doDisconnect, doStart, doStop, getCaptureDeviceInfo, getContentType, getControl, getControls, getDuration, getFormat, getFormatControls, getStreams, getStreamSyncRoot, getSupportedFormats, setCaptureDeviceInfo, setFormat, start, stop, streams
 
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

DataSource

public DataSource()
Initializes a new DataSource instance.


DataSource

public DataSource(javax.media.MediaLocator locator)
Initializes a new DataSource instance.

Parameters:
locator - associated MediaLocator
Method Detail

setOrigin

public void setOrigin(int streamIndex,
                      int monitorIndex,
                      int x,
                      int y)
Set origin of ImageStream.

Parameters:
streamIndex - stream index
monitorIndex - monitor index
x - x coordinate
y - y coordinate

createStream

protected 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. The Format-related information of the new instance is to be abstracted by a specific FormatControl.

Specified by:
createStream in class AbstractPullBufferCaptureDevice
Parameters:
streamIndex - the zero-based index of the PullBufferStream in the list of streams of this PullBufferDataSource
formatControl - the FormatControl which is to abstract the Format-related information of the new instance
Returns:
a new PullBufferStream which is to be at the specified streamIndex in the list of streams of this PullBufferDataSource and which has its Format-related information abstracted by the specified formatControl
See Also:
AbstractPullBufferCaptureDevice.createStream(int, FormatControl)

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.