#30 WIP - adds stream manager to receive multiple audio stream's packets and convert the audio and persist to disk. Broadcaster will now receive converted audio files to stream out to the server.

This commit is contained in:
Denny
2016-11-13 04:33:45 -05:00
parent 357979a5dd
commit ecfac83eb4
10 changed files with 939 additions and 514 deletions

View File

@@ -35,6 +35,10 @@ import gui.editor.Editor;
import gui.editor.EmptyEditor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import record.AudioRecorder;
import record.mp3.MP3Recorder;
import java.nio.file.Path;
public class BroadcastFactory
{
@@ -157,4 +161,19 @@ public class BroadcastFactory
return editor;
}
/**
* Creates an audio recorder for the specified broadcast format using the specified path output file name
*/
public static AudioRecorder getAudioRecorder(Path path, BroadcastFormat broadcastFormat)
{
switch (broadcastFormat)
{
case MP3:
return new MP3Recorder(path);
default:
mLog.debug("Unrecognized broadcast format [" + broadcastFormat + "] cannot create audio recorder");
return null;
}
}
}