de.humatic.dsj
Class CompressedJavaSource

java.lang.Object
  extended by de.humatic.dsj.DSFilter
      extended by de.humatic.dsj.CompressedJavaSource
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener

public class CompressedJavaSource
extends DSFilter
implements java.beans.PropertyChangeListener

Custom DSFilter object working together with the native dsj_CompressedJavaSource & dsj_AsyncJavaSource DirectShow filters. The combination of this java class and its native counterparts allow to feed compressed data, aquired on the java side, into a DirectShow filtergraph. dsj uses this with all the classes in the de.humatic.dsj.src package.
Instances of this class are created by the Source objects via calls to DSGraph.insertCompressedSourceFilter(...).


Nested Class Summary
 
Nested classes/interfaces inherited from class de.humatic.dsj.DSFilter
DSFilter.DSPin
 
Field Summary
static int BLOCKING
          Source flags for use in DSGraph.insertCompressedJavaSource(...)
static int CALLBACK
          Source flags for use in DSGraph.insertCompressedJavaSource(...)
static int RUNNING
          Source flags for use in DSGraph.insertCompressedJavaSource(...)
 
Fields inherited from class de.humatic.dsj.DSFilter
PINDIR_INPUT, PINDIR_OUTPUT
 
Method Summary
 void flush()
          Removes all buffered samples.
 int flushBuffers(boolean setUnderrun)
           
 int flushBuffers(int upToTime)
          Removes samples with timestamps < %upToTime from the buffer.
 int flushBuffers(int toTime, boolean setUnderrun)
           
 int getBufferedTime()
          Returns the time worth of data currently preloaded.
 DSFiltergraph getGraph()
           
 int getMaxBufferedTime()
           
 DSMediaType getMediaType()
           
 int getSamplesBuffered()
           
 int getSampleTimeAt(int bufferPos)
           
 int getTime()
          Returns the time of the sample delivered to the native filter last.
 void propertyChange(java.beans.PropertyChangeEvent pe)
           
 int putSample(JSampleBuffer jsb)
          Used by PUSH and ASYNC sources, adds a sample to the queue that the filter manages.
 void setFlag(int flag, int intVal, float floatVal)
           
 void shutDown(boolean terminate)
           
 void start()
           
 
Methods inherited from class de.humatic.dsj.DSFilter
applyPropPageSettings, closePropPage, connectDownstream, disconnect, dumpConnections, embedPropertiesPage, getCLSID, getFiltergraph, getFilterInfo, getFilterState, getID, getInputs, getName, getOutputs, getPin, getPin, getPin, getPins, getPropPageCount, getPropPageSize, getPropPageTitles, loadFilterState, renderEx, renderPin, saveFilterState, setParameter, showPropertiesDialog, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RUNNING

public static final int RUNNING
Source flags for use in DSGraph.insertCompressedJavaSource(...)

See Also:
Constant Field Values

BLOCKING

public static final int BLOCKING
Source flags for use in DSGraph.insertCompressedJavaSource(...)

See Also:
Constant Field Values

CALLBACK

public static final int CALLBACK
Source flags for use in DSGraph.insertCompressedJavaSource(...)

See Also:
Constant Field Values
Method Detail

start

public void start()
           throws DSJException
Throws:
DSJException

shutDown

public void shutDown(boolean terminate)

getGraph

public DSFiltergraph getGraph()

putSample

public int putSample(JSampleBuffer jsb)
Used by PUSH and ASYNC sources, adds a sample to the queue that the filter manages. Returns number of samples in the output queue.


getMediaType

public DSMediaType getMediaType()

getSamplesBuffered

public int getSamplesBuffered()

getBufferedTime

public int getBufferedTime()
Returns the time worth of data currently preloaded. Only meaningful when the filter operates in push mode.


getMaxBufferedTime

public int getMaxBufferedTime()

getSampleTimeAt

public int getSampleTimeAt(int bufferPos)

flush

public void flush()
Removes all buffered samples.


flushBuffers

public int flushBuffers(int toTime,
                        boolean setUnderrun)

flushBuffers

public int flushBuffers(int upToTime)
Removes samples with timestamps < %upToTime from the buffer. Returns number of samples removed.


flushBuffers

public int flushBuffers(boolean setUnderrun)

setFlag

public void setFlag(int flag,
                    int intVal,
                    float floatVal)

getTime

public int getTime()
Returns the time of the sample delivered to the native filter last.


propertyChange

public void propertyChange(java.beans.PropertyChangeEvent pe)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener