Search in sources :

Example 1 with NullFilter

use of android.filterpacks.base.NullFilter in project platform_frameworks_base by android.

the class FilterGraph method discardUnconnectedOutputs.

private void discardUnconnectedOutputs() {
    // Connect unconnected ports to Null filters
    LinkedList<Filter> addedFilters = new LinkedList<Filter>();
    for (Filter filter : mFilters) {
        int id = 0;
        for (OutputPort port : filter.getOutputPorts()) {
            if (!port.isConnected()) {
                if (mLogVerbose)
                    Log.v(TAG, "Autoconnecting unconnected " + port + " to Null filter.");
                NullFilter nullFilter = new NullFilter(filter.getName() + "ToNull" + id);
                nullFilter.init();
                addedFilters.add(nullFilter);
                port.connectTo(nullFilter.getInputPort("frame"));
                ++id;
            }
        }
    }
    // Add all added filters to this graph
    for (Filter filter : addedFilters) {
        addFilter(filter);
    }
}
Also used : NullFilter(android.filterpacks.base.NullFilter) NullFilter(android.filterpacks.base.NullFilter) LinkedList(java.util.LinkedList)

Example 2 with NullFilter

use of android.filterpacks.base.NullFilter in project android_frameworks_base by ParanoidAndroid.

the class FilterGraph method discardUnconnectedOutputs.

private void discardUnconnectedOutputs() {
    // Connect unconnected ports to Null filters
    LinkedList<Filter> addedFilters = new LinkedList<Filter>();
    for (Filter filter : mFilters) {
        int id = 0;
        for (OutputPort port : filter.getOutputPorts()) {
            if (!port.isConnected()) {
                if (mLogVerbose)
                    Log.v(TAG, "Autoconnecting unconnected " + port + " to Null filter.");
                NullFilter nullFilter = new NullFilter(filter.getName() + "ToNull" + id);
                nullFilter.init();
                addedFilters.add(nullFilter);
                port.connectTo(nullFilter.getInputPort("frame"));
                ++id;
            }
        }
    }
    // Add all added filters to this graph
    for (Filter filter : addedFilters) {
        addFilter(filter);
    }
}
Also used : NullFilter(android.filterpacks.base.NullFilter) NullFilter(android.filterpacks.base.NullFilter) LinkedList(java.util.LinkedList)

Example 3 with NullFilter

use of android.filterpacks.base.NullFilter in project android_frameworks_base by ResurrectionRemix.

the class FilterGraph method discardUnconnectedOutputs.

private void discardUnconnectedOutputs() {
    // Connect unconnected ports to Null filters
    LinkedList<Filter> addedFilters = new LinkedList<Filter>();
    for (Filter filter : mFilters) {
        int id = 0;
        for (OutputPort port : filter.getOutputPorts()) {
            if (!port.isConnected()) {
                if (mLogVerbose)
                    Log.v(TAG, "Autoconnecting unconnected " + port + " to Null filter.");
                NullFilter nullFilter = new NullFilter(filter.getName() + "ToNull" + id);
                nullFilter.init();
                addedFilters.add(nullFilter);
                port.connectTo(nullFilter.getInputPort("frame"));
                ++id;
            }
        }
    }
    // Add all added filters to this graph
    for (Filter filter : addedFilters) {
        addFilter(filter);
    }
}
Also used : NullFilter(android.filterpacks.base.NullFilter) NullFilter(android.filterpacks.base.NullFilter) LinkedList(java.util.LinkedList)

Example 4 with NullFilter

use of android.filterpacks.base.NullFilter in project android_frameworks_base by AOSPA.

the class FilterGraph method discardUnconnectedOutputs.

private void discardUnconnectedOutputs() {
    // Connect unconnected ports to Null filters
    LinkedList<Filter> addedFilters = new LinkedList<Filter>();
    for (Filter filter : mFilters) {
        int id = 0;
        for (OutputPort port : filter.getOutputPorts()) {
            if (!port.isConnected()) {
                if (mLogVerbose)
                    Log.v(TAG, "Autoconnecting unconnected " + port + " to Null filter.");
                NullFilter nullFilter = new NullFilter(filter.getName() + "ToNull" + id);
                nullFilter.init();
                addedFilters.add(nullFilter);
                port.connectTo(nullFilter.getInputPort("frame"));
                ++id;
            }
        }
    }
    // Add all added filters to this graph
    for (Filter filter : addedFilters) {
        addFilter(filter);
    }
}
Also used : NullFilter(android.filterpacks.base.NullFilter) NullFilter(android.filterpacks.base.NullFilter) LinkedList(java.util.LinkedList)

Example 5 with NullFilter

use of android.filterpacks.base.NullFilter in project android_frameworks_base by DirtyUnicorns.

the class FilterGraph method discardUnconnectedOutputs.

private void discardUnconnectedOutputs() {
    // Connect unconnected ports to Null filters
    LinkedList<Filter> addedFilters = new LinkedList<Filter>();
    for (Filter filter : mFilters) {
        int id = 0;
        for (OutputPort port : filter.getOutputPorts()) {
            if (!port.isConnected()) {
                if (mLogVerbose)
                    Log.v(TAG, "Autoconnecting unconnected " + port + " to Null filter.");
                NullFilter nullFilter = new NullFilter(filter.getName() + "ToNull" + id);
                nullFilter.init();
                addedFilters.add(nullFilter);
                port.connectTo(nullFilter.getInputPort("frame"));
                ++id;
            }
        }
    }
    // Add all added filters to this graph
    for (Filter filter : addedFilters) {
        addFilter(filter);
    }
}
Also used : NullFilter(android.filterpacks.base.NullFilter) NullFilter(android.filterpacks.base.NullFilter) LinkedList(java.util.LinkedList)

Aggregations

NullFilter (android.filterpacks.base.NullFilter)6 LinkedList (java.util.LinkedList)6