YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
de.yaacc.player.AbstractPlayer Class Referenceabstract
Inheritance diagram for de.yaacc.player.AbstractPlayer:
Inheritance graph
Collaboration diagram for de.yaacc.player.AbstractPlayer:
Collaboration graph

Public Member Functions

 AbstractPlayer (UpnpClient upnpClient)
 
void onServiceConnected (ComponentName className, IBinder binder)
 
void onServiceDisconnected (ComponentName className)
 
Context getContext ()
 
Bitmap getIcon ()
 
void setIcon (Bitmap icon)
 
UpnpClient getUpnpClient ()
 
void startService ()
 
void next ()
 play the next item
 
void previous ()
 play the previous item
 
void pause ()
 Pause the current item.
 
void play ()
 start playing the current item
 
void stop ()
 stops playing.
 
void clear ()
 Drops all Items.
 
boolean isPlaying ()
 
void setPlaying (boolean isPlaying)
 
int getCurrentIndex ()
 
void setCurrentIndex (int currentIndex)
 
List< PlayableItemgetItems ()
 
void setItems (PlayableItem... playableItems)
 Set a List of Items.
 
void addItems (List< PlayableItem > playableItems)
 adds additional item to the end of the playlist
 
String getPositionString ()
 returns the current item position in the playlist
 
int getCurrentItemIndex ()
 
String getCurrentItemTitle ()
 returns the title of the current item
 
String getNextItemTitle ()
 returns the title of the next current item
 
long getRemainingTime ()
 
void startTimer (final long duration)
 Start a timer for the next item change.
 
String getName ()
 Get the player name.
 
void setName (String name)
 Set the name of the player.
 
boolean isProcessingCommand ()
 
void setProcessingCommand (boolean isProcessingCommand)
 
void exit ()
 Exit the player.
 
PendingIntent getNotificationIntent ()
 Returns the intent which is to be started by pushing the notification entry.
 
void onDestroy ()
 Kill the player.
 
int getId ()
 Returns the id of the Player.
 
void addPropertyChangeListener (PropertyChangeListener listener)
 add a property change listener
 
void removePropertyChangeListener (PropertyChangeListener listener)
 remove a property change listener
 
String getDuration ()
 returns the duration of the current item
 
String getElapsedTime ()
 returns the elapsed time of the current item
 
URI getAlbumArt ()
 
SynchronizationInfo getSyncInfo ()
 Get the synchronization information.
 
void setSyncInfo (SynchronizationInfo syncInfo)
 Set the synchronization information.
 
boolean getMute ()
 
void setMute (boolean mute)
 
int getVolume ()
 
void setVolume (int volume)
 
int getIconResourceId ()
 
String getDeviceId ()
 
abstract void seekTo (long millisecondsFromStart)
 
String getShortName ()
 Get the player short name.
 
void setShortName (String name)
 Set the short name of the player.
 
boolean hasActionGetVolume ()
 
boolean hasActionGetMute ()
 

Static Public Attributes

static final String PLAYER_ID = "PlayerId"
 
static final String PROPERTY_ITEM = "item"
 

Protected Member Functions

boolean isShufflePlay ()
 is shuffle play enabled.
 
void cancelTimer ()
 
Object loadItem (int toLoadIndex)
 
void loadItem (int previousIndex, int nextIndex)
 
void doPostLoadItem (PlayableItem playableItem)
 
void doPause ()
 
void doResume ()
 
long getSilenceDuration ()
 returns the duration between two items
 
void updateTimer ()
 
long parseTimeStringToMillis (String timeString)
 
abstract int getNotificationId ()
 Returns the notification id of the player.
 
abstract void stopItem (PlayableItem playableItem)
 
abstract Object loadItem (PlayableItem playableItem)
 
abstract void startItem (PlayableItem playableItem, Object loadedItem)
 
void firePropertyChange (String property, Object oldValue, Object newValue)
 
Date getExecutionTime ()
 
void executeCommand (TimerTask command, Date executionTime)
 

Detailed Description

Author
Tobias Schoene (openbit)

Constructor & Destructor Documentation

◆ AbstractPlayer()

de.yaacc.player.AbstractPlayer.AbstractPlayer ( UpnpClient  upnpClient)
Parameters
upnpClientthe upnpclient

Member Function Documentation

◆ addItems()

void de.yaacc.player.AbstractPlayer.addItems ( List< PlayableItem items)

adds additional item to the end of the playlist

Parameters
itemsthe items to be added

Implements de.yaacc.player.Player.

◆ addPropertyChangeListener()

void de.yaacc.player.AbstractPlayer.addPropertyChangeListener ( PropertyChangeListener  listener)

