public class DirectShowStream extends AbstractPushBufferStream<DataSource>
PUSH_BUFFER_STREAM_CLASS_NAME, transferHandler
dataSource, formatControl
Constructor and Description |
---|
DirectShowStream(DataSource dataSource,
javax.media.control.FormatControl formatControl)
Initializes a new DirectShowStream instance which is to have its
Format-related information abstracted by a specific
FormatControl.
|
Modifier and Type | Method and Description |
---|---|
protected javax.media.Format |
doGetFormat()
Gets the Format of this PushBufferStream as directly
known by it.
|
protected javax.media.Format |
doSetFormat(javax.media.Format format)
Attempts to set the Format of this
AbstractBufferStream.
|
(package private) static boolean |
isSupportedFormat(javax.media.Format format)
Determines whether a specific Format appears to be suitable for
attempts to be set on DirectShowStream instances.
|
void |
read(javax.media.Buffer buffer)
Reads media data from this PushBufferStream into a specific
Buffer without blocking.
|
(package private) void |
setDevice(DSCaptureDevice device)
Sets the DSCaptureDevice of this instance which identifies the
DirectShow video capture device this SourceStream is to capture
data from.
|
void |
start()
Starts the transfer of media data from this PushBufferStream.
|
void |
stop()
Stops the transfer of media data from this PushBufferStream.
|
setTransferHandler
close, endOfStream, getContentDescriptor, getContentLength, getControls, getFormat
getControl, getControl, queryInterface, queryInterface
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
DirectShowStream(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 instancestatic boolean isSupportedFormat(javax.media.Format format)
Note: If the method returns true, an actual attempt to set the specified format on an specific DirectShowStream instance may still fail but that will be because the finer-grained properties of the format are not supported by that DirectShowStream instance.
format
- the Format to be checked whether it appears to be
suitable for attempts to be set on DirectShowStream instancesprotected javax.media.Format doGetFormat()
doGetFormat
in class AbstractBufferStream<DataSource>
protected javax.media.Format doSetFormat(javax.media.Format format)
doSetFormat
in class AbstractBufferStream<DataSource>
format
- the Format to be set as the format of this
AbstractBufferStreampublic void read(javax.media.Buffer buffer) throws java.io.IOException
buffer
- the Buffer in which media data is to be read from
this PushBufferStreamjava.io.IOException
- if anything goes wrong while reading media data from
this PushBufferStream into the specified buffervoid setDevice(DSCaptureDevice device) throws java.io.IOException
device
- a DSCaptureDevice which identifies the DirectShow
video capture device this SourceStream is to capture data fromjava.io.IOException
- if anything goes wrong while setting the specified
device on this instancepublic void start() throws java.io.IOException
start
in class AbstractBufferStream<DataSource>
java.io.IOException
- if anything goes wrong while starting the transfer of
media data from this PushBufferStreampublic void stop() throws java.io.IOException
stop
in class AbstractBufferStream<DataSource>
java.io.IOException
- if anything goes wrong while stopping the transfer of
media data from this PushBufferStream
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.