#30 WIP - icecast 2 broadcaster cleanup

This commit is contained in:
Denny
2016-12-10 10:21:08 -05:00
parent 293dec8a1c
commit 4290d8e403
17 changed files with 129 additions and 125 deletions

View File

@@ -92,6 +92,22 @@ public abstract class AudioBroadcaster implements IAudioPacketListener
SystemProperties.getInstance().getApplicationFolder(BroadcastModel.TEMPORARY_STREAM_DIRECTORY));
}
/**
* Broadcast binary audio data frames or sequences.
*/
protected abstract void broadcastAudio(byte[] audio);
/**
* Broadcasts the next song's audio metadata prior to streaming the next song.
* @param metadata
*/
protected abstract void broadcastMetadata(AudioMetadata metadata);
/**
* Disconnects the broadcaster from the remote server for a reset or final stop.
*/
protected abstract void disconnect();
/**
* Connects to the remote server specified by the broadcast configuration and starts audio streaming.
*/
@@ -130,11 +146,6 @@ public abstract class AudioBroadcaster implements IAudioPacketListener
}
}
/**
* Disconnects the broadcaster from the remote server for a reset or final stop.
*/
protected abstract void disconnect();
/**
* Size of recording queue for recordings awaiting streaming
*/
@@ -197,18 +208,7 @@ public abstract class AudioBroadcaster implements IAudioPacketListener
}
/**
* Broadcast binary audio data frames or sequences.
*/
protected abstract void broadcastAudio(byte[] audio);
/**
* Broadcasts the next song's audio metadata prior to streaming the next song.
* @param metadata
*/
protected abstract void broadcastMetadata(AudioMetadata metadata);
/**
* Registers the listener to receive broadcastAudio state changes
* Registers the listener to receive broadcast events/state changes
*/
public void setListener(Listener<BroadcastEvent> listener)
{
@@ -216,7 +216,7 @@ public abstract class AudioBroadcaster implements IAudioPacketListener
}
/**
* Removes the listener from receiving broadcastAudio state changes
* Removes the listener from receiving broadcast events/state changes
*/
public void removeListener()
{