public class MPDPlayer extends Observable implements IPlayer, Observer
Modifier and Type | Field and Description |
---|---|
private boolean |
bMute |
private boolean |
bStopRequest |
private String |
current_status |
private CustomTrack |
current_track |
private long |
current_volume |
private static org.apache.log4j.Logger |
log |
private long |
mute_volume |
private TCPConnector |
tcp |
(package private) HashMap<String,CustomTrack> |
tracks |
Constructor and Description |
---|
MPDPlayer() |
Modifier and Type | Method and Description |
---|---|
private String |
checkURL(String url)
MPD Player will not play .pls,.m3u or .asx so we check here first
|
void |
destroy() |
void |
fireEvent(EventBase ev) |
String |
getUniqueId() |
boolean |
isPlaying() |
void |
loaded() |
void |
openFile(CustomTrack track) |
void |
pause(boolean bPause) |
boolean |
playTrack(CustomTrack track,
long volume,
boolean mute) |
void |
preLoadTrack(CustomTrack track) |
private void |
removeTrack(String track_id) |
void |
resume() |
void |
seekAbsolute(long seconds) |
void |
setMute(boolean mute) |
void |
setStatus(String value) |
void |
setVolume(long volume) |
private void |
setVolumeInternal(long volume) |
void |
startTrack() |
void |
stop() |
void |
update(Observable arg0,
Object obj) |
void |
updateInfo(String artist,
String title)
Used by the ICY info to update the track being played on the Radio
|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addObserver
private static org.apache.log4j.Logger log
HashMap<String,CustomTrack> tracks
private TCPConnector tcp
private CustomTrack current_track
private String current_status
private long current_volume
private long mute_volume
private boolean bMute
private boolean bStopRequest
public void preLoadTrack(CustomTrack track)
preLoadTrack
in interface IPlayer
public boolean playTrack(CustomTrack track, long volume, boolean mute)
public void openFile(CustomTrack track)
private void setVolumeInternal(long volume)
public void seekAbsolute(long seconds)
seekAbsolute
in interface IPlayer
public void startTrack()
startTrack
in interface IPlayer
public String getUniqueId()
getUniqueId
in interface IPlayer
public void updateInfo(String artist, String title)
updateInfo
in interface IPlayer
artist
- title
- public void update(Observable arg0, Object obj)
private void removeTrack(String track_id)
Copyright © 2013–2014. All rights reserved.