public class Video4Linux2Stream extends AbstractVideoPullBufferStream<DataSource>
dataSource, formatControl
Constructor and Description |
---|
Video4Linux2Stream(DataSource dataSource,
javax.media.control.FormatControl formatControl)
Initializes a new Video4Linux2Stream instance which is to have
its Format-related information abstracted by a specific
FormatControl.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases the resources used by this instance throughout its existence and
makes it available for garbage collection.
|
protected javax.media.Format |
doGetFormat()
Gets the Format of this PullBufferStream as directly
known by it.
|
protected void |
doRead(javax.media.Buffer buffer)
Reads media data from this PullBufferStream into a specific
Buffer with blocking.
|
(package private) void |
setFd(int fd)
Sets the file descriptor of the Video for Linux Two API Specification
device which is to be read through this PullBufferStream.
|
void |
start()
Starts the transfer of media data from this PullBufferStream.
|
void |
stop()
Stops the transfer of media data from this PullBufferStream.
|
read
willReadBlock
doSetFormat, endOfStream, getContentDescriptor, getContentLength, getControls, getFormat
getControl, getControl, queryInterface, queryInterface
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Video4Linux2Stream(DataSource dataSource, javax.media.control.FormatControl formatControl)
dataSource
- the DataSource which is creating the new
instance so that it becomes one of its streamsformatControl
- the FormatControl which is to abstract the
Format-related information of the new instancepublic void close()
close
in class AbstractBufferStream<DataSource>
AbstractBufferStream.close()
protected javax.media.Format doGetFormat()
doGetFormat
in class AbstractBufferStream<DataSource>
AbstractBufferStream.doGetFormat()
protected void doRead(javax.media.Buffer buffer) throws java.io.IOException
doRead
in class AbstractVideoPullBufferStream<DataSource>
buffer
- the Buffer in which media data is to be read from
this PullBufferStreamjava.io.IOException
- if anything goes wrong while reading media data from
this PullBufferStream into the specified bufferAbstractVideoPullBufferStream.doRead(Buffer)
void setFd(int fd) throws java.io.IOException
fd
- the file descriptor of the Video for Linux Two API
Specification device which is to be read through this
PullBufferStreamjava.io.IOException
- if anything goes wrong while setting the file
descriptor of the Video for Linux Two API Specification device which is
to be read through this PullBufferStreampublic void start() throws java.io.IOException
start
in class AbstractVideoPullBufferStream<DataSource>
java.io.IOException
- if anything goes wrong while starting the transfer of
media data from this PullBufferStreamAbstractBufferStream.start()
public void stop() throws java.io.IOException
stop
in class AbstractVideoPullBufferStream<DataSource>
java.io.IOException
- if anything goes wrong while stopping the transfer of
media data from this PullBufferStreamAbstractBufferStream.stop()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.