use of android.filterpacks.base.NullFilter in project android_frameworks_base by crdroidandroid.
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);
}
}
Aggregations