YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.sendspin.hub.SourceIngress Class Reference

The server side of one source@v1 client: what the specification says a server does with a source, without the network. More...

Collaboration diagram for de.yaacc.sendspin.hub.SourceIngress:
Collaboration graph

Classes

interface  Target
 Where the audio goes: the group the server feeds. More...
 

Public Member Functions

 SourceIngress (Target target)
 
synchronized void startSent ()
 The server sent start: one opening of a stream is authorised.
 
synchronized void stopSent ()
 The server sent stop: no new stream, and what is in flight is dropped until the source ends its stream.
 
synchronized boolean isOpen ()
 
synchronized void onStreamStart (SourceMessages.StreamStart start) throws ProtocolException
 
synchronized boolean onChunk (SourceMessages.Chunk chunk) throws ProtocolException
 
synchronized void onStreamEnd ()
 client-stream/end of the source: the feed is closed; another stream needs another start.
 
synchronized void close ()
 The connection ends: an open stream is closed (once).
 

Static Public Attributes

static final java.util.List< String > CODECS = java.util.Collections.singletonList("pcm")
 The codecs this ingress takes (what the server tells in its hello).
 

Detailed Description

The server side of one source@v1 client: what the specification says a server does with a source, without the network.

The server asks for the audio (startSent); the source announces its format (onStreamStart) and sends chunks (onChunk); it ends (onStreamEnd) or the server stops it (stopSent), after which what is still in flight is tolerated and dropped until the source ends. The audio is handed to the sink of the group as 16 bit stereo PCM at the group's rate. Only PCM of 16 bit, mono or stereo, is taken (the source@v1_support of the hello says so). A violation the specification names (a stream nobody asked for, audio without an open stream, a chunk longer than a source may send) is a ProtocolException: the connection is closed. The sink may wait (it paces the audio); this is called from the thread of the connection.

Member Function Documentation

◆ onChunk()

synchronized boolean de.yaacc.sendspin.hub.SourceIngress.onChunk ( SourceMessages.Chunk chunk) throws ProtocolException
Returns
false if the sink failed (the feed can not go on); true otherwise, also when the audio was dropped (after a stop)
Exceptions
ProtocolExceptionaudio without an open stream, or a chunk much longer than the limit of the specification
Here is the call graph for this function:

◆ onStreamStart()

synchronized void de.yaacc.sendspin.hub.SourceIngress.onStreamStart ( SourceMessages.StreamStart start) throws ProtocolException
Exceptions
ProtocolExceptiona stream nobody asked for, a codec or a format that is not taken
Here is the call graph for this function:

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