FileDocCategorySizeDatePackage
RetargetFilter.javaAPI DocAndroid 5.1 API2078Thu Mar 12 22:22:30 GMT 2015android.filterpacks.base

RetargetFilter

public class RetargetFilter extends android.filterfw.core.Filter
hide

Fields Summary
private String
mTargetString
private android.filterfw.core.MutableFrameFormat
mOutputFormat
private int
mTarget
Constructors Summary
public RetargetFilter(String name)


       
        super(name);
    
Methods Summary
public android.filterfw.core.FrameFormatgetOutputFormat(java.lang.String portName, android.filterfw.core.FrameFormat inputFormat)

        MutableFrameFormat retargeted = inputFormat.mutableCopy();
        retargeted.setTarget(mTarget);
        return retargeted;
    
public voidprocess(android.filterfw.core.FilterContext context)

        // Get input frame
        Frame input = pullInput("frame");

        // Create output frame
        Frame output = context.getFrameManager().duplicateFrameToTarget(input, mTarget);

        // Push output
        pushOutput("frame", output);

        // Release pushed frame
        output.release();
    
public voidsetupPorts()

        // Setup target
        mTarget = FrameFormat.readTargetString(mTargetString);

        // Add ports
        addInputPort("frame");
        addOutputBasedOnInput("frame", "frame");