com.teamdev.jxcapture.video.win.directshow
Class FilterWrapper

java.lang.Object
  extended by com.teamdev.jxcapture.video.win.directshow.FilterWrapper
Direct Known Subclasses:
AVCodec, AviMux, ColorSpaceConverter, DefaultDirectSoundDevice, FileFilterWrapper, FileWriter, NullRenderer, SampleGrabber, SmartTee, VideoMixingRenderer, VideoMixingRenderer9, VideoRenderer, VideoRendererDefault

public class FilterWrapper
extends java.lang.Object

Represents the wrapper for IBaseFilter object.


Constructor Summary
FilterWrapper(IBaseFilter filter)
          Create filter wrapper by the specified base filter.
FilterWrapper(java.lang.String clsid, java.lang.String name)
          Creates wrapper for specified filter.
 
Method Summary
 FilterWrapper clone()
           
 boolean connect2(FilterWrapper anotherFilter)
          Connect this filter to the specified filter directly.
 boolean connect2(FilterWrapper anotherFilter, boolean connectDirect)
          Connect this filter to the specified filter directly or indirectly.
 boolean connectFilterByPin(java.lang.String outputPinName, FilterWrapper anotherFilter, java.lang.String inputPinName)
           
 boolean connectFilters(java.lang.String sourcePinName, FilterWrapper destFilter, java.lang.String destPinName)
           
protected  IBaseFilter createFilter()
          Factory method that creates IBaseFilter instance.
 boolean equals(java.lang.Object obj)
           
 java.util.List<PinWrapper> getAllPins()
          Returns all pins of this filter.
 java.lang.String getClsid()
          Returns string presentation CLSID of this filter.
 IBaseFilter getFilter()
          Returns filter object.
 IGraphBuilder getFilterGraph()
           
 PinWrapper getInputPin(java.lang.String name)
           
 java.util.List<PinWrapper> getInputPins()
          Returns all input pins of this filter.
 java.lang.String getName()
          Retuns name of this filter.
 PinWrapper getOutputPin(java.lang.String name)
           
 java.util.List<PinWrapper> getOutputPins()
          Returns all output pins of this filter.
 int hashCode()
           
 void release()
          Releases this filter.
 void setFilterGraph(IGraphBuilder filterGraph)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FilterWrapper

public FilterWrapper(java.lang.String clsid,
                     java.lang.String name)
Creates wrapper for specified filter.

Parameters:
clsid - CLSID of the filter
name - name of the filter

FilterWrapper

public FilterWrapper(IBaseFilter filter)
Create filter wrapper by the specified base filter.

Parameters:
filter - filter instance
Method Detail

getName

public java.lang.String getName()
Retuns name of this filter.

Returns:
name of this filter

getClsid

public java.lang.String getClsid()
Returns string presentation CLSID of this filter.

Returns:
string presentation CLSID of this filter

createFilter

protected IBaseFilter createFilter()
Factory method that creates IBaseFilter instance.

Returns:
IBaseFilter object

getFilter

public IBaseFilter getFilter()
Returns filter object.

Returns:
filter object

release

public void release()
Releases this filter.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getInputPins

public java.util.List<PinWrapper> getInputPins()
Returns all input pins of this filter.

Returns:
a list of pins

getOutputPins

public java.util.List<PinWrapper> getOutputPins()
Returns all output pins of this filter.

Returns:
a list of pins

getAllPins

public java.util.List<PinWrapper> getAllPins()
Returns all pins of this filter.

Returns:
a list of pins

connect2

public boolean connect2(FilterWrapper anotherFilter)
Connect this filter to the specified filter directly.

Parameters:
anotherFilter - filter to connect to.
Returns:
true if filters are connected; false otherwise.

connect2

public boolean connect2(FilterWrapper anotherFilter,
                        boolean connectDirect)
Connect this filter to the specified filter directly or indirectly.

Parameters:
anotherFilter - filter to connect to.
connectDirect - if true - filters will be connected directly; false - indirectly
Returns:
true if filters are connected; false otherwise.

getFilterGraph

public IGraphBuilder getFilterGraph()

setFilterGraph

public void setFilterGraph(IGraphBuilder filterGraph)

clone

public FilterWrapper clone()
Overrides:
clone in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getOutputPin

public PinWrapper getOutputPin(java.lang.String name)

getInputPin

public PinWrapper getInputPin(java.lang.String name)

connectFilterByPin

public boolean connectFilterByPin(java.lang.String outputPinName,
                                  FilterWrapper anotherFilter,
                                  java.lang.String inputPinName)

connectFilters

public boolean connectFilters(java.lang.String sourcePinName,
                              FilterWrapper destFilter,
                              java.lang.String destPinName)