Simplified Engine enum.
This commit is contained in:
parent
a98ef2209e
commit
1b51ce467b
@ -9,15 +9,13 @@ import musicplayer.player.VLCPlayer;
|
|||||||
*/
|
*/
|
||||||
public enum Engine {
|
public enum Engine {
|
||||||
|
|
||||||
GSTREAMER("GStreamer", GStreamerPlayer.class, "org.gstreamer.elements.PlayBin2"),
|
GSTREAMER(GStreamerPlayer.class, "org.gstreamer.elements.PlayBin2"),
|
||||||
VLC("VLC", VLCPlayer.class, "uk.co.caprica.vlcj.player.MediaPlayer");
|
VLC(VLCPlayer.class, "uk.co.caprica.vlcj.player.MediaPlayer");
|
||||||
|
|
||||||
private final String engineName;
|
|
||||||
private final Class<? extends IPlayer> engineImplementation;
|
private final Class<? extends IPlayer> engineImplementation;
|
||||||
private final String neededClass;
|
private final String neededClass;
|
||||||
|
|
||||||
Engine(String engineName, Class<? extends IPlayer> engineImplementation, String neededClass) {
|
Engine(Class<? extends IPlayer> engineImplementation, String neededClass) {
|
||||||
this.engineName = engineName;
|
|
||||||
this.engineImplementation = engineImplementation;
|
this.engineImplementation = engineImplementation;
|
||||||
this.neededClass = neededClass;
|
this.neededClass = neededClass;
|
||||||
}
|
}
|
||||||
@ -26,7 +24,7 @@ public enum Engine {
|
|||||||
* @return Name of the engine.
|
* @return Name of the engine.
|
||||||
*/
|
*/
|
||||||
public String getEngineName() {
|
public String getEngineName() {
|
||||||
return engineName;
|
return this.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user