From: David ‘Bombe’ Roden Date: Thu, 6 Jun 2013 04:33:04 +0000 (+0200) Subject: Change filter opening. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=2f6ec5906ea398bc39d2fe85bc288191d2c97057;p=sonitus.git Change filter opening. --- diff --git a/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java b/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java index 5b7edae..c63b272 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java +++ b/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java @@ -138,15 +138,16 @@ public class Pipeline implements Iterable { } List filters = Lists.newArrayList(); filters.add(source); - source.open(Metadata.UNKNOWN); + Metadata currentMetadata = Metadata.UNKNOWN; /* collect all source->sink pairs. */ while (!filters.isEmpty()) { Filter filter = filters.remove(0); + logger.info(String.format("Opening %s with %s...", filter.name(), currentMetadata)); + filter.open(currentMetadata); + currentMetadata = filter.metadata(); Collection sinks = this.filters.get(filter); connections.add(new Connection(filter, sinks)); for (Filter sink : sinks) { - logger.info(String.format("Opening %s with %s...", sink.name(), source.metadata())); - sink.open(filter.metadata()); filters.add(sink); } }