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.video4linux2.DataSource
-
- All Implemented Interfaces:
javax.media.Controls,javax.media.Duration,javax.media.protocol.CaptureDevice,javax.media.protocol.Controls
public class DataSource extends AbstractVideoPullBufferCaptureDevice
Implements a PullBufferDataSource and CaptureDevice using the Video for Linux Two API Specification.- Author:
- Lyubomir Marinov
-
-
Constructor Summary
Constructors Constructor Description DataSource()Initializes a new DataSource instance.DataSource(javax.media.MediaLocator locator)Initializes a new DataSource instance from a specific MediaLocator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Video4Linux2StreamcreateStream(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.protected voiddoConnect()Opens a connection to the media source specified by the MediaLocator of this DataSource.protected voiddoDisconnect()Closes the connection to the media source specified by the MediaLocator of this DataSource.static intgetFFmpegPixFmt(int v4l2PixFmt)Gets the Video for Linux Two API Specification pixel format matching a specific FFmpeg pixel format.static intgetV4L2PixFmt(int ffmpegPixFmt)Gets the FFmpeg pixel format matching a specific Video for Linux Two API Specification pixel format.-
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, doStart, doStop, getCaptureDeviceInfo, getContentType, getControl, getControls, getDuration, getFormat, getFormatControls, getStreams, getStreamSyncRoot, getSupportedFormats, setCaptureDeviceInfo, setFormat, start, stop, streams
-
-
-
-
Method Detail
-
createStream
protected Video4Linux2Stream 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:
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
-
doConnect
protected void doConnect() throws IOExceptionOpens a connection to the media source specified by the MediaLocator of this DataSource.- Overrides:
doConnectin classAbstractPullBufferCaptureDevice- Throws:
IOException- if anything goes wrong while opening the connection to the media source specified by the MediaLocator of this DataSource- See Also:
AbstractPullBufferCaptureDevice.doConnect()
-
doDisconnect
protected void doDisconnect()
Closes the connection to the media source specified by the MediaLocator of this DataSource.- Overrides:
doDisconnectin classAbstractPullBufferCaptureDevice
-
getFFmpegPixFmt
public static int getFFmpegPixFmt(int v4l2PixFmt)
Gets the Video for Linux Two API Specification pixel format matching a specific FFmpeg pixel format.- Parameters:
v4l2PixFmt- the FFmpeg pixel format to get the matching Video for Linux Two API Specification pixel format of- Returns:
- the Video for Linux Two API Specification pixel format matching the specified FFmpeg format
-
getV4L2PixFmt
public static int getV4L2PixFmt(int ffmpegPixFmt)
Gets the FFmpeg pixel format matching a specific Video for Linux Two API Specification pixel format.- Parameters:
ffmpegPixFmt- the Video for Linux Two API Specification pixel format to get the matching FFmpeg pixel format of- Returns:
- the FFmpeg pixel format matching the specified Video for Linux Two API Specification pixel format
-
-