/* 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