public abstract class AbstractPushBufferStream<T extends javax.media.protocol.PushBufferDataSource> extends AbstractControls implements javax.media.protocol.PushBufferStream
| Modifier and Type | Field and Description |
|---|---|
protected T |
dataSource
The DataSource which has created this instance and which
contains it as one of its streams.
|
protected javax.media.control.FormatControl |
formatControl
The FormatControl which gives access to the Format of
the media data provided by this SourceStream and which,
optionally, allows setting it.
|
static String |
PUSH_BUFFER_STREAM_CLASS_NAME
The name of the PushBufferStream class.
|
protected javax.media.protocol.BufferTransferHandler |
transferHandler
The BufferTransferHandler which is notified by this
PushBufferStream when data is available for reading.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractPushBufferStream(T dataSource,
javax.media.control.FormatControl formatControl)
Initializes a new AbstractPushBufferStream 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 AbstractBufferStream as
directly known by it.
|
protected javax.media.Format |
doSetFormat(javax.media.Format format)
Attempts to set the Format of this
AbstractBufferStream.
|
boolean |
endOfStream()
Determines whether the end of this SourceStream has been
reached.
|
javax.media.protocol.ContentDescriptor |
getContentDescriptor()
Gets a ContentDescriptor which describes the type of the content
made available by this SourceStream.
|
long |
getContentLength()
Gets the length in bytes of the content made available by this
SourceStream.
|
Object[] |
getControls()
Implements
Controls.getControls(). |
javax.media.Format |
getFormat()
Gets the Format of the media data made available by this
AbstractBufferStream.
|
void |
setTransferHandler(javax.media.protocol.BufferTransferHandler transferHandler)
Sets the BufferTransferHandler which is to be notified by this
PushBufferStream when data is available for reading.
|
void |
start()
Starts the transfer of media data from this
AbstractBufferStream.
|
void |
stop()
Stops the transfer of media data from this AbstractBufferStream.
|
getControl, getControl, queryInterface, queryInterfaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static final String PUSH_BUFFER_STREAM_CLASS_NAME
protected javax.media.protocol.BufferTransferHandler transferHandler
protected final T extends javax.media.protocol.DataSource dataSource
protected final javax.media.control.FormatControl formatControl
protected AbstractPushBufferStream(T dataSource, javax.media.control.FormatControl formatControl)
dataSource - the PushBufferDataSource 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 setTransferHandler(javax.media.protocol.BufferTransferHandler transferHandler)
setTransferHandler in interface javax.media.protocol.PushBufferStreamtransferHandler - the BufferTransferHandler which is to be
notified by this PushBufferStream when data is available for
readingpublic void close()
Warning: The method is not invoked by the framework, extenders may choose to invoke it.
protected javax.media.Format doGetFormat()
protected javax.media.Format doSetFormat(javax.media.Format format)
format - the Format to be set as the format of this
AbstractBufferStreampublic boolean endOfStream()
endOfStream in interface javax.media.protocol.SourceStreampublic javax.media.protocol.ContentDescriptor getContentDescriptor()
getContentDescriptor in interface javax.media.protocol.SourceStreampublic long getContentLength()
getContentLength in interface javax.media.protocol.SourceStreampublic Object[] getControls()
Controls.getControls(). Gets the
controls available for this instance.getControls in interface javax.media.Controlspublic javax.media.Format getFormat()
public void start()
throws IOException
IOException - if anything goes wrong while starting the transfer of
media data from this AbstractBufferStreampublic void stop()
throws IOException
IOException - if anything goes wrong while stopping the transfer of
media data from this AbstractBufferStreamCopyright © 2022 jitsi.org. All rights reserved.