|
YAACC - UPNP Client and Server
|


Classes | |
| class | PlayerServiceBinder |
Public Member Functions | |
| void | onCreate () |
| synchronized void | registerMediaSession (MediaSession mediaSession) |
| Register MediaSession from LocalMediaSessionPlayer. | |
| synchronized void | unregisterMediaSession (MediaSession mediaSession) |
| Unregister MediaSession when player is destroyed. | |
| void | addPlayer (Player player) |
| void | removePlayer (Player player) |
| void | addPlayerListChangeListener (PlayerListChangeNotifier.Listener listener) |
| Registers a listener that is told when a player is added to or removed from the active players. | |
| void | removePlayerListChangeListener (PlayerListChangeNotifier.Listener listener) |
| long | getPlayerCreationSequence (Player player) |
| Creation sequence of an active player: higher means added later. | |
| void | onDestroy () |
| IBinder | onBind (Intent intent) |
| MediaSession | onGetSession (MediaSession.ControllerInfo controllerInfo) |
| Collection< Player > | getPlayer () |
| int | onStartCommand (Intent intent, int flags, int startId) |
| HandlerThread | getPlayerHandlerThread () |
| Player | getPlayer (int playerId) |
| List< Player > | createPlayer (UpnpClient upnpClient, List< PlayableItem > items) |
| Creates a player for the given content. | |
| List< Player > | createPlayerFor (UpnpClient upnpClient, List< PlayableItem > items, java.util.Collection< Device<?, ?, ?> > devices) |
| Creates one player per given receiver for the items; the other receivers are not touched (add to playlist uses this for the chosen receivers that have no player yet). | |
| List< Player > | createQueuePlayers (UpnpClient upnpClient, PickedQueue.Result queue, java.util.Collection< Device<?, ?, ?> > devices) |
| Creates the players of a picked queue: for each non-empty type (audio, video, image) one player per receiver, every player with its own items. | |
| List< Player > | createPlayerForLocalDevice (UpnpClient upnpClient, List< PlayableItem > items) |
| Creates a player for the local device only (used by renderer service). | |
| List< Player > | createPlayerForLocalQueue (UpnpClient upnpClient, List< PlayableItem > items) |
Creates a player for the local device for a queue that its caller indexes: the OpenHome renderer keeps one id per entry and plays an entry with playItemAt(index). | |
| boolean | onUnbind (Intent intent) |
| Player | attachOpenHomePlayer (UpnpClient upnpClient, Device<?, ?, ?> device) |
Gives an OpenHome device that plays already a player that shows its playlist (see OpenHomePlayer#attach()). | |
| Collection< Player > | getCurrentPlayers () |
| returns all current players | |
| Player | getCurrentPlayerById (Integer id) |
| List< Player > | getCurrentPlayersOfType (Class<?> typeClazz) |
| returns all current players of the given type. | |
| List< Player > | getRendererPlayersOfType (UpnpClient upnpClient, Class<?> typeClazz) |
| The players that the renderer's transport commands (stop, pause, seek, the position) look for: the current players of the kind the content needs. | |
| Player | getFirstCurrentPlayerOfType (Class typeClazz) |
| returns the first current player of the given type. | |
| Class | getPlayerClassForMimeType (String mimeType) |
| Returns the class of a player for the given mime type. | |
| void | shutdown (Player player) |
| Kills the given Player. | |
| void | shutdown () |
| Kill all Players. | |
Static Public Member Functions | |
| static int | textFor (SnapcastRendererOutput.Problem problem) |
| The text of a problem; 0 for none. | |
| void de.yaacc.player.PlayerService.addPlayerListChangeListener | ( | PlayerListChangeNotifier.Listener | listener | ) |
Registers a listener that is told when a player is added to or removed from the active players.
Callbacks are delivered on the main thread, at most once per player for each direction. Registering the same listener twice has no effect.
The service keeps a strong reference to the listener until removePlayerListChangeListener is called, so callers tied to a view or fragment must unregister when it goes away. A notification queued before unregistering is not delivered to that listener.
Referenced by de.yaacc.upnp.UpnpClient.addPlayerListChangeListener().

| Player de.yaacc.player.PlayerService.attachOpenHomePlayer | ( | UpnpClient | upnpClient, |
| Device<?, ?, ?> | device ) |
Gives an OpenHome device that plays already a player that shows its playlist (see OpenHomePlayer#attach()).
Referenced by de.yaacc.upnp.UpnpClient.attachOpenHomePlayer().


| List< Player > de.yaacc.player.PlayerService.createPlayer | ( | UpnpClient | upnpClient, |
| List< PlayableItem > | items ) |
Creates a player for the given content.
Based on the configuration settings in the upnpClient the player may be a player to play on a remote device.
| upnpClient | the upnpClient |
| items | the items to be played |
Referenced by de.yaacc.player.PlayerService.createPlayerFor(), and de.yaacc.upnp.UpnpClient.initializePlayers().


| List< Player > de.yaacc.player.PlayerService.createPlayerForLocalDevice | ( | UpnpClient | upnpClient, |
| List< PlayableItem > | items ) |
Creates a player for the local device only (used by renderer service).
Playlist files are left out (an .m3u can not be played as audio); when nothing is left no player is made and the user is told.
Referenced by de.yaacc.upnp.UpnpClient.initializePlayers().

| List< Player > de.yaacc.player.PlayerService.createPlayerForLocalQueue | ( | UpnpClient | upnpClient, |
| List< PlayableItem > | items ) |
Creates a player for the local device for a queue that its caller indexes: the OpenHome renderer keeps one id per entry and plays an entry with playItemAt(index).
The list is therefore kept exactly as given, playlist files included (an entry that can not be read is skipped by the player, which keeps the indexes).
Referenced by de.yaacc.upnp.UpnpClient.initializeLocalPlayer().

| List< Player > de.yaacc.player.PlayerService.createQueuePlayers | ( | UpnpClient | upnpClient, |
| PickedQueue.Result | queue, | ||
| java.util.Collection< Device<?, ?, ?> > | devices ) |
Creates the players of a picked queue: for each non-empty type (audio, video, image) one player per receiver, every player with its own items.
This phone plays audio and images straight from the picked content: uris; every other player gets placeholder items whose files are shared just in time (current and next item) for exactly its receiver and released again. The players are not started.
Referenced by de.yaacc.player.PlayerService.createQueuePlayers(), and de.yaacc.upnp.UpnpClient.initializeQueuePlayers().


| Collection< Player > de.yaacc.player.PlayerService.getCurrentPlayers | ( | ) |
returns all current players
Referenced by de.yaacc.upnp.UpnpClient.getCurrentPlayers().

| List< Player > de.yaacc.player.PlayerService.getCurrentPlayersOfType | ( | Class<?> | typeClazz | ) |
returns all current players of the given type.
| typeClazz | the requested type |
Referenced by de.yaacc.player.PlayerService.attachOpenHomePlayer().

| Player de.yaacc.player.PlayerService.getFirstCurrentPlayerOfType | ( | Class | typeClazz | ) |
returns the first current player of the given type.
| typeClazz | the requested type |
| Class de.yaacc.player.PlayerService.getPlayerClassForMimeType | ( | String | mimeType | ) |
Returns the class of a player for the given mime type.
| mimeType | the mime type |
Referenced by de.yaacc.upnp.UpnpClient.getCurrentPlayers().


| long de.yaacc.player.PlayerService.getPlayerCreationSequence | ( | Player | player | ) |
Creation sequence of an active player: higher means added later.
Player ids can't tell that (AVTransportPlayer ids are random, local ids are fixed per type).
Referenced by de.yaacc.upnp.UpnpClient.getPlayerCreationSequence().

| List< Player > de.yaacc.player.PlayerService.getRendererPlayersOfType | ( | UpnpClient | upnpClient, |
| Class<?> | typeClazz ) |
The players that the renderer's transport commands (stop, pause, seek, the position) look for: the current players of the kind the content needs.
With the output set to a Snapcast group the player for music is the Snapcast player of the chosen group (the lookup by kind deliberately ignores a Snapcast player, see isOfType) and never the local music player of the app; every other kind is looked up as before.
Referenced by de.yaacc.upnp.UpnpClient.getCurrentPlayers().


| synchronized void de.yaacc.player.PlayerService.registerMediaSession | ( | MediaSession | mediaSession | ) |
Register MediaSession from LocalMediaSessionPlayer.
Called when player connects to service.
| void de.yaacc.player.PlayerService.shutdown | ( | Player | player | ) |
Kills the given Player.
| player | the player to shutdown |
Referenced by de.yaacc.player.AbstractPlayer.exit(), de.yaacc.player.LocalImagePlayer.exit(), and de.yaacc.upnp.UpnpClient.shutdown().


|
static |
The text of a problem; 0 for none.
Every problem that refuses a play has one.
Referenced by de.yaacc.upnp.server.renderingcontrol.RendererVolumes.forContext().

| synchronized void de.yaacc.player.PlayerService.unregisterMediaSession | ( | MediaSession | mediaSession | ) |
Unregister MediaSession when player is destroyed.
Only the player that registered a session removes it; if it was the active one, the session registered before it (if any) is active again.
Referenced by de.yaacc.player.LocalMediaSessionPlayer.onDestroy().
