From 2f6ec5906ea398bc39d2fe85bc288191d2c97057 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 6 Jun 2013 06:33:04 +0200 Subject: [PATCH] Change filter opening. --- src/main/java/net/pterodactylus/sonitus/data/Pipeline.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); } } -- 2.7.4