YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.upnp.server.openhome.OpenHomeRenderer Class Reference

Plays the OpenHome queue of the renderer on this device and reports what the player does back to the OpenHome services. More...

Inheritance diagram for de.yaacc.upnp.server.openhome.OpenHomeRenderer:
Inheritance graph
Collaboration diagram for de.yaacc.upnp.server.openhome.OpenHomeRenderer:
Collaboration graph

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

Detailed Description

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.

Member Function Documentation

◆ next()

void de.yaacc.upnp.server.openhome.OpenHomeRenderer.next ( )

◆ pause()

void de.yaacc.upnp.server.openhome.OpenHomeRenderer.pause ( )

◆ play()

void de.yaacc.upnp.server.openhome.OpenHomeRenderer.play ( )

◆ previous()

void de.yaacc.upnp.server.openhome.OpenHomeRenderer.previous ( )

◆ queueCleared()

void de.yaacc.upnp.server.openhome.OpenHomeRenderer.queueCleared ( )

◆ seekSecondAbsolute()

void de.yaacc.upnp.server.openhome.OpenHomeRenderer.seekSecondAbsolute ( long second)

◆ seekSecondRelative()

void de.yaacc.upnp.server.openhome.OpenHomeRenderer.seekSecondRelative ( int seconds)

◆ seekToTrack()

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.

Here is the call graph for this function:

◆ setMute()

void de.yaacc.upnp.server.openhome.OpenHomeRenderer.setMute ( boolean mute)

◆ setRepeat()

void de.yaacc.upnp.server.openhome.OpenHomeRenderer.setRepeat ( boolean repeat)

◆ setShuffle()

void de.yaacc.upnp.server.openhome.OpenHomeRenderer.setShuffle ( boolean shuffle)

◆ setVolume()

void de.yaacc.upnp.server.openhome.OpenHomeRenderer.setVolume ( int percent)
Parameters
percent0 to 100

Implements de.yaacc.upnp.server.openhome.OhPlayback.

◆ stop()

void de.yaacc.upnp.server.openhome.OpenHomeRenderer.stop ( )

◆ trackDeleted()

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.

Here is the call graph for this function:

◆ trackInserted()

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.


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