Class DataSource
- java.lang.Object
-
- javax.media.protocol.DataSource
-
- javax.media.protocol.PullBufferDataSource
-
- org.jitsi.impl.neomedia.jmfext.media.protocol.AbstractPullBufferCaptureDevice
-
- org.jitsi.impl.neomedia.jmfext.media.protocol.AbstractVideoPullBufferCaptureDevice
-
- org.jitsi.impl.neomedia.jmfext.media.protocol.ivffile.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 ivf (vp8 raw file, extracted from webm) file streaming.- Author:
- Thomas Kuntz
-
-
Constructor Summary
Constructors Constructor Description DataSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IVFStreamcreateStream(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.voiddoConnect()doConnect allows us to initialize the DataSource with information that we couldn't have in the constructor, like the MediaLocator that give us the path of the ivf file which give us information on the formatprotected 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.-
Methods inherited from class org.jitsi.impl.neomedia.jmfext.media.protocol.AbstractVideoPullBufferCaptureDevice
createFrameRateControl
-
Methods inherited from class org.jitsi.impl.neomedia.jmfext.media.protocol.AbstractPullBufferCaptureDevice
connect, disconnect, doDisconnect, doStart, doStop, getCaptureDeviceInfo, getContentType, getControl, getControls, getDuration, getFormat, getFormatControls, getStreams, getStreamSyncRoot, setCaptureDeviceInfo, setFormat, start, stop, streams
-
-
-
-
Method Detail
-
doConnect
public void doConnect() throws IOExceptiondoConnect allows us to initialize the DataSource with information that we couldn't have in the constructor, like the MediaLocator that give us the path of the ivf file which give us information on the format- Overrides:
doConnectin classAbstractPullBufferCaptureDevice- Throws:
IOException- if anything goes wrong while opening the connection to the media source specified by the MediaLocator of this DataSource
-
createStream
protected IVFStream 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. ImplementsAbstractPushBufferCaptureDevice.createStream(int, FormatControl).- Specified by:
createStreamin classAbstractPullBufferCaptureDevice- Parameters:
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- 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
-
getSupportedFormats
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. Overrides the super implementation in order to return the list of Formats hardcoded as supported in IVFCaptureDevice because the super looks them up by CaptureDeviceInfo and it doesn't have some information (like the framerate etc.).- Overrides:
getSupportedFormatsin classAbstractPullBufferCaptureDevice- Parameters:
streamIndex- the zero-based index of the PullBufferStream for which the specified FormatControl is to report the list of supported Formats- Returns:
- an array of Formats to be reported by a FormatControl as the supported formats for the PullBufferStream at the specified streamIndex in the list of streams of this PullBufferDataSource
-
-