Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia.jmfext.media.protocol
Class AbstractPullBufferStream

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.control.AbstractControls
      extended by net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.AbstractBufferStream
          extended by net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.AbstractPullBufferStream
All Implemented Interfaces:
javax.media.Controls, javax.media.protocol.PullBufferStream, javax.media.protocol.SourceStream
Direct Known Subclasses:
AbstractVideoPullBufferStream, PortAudioStream

public abstract class AbstractPullBufferStream
extends AbstractBufferStream
implements javax.media.protocol.PullBufferStream

Provides a base implementation of PullBufferStream in order to facilitate implementers by taking care of boilerplate in the most common cases.

Author:
Lyubomir Marinov

Field Summary
 
Fields inherited from class net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.AbstractBufferStream
dataSource, formatControl
 
Fields inherited from interface javax.media.protocol.SourceStream
LENGTH_UNKNOWN
 
Constructor Summary
protected AbstractPullBufferStream(javax.media.protocol.PullBufferDataSource dataSource, javax.media.control.FormatControl formatControl)
          Initializes a new AbstractPullBufferStream instance which is to have its Format-related information abstracted by a specific FormatControl.
 
Method Summary
 boolean willReadBlock()
          Determines if PullBufferStream.read(Buffer) will block.
 
Methods inherited from class net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.AbstractBufferStream
close, doGetFormat, doSetFormat, endOfStream, getContentDescriptor, getContentLength, getControls, getFormat, internalGetFormat, internalSetFormat, start, stop
 
Methods inherited from class net.java.sip.communicator.impl.neomedia.control.AbstractControls
getControl, getControl
 
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, read
 
Methods inherited from interface javax.media.protocol.SourceStream
endOfStream, getContentDescriptor, getContentLength
 
Methods inherited from interface javax.media.Controls
getControl, getControls
 

Constructor Detail

AbstractPullBufferStream

protected AbstractPullBufferStream(javax.media.protocol.PullBufferDataSource dataSource,
                                   javax.media.control.FormatControl formatControl)
Initializes a new AbstractPullBufferStream instance which is to have its Format-related information abstracted by a specific FormatControl.

Parameters:
dataSource - the PullBufferDataSource which is creating the new instance so that it becomes one of its streams
formatControl - the FormatControl which is to abstract the Format-related information of the new instance
Method Detail

willReadBlock

public boolean willReadBlock()
Determines if PullBufferStream.read(Buffer) will block.

Specified by:
willReadBlock in interface javax.media.protocol.PullBufferStream
Returns:
true if read block, false otherwise

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.