add a property change listener

Parameters
listenerthe listener

Implements de.yaacc.player.Player.

◆ clear()

void de.yaacc.player.AbstractPlayer.clear ( )

Drops all Items.

Implements de.yaacc.player.Player.

◆ exit()

void de.yaacc.player.AbstractPlayer.exit ( )

Exit the player.

Implements de.yaacc.player.Player.

Reimplemented in de.yaacc.player.AVTransportController, and de.yaacc.player.AVTransportPlayer.

Here is the call graph for this function:

◆ getAlbumArt()

URI de.yaacc.player.AbstractPlayer.getAlbumArt ( )

◆ getContext()

Context de.yaacc.player.AbstractPlayer.getContext ( )

◆ getCurrentItemIndex()

int de.yaacc.player.AbstractPlayer.getCurrentItemIndex ( )

◆ getCurrentItemTitle()

String de.yaacc.player.AbstractPlayer.getCurrentItemTitle ( )

returns the title of the current item

Returns
the title

Implements de.yaacc.player.Player.

◆ getDeviceId()

String de.yaacc.player.AbstractPlayer.getDeviceId ( )

◆ getDuration()

String de.yaacc.player.AbstractPlayer.getDuration ( )

returns the duration of the current item

Returns
the duration

Implements de.yaacc.player.Player.

Reimplemented in de.yaacc.player.AVTransportPlayer, de.yaacc.player.LocalBackgoundMusicPlayer, and de.yaacc.player.SyncAVTransportPlayer.

◆ getElapsedTime()

String de.yaacc.player.AbstractPlayer.getElapsedTime ( )

returns the elapsed time of the current item

Returns
the elapsed time

Implements de.yaacc.player.Player.

Reimplemented in de.yaacc.player.AVTransportPlayer, de.yaacc.player.LocalBackgoundMusicPlayer, and de.yaacc.player.SyncAVTransportPlayer.

◆ getIcon()

Bitmap de.yaacc.player.AbstractPlayer.getIcon ( )

◆ getIconResourceId()

int de.yaacc.player.AbstractPlayer.getIconResourceId ( )

◆ getId()

int de.yaacc.player.AbstractPlayer.getId ( )

Returns the id of the Player.

Returns
the id

Implements de.yaacc.player.Player.

Referenced by de.yaacc.player.AVTransportPlayer.getNotificationIntent(), de.yaacc.player.LocalBackgoundMusicPlayer.getNotificationIntent(), de.yaacc.player.SyncAVTransportPlayer.getNotificationIntent(), and de.yaacc.player.AVTransportPlayer.startTimer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getItems()

List< PlayableItem > de.yaacc.player.AbstractPlayer.getItems ( )

◆ getMute()

boolean de.yaacc.player.AbstractPlayer.getMute ( )

◆ getName()

String de.yaacc.player.AbstractPlayer.getName ( )

◆ getNextItemTitle()

String de.yaacc.player.AbstractPlayer.getNextItemTitle ( )

returns the title of the next current item

Returns
the title

Implements de.yaacc.player.Player.

◆ getNotificationId()

abstract int de.yaacc.player.AbstractPlayer.getNotificationId ( )
abstractprotected

Returns the notification id of the player.

Returns
the notification id

Reimplemented in de.yaacc.player.AVTransportPlayer, de.yaacc.player.LocalBackgoundMusicPlayer, de.yaacc.player.MultiContentPlayer, and de.yaacc.player.SyncAVTransportPlayer.

Referenced by de.yaacc.player.AbstractPlayer.getId().

Here is the caller graph for this function:

◆ getNotificationIntent()

PendingIntent de.yaacc.player.AbstractPlayer.getNotificationIntent ( )

Returns the intent which is to be started by pushing the notification entry.

Returns
the peneding intent

Implements de.yaacc.player.Player.

Reimplemented in de.yaacc.player.AVTransportPlayer, de.yaacc.player.LocalBackgoundMusicPlayer, de.yaacc.player.MultiContentPlayer, and de.yaacc.player.SyncAVTransportPlayer.

◆ getPositionString()

String de.yaacc.player.AbstractPlayer.getPositionString ( )

◆ getShortName()

String de.yaacc.player.AbstractPlayer.getShortName ( )

Get the player short name.

Returns
the name

Implements de.yaacc.player.Player.

◆ getSilenceDuration()

long de.yaacc.player.AbstractPlayer.getSilenceDuration ( )
protected

returns the duration between two items

Returns
duration in millis

◆ getSyncInfo()

SynchronizationInfo de.yaacc.player.AbstractPlayer.getSyncInfo ( )

