Switched default backend to GStreamer.
This commit is contained in:
parent
05e0e446a7
commit
bacb560f6c
@ -18,7 +18,7 @@ class SwingUIModule extends AbstractModule {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void configure() {
|
protected void configure() {
|
||||||
bind(IPlayer.class).to(VLCPlayer.class).in(Singleton.class);
|
bind(IPlayer.class).to(GStreamerPlayer.class).in(Singleton.class);
|
||||||
bind(IDatabase.class).to(HibernateDatabase.class).in(Singleton.class);
|
bind(IDatabase.class).to(HibernateDatabase.class).in(Singleton.class);
|
||||||
bind(IPlaylist.class).to(JTablePlaylist.class).in(Singleton.class);
|
bind(IPlaylist.class).to(JTablePlaylist.class).in(Singleton.class);
|
||||||
bind(ILibrary.class).to(JTreeLibrary.class).in(Singleton.class);
|
bind(ILibrary.class).to(JTreeLibrary.class).in(Singleton.class);
|
||||||
|
@ -93,7 +93,6 @@ public class VLCPlayer implements IPlayer {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
boolean startedPlaying = mediaPlayer.startMedia(inputSong.getSongFile().getAbsolutePath());
|
boolean startedPlaying = mediaPlayer.startMedia(inputSong.getSongFile().getAbsolutePath());
|
||||||
mediaPlayer.setVolume(currentVolume);
|
|
||||||
if(!startedPlaying)
|
if(!startedPlaying)
|
||||||
throw new StartPlayingException(inputSong);
|
throw new StartPlayingException(inputSong);
|
||||||
}
|
}
|
||||||
@ -190,6 +189,7 @@ public class VLCPlayer implements IPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void playing(MediaPlayer mediaPlayer) {
|
public void playing(MediaPlayer mediaPlayer) {
|
||||||
|
mediaPlayer.setVolume(currentVolume);
|
||||||
if(callbackInterface != null)
|
if(callbackInterface != null)
|
||||||
callbackInterface.setSeekBarDuration((int) (mediaPlayer.getLength() / 1000));
|
callbackInterface.setSeekBarDuration((int) (mediaPlayer.getLength() / 1000));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user