public class DataSource extends AbstractVideoPullBufferCaptureDevice
Constructor and Description |
---|
DataSource()
Initializes a new DataSource instance.
|
DataSource(javax.media.MediaLocator locator)
Initializes a new DataSource instance from a specific
MediaLocator.
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected void |
doConnect()
Opens a connection to the media source specified by the
MediaLocator of this DataSource.
|
protected void |
doDisconnect()
Closes the connection to the media source specified by the
MediaLocator of this DataSource.
|
static int |
getFFmpegPixFmt(int v4l2PixFmt)
Gets the Video for Linux Two API Specification pixel format matching a
specific FFmpeg pixel format.
|
static int |
getV4L2PixFmt(int ffmpegPixFmt)
Gets the FFmpeg pixel format matching a specific Video for Linux Two API
Specification pixel format.
|
createFrameRateControl
connect, disconnect, doStart, doStop, getCaptureDeviceInfo, getContentType, getControl, getControls, getDuration, getFormat, getFormatControls, getStreams, getStreamSyncRoot, getSupportedFormats, setCaptureDeviceInfo, setFormat, start, stop, streams
public DataSource()
public DataSource(javax.media.MediaLocator locator)
locator
- the MediaLocator to create the new instance fromprotected Video4Linux2Stream createStream(int streamIndex, javax.media.control.FormatControl formatControl)
createStream
in class AbstractPullBufferCaptureDevice
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 instanceprotected void doConnect() throws java.io.IOException
doConnect
in class AbstractPullBufferCaptureDevice
java.io.IOException
- if anything goes wrong while opening the connection
to the media source specified by the MediaLocator of this
DataSourceAbstractPullBufferCaptureDevice.doConnect()
protected void doDisconnect()
doDisconnect
in class AbstractPullBufferCaptureDevice
public static int getFFmpegPixFmt(int v4l2PixFmt)
v4l2PixFmt
- the FFmpeg pixel format to get the matching Video for
Linux Two API Specification pixel format ofpublic static int getV4L2PixFmt(int ffmpegPixFmt)
ffmpegPixFmt
- the Video for Linux Two API Specification pixel format
to get the matching FFmpeg pixel format of
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.