|
YAACC - UPNP Client and Server
|
Plays the OpenHome queue of the renderer on this device and reports what the player does back to the OpenHome services. More...


Classes | |
| interface | Host |
| The app side of the renderer. More... | |
| interface | Threads |
| The threads of the renderer. More... | |
| interface | Volume |
| The system volume of the device. More... | |
Public Member Functions | |
| OpenHomeRenderer (Host host, Volume volume, Threads threads, OhRendererCore.Details details, String protocolInfo) | |
| OhRendererCore | core () |
| void | start () |
| Starts the once-a-second look at the player. | |
| void | shutdown () |
| Ends the look at the player and the player itself. | |
| void | play () |
| void | pause () |
| void | stop () |
| void | next () |
| void | previous () |
| void | setRepeat (boolean repeat) |
| void | setShuffle (boolean shuffle) |
| void | seekSecondAbsolute (long second) |
| void | seekSecondRelative (int seconds) |
| void | seekToTrack (long id) |
| Plays the track with this id (it is in the queue). | |
| void | trackInserted (int index, OhQueue.Entry entry) |
A track was put into the queue at index. | |
| void | trackDeleted (int index, long id) |
The track with the id was taken out of the queue; it was at index. | |
| void | queueCleared () |
| void | setVolume (int percent) |
| void | setMute (boolean mute) |
| void | refresh () |
| Reports the state of the player to the OpenHome services: called by the poll and after every command (on the worker). | |
Public Member Functions inherited from de.yaacc.upnp.server.openhome.OhPlayback | |
Plays the OpenHome queue of the renderer on this device and reports what the player does back to the OpenHome services.
The queue (OhRendererCore#queue()) is the truth. The player holds the same tracks in the same order, created from the queue when somebody plays. sync() compares the two and makes the player's list match (it removes what is gone from the queue and inserts what is new), so it does not matter in which order concurrent edits arrive and an edit that reaches the renderer twice does nothing the second time. What the player does on its own (a track ends, the user pauses in the notification) is found by refresh(), which runs about once a second while the renderer is started.
Threads: everything the renderer does runs one after the other on one worker thread (Threads); the commands of the control points only hand their work over and return. The player (ExoPlayer insists on it) is only touched on its own thread, the worker waits for it, never the other way round.
The part that needs Android (creating the music player, turning a DIDL text into a playable item, the system volume, the threads) is behind Host, Volume and Threads, so the logic runs in plain JVM tests.
| void de.yaacc.upnp.server.openhome.OpenHomeRenderer.next | ( | ) |
Implements de.yaacc.upnp.server.openhome.OhPlayback.
| void de.yaacc.upnp.server.openhome.OpenHomeRenderer.pause | ( | ) |
Implements de.yaacc.upnp.server.openhome.OhPlayback.
| void de.yaacc.upnp.server.openhome.OpenHomeRenderer.play | ( | ) |
Implements de.yaacc.upnp.server.openhome.OhPlayback.
| void de.yaacc.upnp.server.openhome.OpenHomeRenderer.previous | ( | ) |
Implements de.yaacc.upnp.server.openhome.OhPlayback.
| void de.yaacc.upnp.server.openhome.OpenHomeRenderer.queueCleared | ( | ) |
Implements de.yaacc.upnp.server.openhome.OhPlayback.
| void de.yaacc.upnp.server.openhome.OpenHomeRenderer.seekSecondAbsolute | ( | long | second | ) |
Implements de.yaacc.upnp.server.openhome.OhPlayback.
| void de.yaacc.upnp.server.openhome.OpenHomeRenderer.seekSecondRelative | ( | int | seconds | ) |
Implements de.yaacc.upnp.server.openhome.OhPlayback.
| void de.yaacc.upnp.server.openhome.OpenHomeRenderer.seekToTrack | ( | long | id | ) |
Plays the track with this id (it is in the queue).
Implements de.yaacc.upnp.server.openhome.OhPlayback.

| void de.yaacc.upnp.server.openhome.OpenHomeRenderer.setMute | ( | boolean | mute | ) |
Implements de.yaacc.upnp.server.openhome.OhPlayback.
| void de.yaacc.upnp.server.openhome.OpenHomeRenderer.setRepeat | ( | boolean | repeat | ) |
Implements de.yaacc.upnp.server.openhome.OhPlayback.
| void de.yaacc.upnp.server.openhome.OpenHomeRenderer.setShuffle | ( | boolean | shuffle | ) |
Implements de.yaacc.upnp.server.openhome.OhPlayback.
| void de.yaacc.upnp.server.openhome.OpenHomeRenderer.setVolume | ( | int | percent | ) |
| percent | 0 to 100 |
Implements de.yaacc.upnp.server.openhome.OhPlayback.
| void de.yaacc.upnp.server.openhome.OpenHomeRenderer.stop | ( | ) |
Implements de.yaacc.upnp.server.openhome.OhPlayback.
| void de.yaacc.upnp.server.openhome.OpenHomeRenderer.trackDeleted | ( | int | index, |
| long | id ) |
The track with the id was taken out of the queue; it was at index.
Implements de.yaacc.upnp.server.openhome.OhPlayback.

| void de.yaacc.upnp.server.openhome.OpenHomeRenderer.trackInserted | ( | int | index, |
| OhQueue.Entry | entry ) |
A track was put into the queue at index.
Implements de.yaacc.upnp.server.openhome.OhPlayback.