de.humatic.dsj
Class JTransInPlaceFilter

java.lang.Object
  extended by de.humatic.dsj.JTransInPlaceFilter

public abstract class JTransInPlaceFilter
extends java.lang.Object

Baseclass for the java side of dsj's native TransInPlace filter. Extensions of this class are passed into DSFiltergraph.insertTransInPlaceFilter(..) and will subsequently have their transform(DSSampleBuffer) method called. Inside that method they may modify the given sample's data before it travels further down the native filtergraph.
The native filter accepts all mediatypes, so can be inserted between pretty much all filters long as the input connection uses push mode transport (that is: it will not work between async source and parser filters).
TransInPlace filters will always have identical mediatypes on in and outputs, they can not change a stream's format.


Constructor Summary
JTransInPlaceFilter()
           
 
Method Summary
abstract  int[] transform(DSSampleBuffer buffer)
          Abstract method that subclasses must implement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTransInPlaceFilter

public JTransInPlaceFilter()
Method Detail

transform

public abstract int[] transform(DSSampleBuffer buffer)
Abstract method that subclasses must implement. The incoming buffer is passed in on a native DirectShow thread, which will be blocked until this method returns. Implementations need to be efficient as possible.
The method should return a 2 slot int array giving the positions of the first and last bytes that have been altered (i.e. the "dirty area") or null to indicate no transform.