From 563fd3ebac7963e50ba3756fd6d9156b759308d4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 24 May 2013 23:30:53 +0200 Subject: [PATCH] Add more recognized encodings. --- .../net/pterodactylus/sonitus/data/sink/Icecast2Sink.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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"; } -- 2.7.4