Get the synchronization information.

Returns
the info object

Implements de.yaacc.player.Player.

◆ getUpnpClient()

UpnpClient de.yaacc.player.AbstractPlayer.getUpnpClient ( )

◆ getVolume()

int de.yaacc.player.AbstractPlayer.getVolume ( )

◆ hasActionGetMute()

boolean de.yaacc.player.AbstractPlayer.hasActionGetMute ( )

◆ hasActionGetVolume()

boolean de.yaacc.player.AbstractPlayer.hasActionGetVolume ( )

◆ isPlaying()

boolean de.yaacc.player.AbstractPlayer.isPlaying ( )

◆ isShufflePlay()

boolean de.yaacc.player.AbstractPlayer.isShufflePlay ( )
protected

is shuffle play enabled.

Returns
true, if shuffle play is enabled

Reimplemented in de.yaacc.player.LocalBackgoundMusicPlayer.

Referenced by de.yaacc.player.AbstractPlayer.setItems().

Here is the caller graph for this function:

◆ next()

void de.yaacc.player.AbstractPlayer.next ( )

play the next item

Implements de.yaacc.player.Player.

Reimplemented in de.yaacc.player.AVTransportController.

Referenced by de.yaacc.player.AbstractPlayer.startTimer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onDestroy()

void de.yaacc.player.AbstractPlayer.onDestroy ( )

Kill the player.

Implements de.yaacc.player.Player.

Reimplemented in de.yaacc.player.AVTransportPlayer, and de.yaacc.player.LocalBackgoundMusicPlayer.

Here is the call graph for this function:

◆ pause()

void de.yaacc.player.AbstractPlayer.pause ( )

Pause the current item.

Implements de.yaacc.player.Player.

Reimplemented in de.yaacc.player.AVTransportPlayer, and de.yaacc.player.SyncAVTransportPlayer.

Here is the call graph for this function:

◆ play()

void de.yaacc.player.AbstractPlayer.play ( )

start playing the current item

Implements de.yaacc.player.Player.

Reimplemented in de.yaacc.player.AVTransportController, and de.yaacc.player.SyncAVTransportPlayer.

Referenced by de.yaacc.player.AbstractPlayer.next(), and de.yaacc.player.AbstractPlayer.previous().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ previous()

void de.yaacc.player.AbstractPlayer.previous ( )

play the previous item

Implements de.yaacc.player.Player.

Reimplemented in de.yaacc.player.AVTransportController.

Here is the call graph for this function:

◆ removePropertyChangeListener()

void de.yaacc.player.AbstractPlayer.removePropertyChangeListener ( PropertyChangeListener  listener)

remove a property change listener

Parameters
listenerthe listener

Implements de.yaacc.player.Player.

◆ seekTo()

abstract void de.yaacc.player.AbstractPlayer.seekTo ( long  millisecondsFromStart)
abstract

◆ setIcon()

void de.yaacc.player.AbstractPlayer.setIcon ( Bitmap  icon)

◆ setItems()

void de.yaacc.player.AbstractPlayer.setItems ( PlayableItem...  items)

Set a List of Items.

Parameters
itemsthe items to be played

Implements de.yaacc.player.Player.

Here is the call graph for this function:

◆ setMute()

void de.yaacc.player.AbstractPlayer.setMute ( boolean  mute)

◆ setName()

void de.yaacc.player.AbstractPlayer.setName ( String  name)

◆ setShortName()

void de.yaacc.player.AbstractPlayer.setShortName ( String  name)

◆ setSyncInfo()

void de.yaacc.player.AbstractPlayer.setSyncInfo ( SynchronizationInfo  syncInfo)

Set the synchronization information.

Parameters
syncInfothe info object

Implements de.yaacc.player.Player.

◆ setVolume()

void de.yaacc.player.AbstractPlayer.setVolume ( int  volume)

◆ startTimer()

void de.yaacc.player.AbstractPlayer.startTimer ( final long  duration)

Start a timer for the next item change.

Parameters
durationin millis

Reimplemented in de.yaacc.player.AVTransportPlayer.

Here is the call graph for this function:

◆ stop()

void de.yaacc.player.AbstractPlayer.stop ( )

stops playing.

And returns to the beginning of the item list.

Implements de.yaacc.player.Player.

Reimplemented in de.yaacc.player.AVTransportController, and de.yaacc.player.SyncAVTransportPlayer.

Referenced by de.yaacc.player.AbstractPlayer.exit(), de.yaacc.player.AbstractPlayer.next(), and de.yaacc.player.AbstractPlayer.onDestroy().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: