X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsonitus%2Fdata%2Fsource%2FStreamSource.java;fp=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsonitus%2Fdata%2Fsource%2FStreamSource.java;h=a116d803da4cdded15617247eed6fc01dcd5a970;hb=c548332c486d812bfce23a9121219bf86ecc5588;hp=9a624e0457f5e8a01d24027b7c9523caec9ac881;hpb=f554e51504f7e39e658a84d79c041e0b0d8a6393;p=sonitus.git diff --git a/src/main/java/net/pterodactylus/sonitus/data/source/StreamSource.java b/src/main/java/net/pterodactylus/sonitus/data/source/StreamSource.java index 9a624e0..a116d80 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/source/StreamSource.java +++ b/src/main/java/net/pterodactylus/sonitus/data/source/StreamSource.java @@ -35,6 +35,7 @@ import net.pterodactylus.sonitus.io.MetadataStream; import com.google.common.base.Optional; import com.google.common.collect.Maps; +import com.google.common.eventbus.EventBus; import com.google.common.primitives.Ints; /** @@ -47,6 +48,9 @@ import com.google.common.primitives.Ints; */ public class StreamSource implements Source { + /** The event bus. */ + private final EventBus eventBus; + /** The URL of the stream. */ private final String streamUrl; @@ -64,12 +68,15 @@ public class StreamSource implements Source { * the response header for vital information (sampling frequency, number of * channels, etc.). * + * @param eventBus + * The event bus * @param streamUrl * The URL of the stream * @throws IOException * if an I/O error occurs */ - public StreamSource(String streamUrl) throws IOException { + public StreamSource(EventBus eventBus, String streamUrl) throws IOException { + this.eventBus = eventBus; this.streamUrl = streamUrl; URL url = new URL(streamUrl);