paraslash Paraslash Audio Streaming
About   News   Download   Documentation   Development

Functions
grab_client.h File Reference

exported symbols from grab_client.c More...

Functions

int grab_client_new (int fd, struct lls_parse_result *lpr, struct sched *s)
 Create and activate a grab client. More...
 
void activate_grab_clients (struct sched *s)
 Activate inactive grab clients if possible. More...
 

Detailed Description

exported symbols from grab_client.c

Function Documentation

◆ grab_client_new()

int grab_client_new ( int  fd,
struct lls_parse_result *  lpr,
struct sched s 
)

Create and activate a grab client.

Parameters
fdThe file descriptor of the client.
lprThe parsed command line of the grab command.
sThe scheduler to register the grab client task to.

This function semantically parses the arguments given as options to the grab command. On success it allocates a struct grab_client, associates it with the given file descriptor and activates it. If the new grab client can not be attached to an existing buffer tree node it is put into the inactive list for later activation.

Returns
Standard.

◆ activate_grab_clients()

void activate_grab_clients ( struct sched s)

Activate inactive grab clients if possible.

Parameters
sNeeded to schedule the grab client task.

This is called from audiod.c when the current audio file changes. It loops over all inactive grab clients and checks each grab client's configuration to determine if the client in question wishes to grab the new stream. If yes, this grab client is moved from the inactive to the active grab client list.

This function also garbage collects all grab clients whose tasks have been unscheduled.

References list_for_each_entry_safe.