From: David ‘Bombe’ Roden Date: Fri, 24 May 2013 21:30:53 +0000 (+0200) Subject: Add more recognized encodings. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=563fd3ebac7963e50ba3756fd6d9156b759308d4;p=sonitus.git Add more recognized encodings. --- diff --git a/src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java b/src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java index 0a5d22d..638e15b 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java +++ b/src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java @@ -227,8 +227,8 @@ public class Icecast2Sink implements Sink { } /** - * Returns a MIME type for the given metadata. Currently only Vorbis, MP3, and - * PCM formats are recognized. + * Returns a MIME type for the given metadata. Currently only Vorbis, MP3, PCM, + * Ogg Vorbis, Opus, and FLAC formats are recognized. * * @param metadata * The metadata to get a MIME type for @@ -245,6 +245,15 @@ public class Icecast2Sink implements Sink { if ("PCM".equalsIgnoreCase(encoding)) { return "audio/vnd.wave"; } + if ("Vorbis".equalsIgnoreCase(encoding)) { + return "application/ogg"; + } + if ("Opus".equalsIgnoreCase(encoding)) { + return "audio/ogg; codecs=opus"; + } + if ("FLAC".equalsIgnoreCase(encoding)) { + return "audio/flac"; + } return "application/octet-stream"; }