Class DataSource

  • All Implemented Interfaces:
    javax.media.Controls, javax.media.Duration, javax.media.protocol.CaptureDevice, javax.media.protocol.Controls

    public class DataSource
    extends AbstractVideoPullBufferCaptureDevice
    Implements CaptureDevice and DataSource for the purposes of image and desktop streaming.
    Author:
    Sebastien Vincent, Lyubomir Marinov, Damian Minkov
    • Constructor Detail

      • DataSource

        public DataSource()
        Initializes a new DataSource instance.
      • DataSource

        public DataSource​(javax.media.MediaLocator locator)
        Initializes a new DataSource instance from a specific MediaLocator.
        Parameters:
        locator - the MediaLocator to initialize the new instance from
    • Method Detail

      • createStream

        protected ImageStream 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)
      • getControl

        public Object getControl​(String controlType)
        Gets the control of the specified type available for this instance.
        Specified by:
        getControl in interface javax.media.Controls
        Overrides:
        getControl in class AbstractPullBufferCaptureDevice
        Parameters:
        controlType - the type of the control available for this instance to be retrieved
        Returns:
        an Object which represents the control of the specified type available for this instance if such a control is indeed available; otherwise, null
      • setOrigin

        public void setOrigin​(int streamIndex,
                              int displayIndex,
                              int x,
                              int y)
        Set the display index and the origin of the ImageStream associated with a specific index in this DataSource.
        Parameters:
        streamIndex - the index in this DataSource of the ImageStream to set the display index and the origin of
        displayIndex - the display index to set on the specified ImageStream
        x - the x coordinate of the origin to set on the specified ImageStream
        y - the y coordinate of the origin to set on the specified ImageStream