FileDocCategorySizeDatePackage
BackDropperEffect.javaAPI DocAndroid 5.1 API3839Thu Mar 12 22:22:30 GMT 2015android.media.effect.effects

BackDropperEffect

public class BackDropperEffect extends android.media.effect.FilterGraphEffect
Background replacement Effect. Replaces the background of the input video stream with a selected video Learns the background when it first starts up; needs unobstructed view of background when this happens. Effect parameters: source: A URI for the background video Listener: Called when learning period is complete
hide

Fields Summary
private static final String
mGraphDefinition
private android.media.effect.EffectUpdateListener
mEffectListener
private android.filterpacks.videoproc.BackDropperFilter.LearningDoneListener
mLearningListener
Constructors Summary
public BackDropperEffect(android.media.effect.EffectContext context, String name)


         
        super(context, name, mGraphDefinition, "foreground", "output", OneShotScheduler.class);

        Filter replacer = mGraph.getFilter("replacer");
        replacer.setInputValue("learningDoneListener", mLearningListener);
    
Methods Summary
public voidsetParameter(java.lang.String parameterKey, java.lang.Object value)

        if (parameterKey.equals("source")) {
            Filter background = mGraph.getFilter("background");
            background.setInputValue("sourceUrl", value);
        } else if (parameterKey.equals("context")) {
            Filter background = mGraph.getFilter("background");
            background.setInputValue("context", value);
        }
    
public voidsetUpdateListener(android.media.effect.EffectUpdateListener listener)

        mEffectListener = listener;