package net.pterodactylus.sonitus.data.filter;
-import net.pterodactylus.sonitus.data.Format;
+import net.pterodactylus.sonitus.data.Metadata;
import com.google.common.collect.ImmutableList;
+import com.google.common.eventbus.EventBus;
/**
* {@link ExternalMp3Decoder} implementation that uses LAME to decode an MP3.
/**
* Creates a new LAME MP3 decoder.
*
+ * @param eventBus
+ * The event bus
* @param binary
* The location of the binary
*/
- public LameMp3Decoder(String binary) {
+ public LameMp3Decoder(EventBus eventBus, String binary) {
+ super(eventBus, "LAME Decoder");
this.binary = binary;
}
//
@Override
- protected String binary(Format format) {
+ protected String binary(Metadata metadata) {
return binary;
}
@Override
- protected Iterable<String> parameters(Format format) {
- ImmutableList.Builder parameters = ImmutableList.builder();
+ protected Iterable<String> parameters(Metadata metadata) {
+ ImmutableList.Builder<String> parameters = ImmutableList.builder();
parameters.add("--mp3input").add("--decode").add("-t");
if (swapBytes) {
parameters.add("-x");