net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.video4linux2
Class Video4Linux2Stream
java.lang.Object
net.java.sip.communicator.impl.neomedia.control.AbstractControls
net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.AbstractBufferStream
net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.AbstractPullBufferStream
net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.AbstractVideoPullBufferStream
net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.video4linux2.Video4Linux2Stream
- All Implemented Interfaces:
- javax.media.Controls, javax.media.protocol.PullBufferStream, javax.media.protocol.SourceStream
public class Video4Linux2Stream
- extends AbstractVideoPullBufferStream
Implements a PullBufferStream using the Video for Linux Two API
Specification.
- Author:
- Lyubomir Marinov
| Fields inherited from interface javax.media.protocol.SourceStream |
LENGTH_UNKNOWN |
|
Constructor Summary |
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. |
|
Method Summary |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.media.protocol.PullBufferStream |
getFormat |
| Methods inherited from interface javax.media.protocol.SourceStream |
endOfStream, getContentDescriptor, getContentLength |
| Methods inherited from interface javax.media.Controls |
getControl, getControls |
Video4Linux2Stream
public 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.
- Parameters:
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 instance
close
public void close()
- Releases the resources used by this instance throughout its existence and
makes it available for garbage collection. This instance is considered
unusable after closing.
- Overrides:
close in class AbstractBufferStream
- See Also:
AbstractBufferStream.close()
doGetFormat
protected javax.media.Format doGetFormat()
- Gets the Format of this PullBufferStream as directly
known by it.
- Overrides:
doGetFormat in class AbstractBufferStream
- Returns:
- the Format of this PullBufferStream as directly
known by it or null if this PullBufferStream does not
directly know its Format and it relies on the
PullBufferDataSource which created it to report its
Format
- See Also:
AbstractBufferStream.doGetFormat()
doRead
protected void doRead(javax.media.Buffer buffer)
throws IOException
- Reads media data from this PullBufferStream into a specific
Buffer with blocking.
- Specified by:
doRead in class AbstractVideoPullBufferStream
- Parameters:
buffer - the Buffer in which media data is to be read from
this PullBufferStream
- Throws:
IOException - if anything goes wrong while reading media data from
this PullBufferStream into the specified buffer- See Also:
AbstractVideoPullBufferStream.doRead(Buffer)
setFd
void setFd(int fd)
throws IOException
- Sets the file descriptor of the Video for Linux Two API Specification
device which is to be read through this PullBufferStream.
- Parameters:
fd - the file descriptor of the Video for Linux Two API
Specification device which is to be read through this
PullBufferStream
- Throws:
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 PullBufferStream
start
public void start()
throws IOException
- Starts the transfer of media data from this PullBufferStream.
- Overrides:
start in class AbstractVideoPullBufferStream
- Throws:
IOException - if anything goes wrong while starting the transfer of
media data from this PullBufferStream- See Also:
AbstractBufferStream.start()
stop
public void stop()
throws IOException
- Stops the transfer of media data from this PullBufferStream.
- Overrides:
stop in class AbstractVideoPullBufferStream
- Throws:
IOException - if anything goes wrong while stopping the transfer of
media data from this PullBufferStream- See Also:
AbstractBufferStream.stop()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.