paraslash Paraslash Audio Streaming
About   News   Download   Documentation   Development

Macros | Functions
vss.h File Reference

Macros

#define VSS_NOMORE   1
 
#define VSS_NEXT   2
 
#define VSS_REPOS   4
 
#define VSS_PLAYING   8
 

Functions

void vss_init (int afs_socket, struct sched *s)
 
bool vss_playing (void)
 
bool vss_paused (void)
 
bool vss_stopped (void)
 
struct timeval * vss_chunk_time (void)
 
void vss_shutdown (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)
 
size_t vss_get_fec_eof_packet (const char **buf)
 

Detailed Description

Exported functions from vss.c (para_server).

Macro Definition Documentation

◆ VSS_NOMORE

#define VSS_NOMORE   1

Stop playing after current audio file.

◆ VSS_NEXT

#define VSS_NEXT   2

Skip remaining part of current audio file.

◆ VSS_REPOS

#define VSS_REPOS   4

A reposition request was sent by a client.

◆ VSS_PLAYING

#define VSS_PLAYING   8

Currently playing.

Function Documentation

◆ vss_init()

void vss_init ( int  afs_socket,
struct sched s 
)

Initialize the virtual streaming system task.

Parameters
afs_socketThe fd for communication with afs.
sThe scheduler to register the vss task to.

This also initializes all supported senders and starts streaming if the –autoplay command line flag was given.

References ms2tv(), OPT_UINT32_VAL, PARA_DEBUG_LOG, and tv2ms().

◆ vss_playing()

bool vss_playing ( void  )

Check if the "P" (playing) vss status flag is set.

Returns
True if playing, false otherwise.

References mmd, misc_meta_data::new_vss_status_flags, and VSS_PLAYING.

◆ vss_paused()

bool vss_paused ( void  )

Check if the virtual streaming system is currently paused.

Returns
True if paused, false otherwise.

References mmd, misc_meta_data::new_vss_status_flags, VSS_NEXT, and VSS_PLAYING.

◆ vss_stopped()

bool vss_stopped ( void  )

Check if the virtual streaming system is currently stopped.

Returns
True iff stopped.

References mmd, misc_meta_data::new_vss_status_flags, VSS_NEXT, and VSS_PLAYING.

◆ vss_chunk_time()

struct timeval* vss_chunk_time ( void  )

Get the chunk time of the current audio file.

Returns
A pointer to a struct containing the chunk time, or NULL, if currently no audio file is selected.

References misc_meta_data::afd, audio_file_data::afhi, afh_info::chunk_tv, and mmd.

◆ vss_shutdown()

void vss_shutdown ( void  )

Turn off the virtual streaming system.

This is only executed on exit. It calls the ->shutdown method of all senders.

References FOR_EACH_SENDER, PARA_NOTICE_LOG, process_is_command_handler(), senders, and sender::shutdown.

◆ vss_add_fec_client()

struct fec_client* vss_add_fec_client ( struct sender_client sc,
struct fec_client_parms fcp 
)

Add one entry to the list of active fec clients.

Parameters
scGeneric sender_client data of the transport layer.
fcpFEC parameters as supplied by the transport layer.
Returns
Newly allocated fec_client struct.

References zalloc().

◆ vss_del_fec_client()

void vss_del_fec_client ( struct fec_client *  fc)

Remove one entry from the list of active fec clients.

Parameters
fcThe client to be removed.

◆ vss_get_fec_eof_packet()

size_t vss_get_fec_eof_packet ( const char **  buf)

Return a buffer that marks the end of the stream.

Parameters
bufResult pointer.
Returns
The length of the eof buffer.

This is used for (multicast) udp streaming where closing the socket on the sender might not give rise to an eof condition at the peer.

References FEC_EOF_PACKET, and FEC_HEADER_SIZE.