Paraslash Audio Streaming | |
About News Download Documentation Development |
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... | |
exported symbols from grab_client.c
int grab_client_new | ( | int | fd, |
struct lls_parse_result * | lpr, | ||
struct sched * | s | ||
) |
Create and activate a grab client.
fd | The file descriptor of the client. |
lpr | The parsed command line of the grab command. |
s | The 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.
void activate_grab_clients | ( | struct sched * | s | ) |
Activate inactive grab clients if possible.
s | Needed 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.