|
Paraslash Audio Streaming |
About News Download Documentation Development |
Macros | |
#define | MAP_POPULATE 0 |
Enumerations | |
enum | afs_socket_status { AFS_SOCKET_READY, AFS_SOCKET_CHECK_FOR_WRITE, AFS_SOCKET_AFD_PENDING } |
enum | fec_client_state { FEC_STATE_NONE = 0, FEC_STATE_DISABLED, FEC_STATE_READY_TO_RUN } |
Functions | |
struct timeval * | vss_chunk_time (void) |
size_t | vss_get_fec_eof_packet (const char **buf) |
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) |
bool | vss_playing (void) |
bool | vss_paused (void) |
bool | vss_stopped (void) |
void | vss_init (int afs_socket, struct sched *s) |
void | vss_shutdown (void) |
Variables | |
struct misc_meta_data * | mmd |
const struct sender udp_sender dccp_sender | http_sender |
const struct sender *const | senders [] |
The virtual streaming system.
This contains the audio streaming code of para_server which is independent of the current audio format, audio file selector and of the activated senders.
#define MAP_POPULATE 0 |
As of 2018, neither FreeBSD-11.2 nor NetBSD-8.0 have MAP_POPULATE.
enum afs_socket_status |
enum fec_client_state |
struct timeval* vss_chunk_time | ( | void | ) |
Get the chunk time of the current audio file.
References misc_meta_data::afd, audio_file_data::afhi, afh_info::chunk_tv, and mmd.
size_t vss_get_fec_eof_packet | ( | const char ** | buf | ) |
Return a buffer that marks the end of the stream.
buf | Result pointer. |
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.
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.
sc | Generic sender_client data of the transport layer. |
fcp | FEC parameters as supplied by the transport layer. |
References zalloc().
void vss_del_fec_client | ( | struct fec_client * | fc | ) |
Remove one entry from the list of active fec clients.
fc | The client to be removed. |
bool vss_playing | ( | void | ) |
Check if the "P" (playing) vss status flag is set.
References mmd, misc_meta_data::new_vss_status_flags, and VSS_PLAYING.
bool vss_paused | ( | void | ) |
Check if the virtual streaming system is currently paused.
References mmd, misc_meta_data::new_vss_status_flags, VSS_NEXT, and VSS_PLAYING.
bool vss_stopped | ( | void | ) |
Check if the virtual streaming system is currently stopped.
References mmd, misc_meta_data::new_vss_status_flags, VSS_NEXT, and VSS_PLAYING.
void vss_init | ( | int | afs_socket, |
struct sched * | s | ||
) |
Initialize the virtual streaming system task.
afs_socket | The fd for communication with afs. |
s | The 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().
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.
|
extern |
Pointer to shared memory area for communication between para_server and its children.
Exported to vss.c, command.c and to afs.
Referenced by vss_chunk_time(), vss_paused(), vss_playing(), and vss_stopped().
|
extern |
The HTTP sender.
This is the only sender which does not FEC-encode the stream. This is not necessary because HTTP sits on top of TCP, a reliable transport which retransmits lost packets automatically. The sender employs per-client queues which queue chunks of audio data if they can not be sent immediately because the write operation would block. Most methods of the sender are implemented as wrappers for the generic functions defined in send_common.c.
const struct sender* const senders[] |