FileDocCategorySizeDatePackage
RandomScheduler.javaAPI DocAndroid 5.1 API1440Thu Mar 12 22:22:30 GMT 2015android.filterfw.core

RandomScheduler

public class RandomScheduler extends android.filterfw.core.Scheduler
hide

Fields Summary
private Random
mRand
Constructors Summary
public RandomScheduler(FilterGraph graph)


       
        super(graph);
    
Methods Summary
public voidreset()

    
public android.filterfw.core.FilterscheduleNextNode()

        Vector<Filter> candidates = new Vector<Filter>();
        for (Filter filter : getGraph().getFilters()) {
            if (filter.canProcess())
                candidates.add(filter);
        }
        if (candidates.size() > 0) {
          int r = mRand.nextInt(candidates.size());
          return candidates.elementAt(r);
        }
        return null;