Add method to notify sink when a source has updated its metadata.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 16 Mar 2013 18:52:52 +0000 (19:52 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 16 Mar 2013 18:52:52 +0000 (19:52 +0100)
src/main/java/net/pterodactylus/sonitus/data/Sink.java
src/main/java/net/pterodactylus/sonitus/data/filter/ExternalFilter.java
src/main/java/net/pterodactylus/sonitus/data/filter/MultiSourceFilter.java
src/main/java/net/pterodactylus/sonitus/data/filter/RateLimitingFilter.java
src/main/java/net/pterodactylus/sonitus/data/sink/AudioSink.java
src/main/java/net/pterodactylus/sonitus/data/sink/FileSink.java
src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java

index 5ca6a79..7f6ce6b 100644 (file)
@@ -36,4 +36,7 @@ public interface Sink {
         */
        void connect(Source source) throws ConnectException;
 
+       /** Notifies the sink that a source has updated its metadata. */
+       void metadataUpdated();
+
 }
index 3bfb774..3452c76 100644 (file)
@@ -130,6 +130,11 @@ public abstract class ExternalFilter implements Filter {
                }
        }
 
+       @Override
+       public void metadataUpdated() {
+               /* ignore. */
+       }
+
        //
        // SUBCLASS METHODS
        //
index 33424ac..a505c92 100644 (file)
@@ -108,6 +108,11 @@ public class MultiSourceFilter implements Filter, ReusableSink {
                }
        }
 
+       @Override
+       public void metadataUpdated() {
+               /* ignore. */
+       }
+
        /**
         * The connection feeds the input from the currently connected source to the
         * input stream that {@link #get(int)} will get its data from.
index a573295..66ca8a7 100644 (file)
@@ -133,4 +133,9 @@ public class RateLimitingFilter implements Filter {
                }
        }
 
+       @Override
+       public void metadataUpdated() {
+               /* ignore. */
+       }
+
 }
index 1e4f6ec..520be04 100644 (file)
@@ -76,4 +76,9 @@ public class AudioSink implements Sink {
                }
        }
 
+       @Override
+       public void metadataUpdated() {
+               /* ignore. */
+       }
+
 }
index 015dd6f..61e0a27 100644 (file)
@@ -81,4 +81,9 @@ public class FileSink implements Sink {
                }
        }
 
+       @Override
+       public void metadataUpdated() {
+               /* ignore. */
+       }
+
 }
index 30801c6..7423588 100644 (file)
@@ -157,6 +157,10 @@ public class Icecast2Sink implements Sink {
                }
        }
 
+       @Override
+       public void metadataUpdated() {
+       }
+
        //
        // PRIVATE METHODS
        //