blob: 3fc245abf246ece9710314a50738dfb04d8cf945 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/* SPDX-License-Identifier: GPL-2.0 */
/** \file vss.h The virtual streaming system API.
*
* The virtual streaming system (vss) is the sender-independent part of the
* server which is responsible to communicate with the audio file selector
* and the various senders. The functions declared here are implemented in
* \ref vss.c.
*
* The init function \ref vss_init() is only called in server context to
* register the vss task to the scheduler. Other functions, for example \ref
* vss_playing() are only called in command handler context. The shutdown
* function \ref vss_shutdown() is called in both contexts.
*
* The udp sender is based on a lossy protocol, so it uses forward error
* correction (FEC) to deal with packet losses. The virtual streaming system
* maintains the list of FEC clients and implements the functions declared
* in this file to add or remove FEC clients from the list.
*/
void vss_init(int afs_socket, struct sched *s);
void vss_shutdown(void);
bool vss_playing(void);
bool vss_paused(void);
bool vss_stopped(void);
struct fec_client *vss_add_fec_client(struct sender_client *sc,
struct fec_client_parms *fcp);
void vss_del_fec_client(struct fec_client *fc);
/** Stop playing after current audio file. */
#define VSS_NOMORE 1
/** Skip remaining part of current audio file. */
#define VSS_NEXT 2
/** A reposition request was sent by a client. */
#define VSS_REPOS 4
/** Currently playing. */
#define VSS_PLAYING 8
|