paraslash Paraslash Audio Streaming
About   News   Download   Documentation   Development

Variables
aac_afh.c File Reference

para_server's aac audio format handler. More...

#include <regex.h>
#include <neaacdec.h>
#include "para.h"
#include "mp4.h"
#include "error.h"
#include "portable_io.h"
#include "afh.h"
#include "string.h"
#include "fd.h"

Variables

const struct audio_format_handler aac_afh
 The audio format handler for the Advanced Audio Codec. More...
 

Detailed Description

para_server's aac audio format handler.

Variable Documentation

◆ aac_afh

const struct audio_format_handler aac_afh
Initial value:
= {
.get_file_info = aac_get_file_info,
.suffixes = aac_suffixes,
.rewrite_tags = aac_afh_rewrite_tags,
.open = aac_afh_open,
.get_chunk = aac_afh_get_chunk,
.close = aac_afh_close,
}

The audio format handler for the Advanced Audio Codec.

This is only compiled in if the faad library is installed.

RINGBUFFER_SIZE
#define RINGBUFFER_SIZE
How many lines of output to remember.
Definition: gui.c:46
stdout_task::fd_flags
int fd_flags
The descriptor flags of STDOUT at startup.
Definition: stdout.h:16
row_belongs_to_score_table
bool row_belongs_to_score_table(const struct osl_row *aft_row)
Find out whether an audio file is contained in the score table.
Definition: score.c:266
score_get_best
int score_get_best(struct osl_row **aft_row, long *score)
Get the admissible audio file with highest score.
Definition: score.c:223
para_isspace
#define para_isspace(c)
Wrapper for isspace.
Definition: para.h:173
mixer::close
void(* close)(struct mixer_handle **handle)
Free all resources associated with the given handle.
Definition: mix.h:35
print_filter_list
void print_filter_list(void)
Print a short summary of all available filters to stdout.
Definition: filter_common.c:158
MAX_STAT_CLIENTS
#define MAX_STAT_CLIENTS
The maximal number of simultaneous connections.
Definition: audiod_command.c:36
OPT_GIVEN
#define OPT_GIVEN(_name)
Definition: gui.c:33
init_vlc
void init_vlc(struct vlc *vlc, int nb_bits, int nb_codes, const void *bits, const void *codes, int codes_size)
Build VLC decoding tables suitable for use with get_vlc().
Definition: bitstream.c:140
daemon_set_logfile
void daemon_set_logfile(const char *logfile_name)
Init or change the name of the log file.
Definition: daemon.c:129
apc_priv_decrypt
int apc_priv_decrypt(const char *key_file, unsigned char *outbuf, unsigned char *inbuf, int inlen)
Decrypt a buffer using a private key.
Definition: gcrypt.c:489
audio_file_data::afhi
struct afh_info afhi
Vss needs this for streaming.
Definition: afh.h:62
dispatch_local_connection
int dispatch_local_connection(int accept_fd)
Handle arriving connections on the local socket.
Definition: audiod_command.c:388
afh_get_header
void afh_get_header(struct afh_info *afhi, uint8_t audio_format_id, void *map, size_t mapsize, char **buf, size_t *len)
Get the header of an audio file.
Definition: afh_common.c:349
mp_shutdown
void mp_shutdown(struct mp_context *ctx)
Deallocate the resources of a mood parser.
Definition: mp.c:586
BTRN_MAX_PENDING
#define BTRN_MAX_PENDING
640K ought to be enough for everybody ;)
Definition: buffer_tree.c:1174
filter_node::filter_num
unsigned filter_num
The number in the array of available filters.
Definition: filter.h:10
CL_SENT_AUTH
@ CL_SENT_AUTH
Client sends the authentication request.
Definition: client.h:12
OPT_UINT32_VAL
#define OPT_UINT32_VAL(_name, _lpr)
Definition: recv.c:29
generic_com_deny
void generic_com_deny(struct sender_command_data *scd, struct sender_status *ss)
Deny connections from the given range of IP addresses.
Definition: send_common.c:265
COLOR_STATUSBAR
@ COLOR_STATUSBAR
Definition: gui.c:74
sched_request_barrier
int sched_request_barrier(struct timeval *barrier, struct sched *s)
Bound the I/O timeout by an absolute time in the future.
Definition: sched.c:409
btr_remove_node
void btr_remove_node(struct btr_node **btrnp)
Remove a node from a buffer tree.
Definition: buffer_tree.c:787
EXEC_IDLE
@ EXEC_IDLE
No process running.
Definition: gui.c:62
client_close
void client_close(struct client_task *ct)
Close the connection to para_server and free all resources.
Definition: client_common.c:39
check_wav_init
struct check_wav_context * check_wav_init(struct btr_node *parent, struct btr_node *child, struct wav_params *params, struct btr_node **cw_btrn)
Allocate and set up a new check_wav instance.
Definition: check_wav.c:206
FILTER_CMD_OPT_RESULT
#define FILTER_CMD_OPT_RESULT(_cmd, _opt, _lpr)
Definition: filter.h:106
acl_add_entry
void acl_add_entry(struct list_head *acl, char *addr, int netmask)
Add an entry to an access control list.
Definition: acl.c:82
para_atoi32
int para_atoi32(const char *str, int32_t *value)
Convert a string to a 32-bit signed integer value.
Definition: string.c:604
mp_shutdown
void mp_shutdown(struct mp_context *ctx)
Deallocate the resources of a mood parser.
Definition: mp.c:586
signal_task::task
struct task * task
The associated task structure.
Definition: signal.h:12
pass_buffer_as_shm
int pass_buffer_as_shm(int fd, uint8_t band, const char *buf, size_t size)
Send data as shared memory to a file descriptor.
Definition: afs.c:688
AFTCOL_AFSI
@ AFTCOL_AFSI
The audio file selector info.
Definition: upgrade_db.c:120
btr_context
void * btr_context(struct btr_node *btrn)
Obtain the context of a buffer node tree.
Definition: buffer_tree.c:936
create_argv
int create_argv(const char *buf, const char *delim, char ***result)
Split a buffer into words.
Definition: string.c:800
NUM_SENDER_CMDS
@ NUM_SENDER_CMDS
Used as array size in struct sender.
Definition: send.h:28
sender_status::listen_addresses
char ** listen_addresses
Derived from –http-listen-address and –dccp-listen-address.
Definition: send.h:173
lsg_write_cmd_com_oss_user_data
const struct writer lsg_write_cmd_com_oss_user_data
Definition: oss_write.c:247
cq_enqueue
int cq_enqueue(struct chunk_queue *cq, const char *buf, size_t num_bytes)
Add a chunk to the given queue.
Definition: chunk_queue.c:49
gui_theme::top_lines_min
int top_lines_min
Minimal admissible number of lines to display the top window.
Definition: gui.h:38
OPT_STRING_VAL
#define OPT_STRING_VAL(_name)
Definition: play.c:38
task_reap
int task_reap(struct task **tptr)
Obtain the error status of a task and deallocate its resources.
Definition: sched.c:169
afs_socket_cookie
uint32_t afs_socket_cookie
A random number used to "authenticate" the afs connection.
Definition: server.c:74
ATS_TRACK_CHANGE
@ ATS_TRACK_CHANGE
A trak atom was seen after the mp4a atom.
Definition: mp4.c:35
score_ops
const struct afs_table_operations score_ops
The score table stores (aft row, score) pairs in memory.
Definition: score.c:326
decoder_execute
int decoder_execute(const char *cmd, unsigned sample_rate, unsigned channels, char **result)
Execute a btr command for a decoder.
Definition: filter_common.c:209
HTTP_OK_MSG
#define HTTP_OK_MSG
sent by the http sender to the client
Definition: http.h:4
stream_cipher_context
Used for client-server communication encryption.
Definition: crypt.h:109
close_stat_clients
void close_stat_clients(void)
Empty the status clients list.
Definition: audiod_command.c:128
coef_vlc_table::huffcodes
const uint32_t * huffcodes
VLC bit values.
Definition: wmadata.h:29
generic_filter_pre_monitor
void generic_filter_pre_monitor(struct sched *s, void *context)
Request a minimal timeout if not idle.
Definition: filter_common.c:181
coef_vlc_table::huffbits
const uint8_t * huffbits
VLC bit size.
Definition: wmadata.h:31
spx_header_info
Information extracted from the first ogg packet.
Definition: spx.h:13
DCCP_SOCKOPT_AVAILABLE_CCIDS
#define DCCP_SOCKOPT_AVAILABLE_CCIDS
List of supported CCIDs.
Definition: net.c:840
OPT_GIVEN
#define OPT_GIVEN(_name, _lpr)
Definition: recv.c:28
afs.h
Exported symbols of the audio file selector.
daemonize
int daemonize(bool parent_waits)
Do the usual stuff to become a daemon.
Definition: daemon.c:227
apc_pub_encrypt
int apc_pub_encrypt(struct asymmetric_key *pub, unsigned char *inbuf, unsigned len, unsigned char *outbuf)
Encrypt a buffer using asymmetric keys.
Definition: gcrypt.c:556
generic_com_on
void generic_com_on(struct sender_status *ss, unsigned protocol)
Activate a paraslash sender.
Definition: send_common.c:282
schedule
int schedule(struct sched *s)
The core function of all paraslash programs.
Definition: sched.c:126
sideband.h
exported symbols from sideband.c
lsg_filter_cmd_com_sync_user_data
const struct filter lsg_filter_cmd_com_sync_user_data
Definition: sync_filter.c:377
shm_destroy
int shm_destroy(int id)
Destroy the given shared memory area.
Definition: ipc.c:132
RECEIVER_CMD
#define RECEIVER_CMD(_a)
Definition: audiod.c:94
oac_custom_header_new
__malloc struct oac_custom_header * oac_custom_header_new(void)
Allocate and return a custom header structure.
Definition: ogg_afh_common.c:368
lsg_write_cmd_com_alsa_user_data
struct writer lsg_write_cmd_com_alsa_user_data
Definition: alsa_write.c:350
UNROLL
#define UNROLL
How often the loop is unrolled.
Definition: fec.c:174
writer::pre_monitor
void(* pre_monitor)(struct sched *s, void *context)
Ask the scheduler to check whether data can be written.
Definition: write.h:37
daemon_set_log_color_or_die
void daemon_set_log_color_or_die(const char *arg)
Set the color for log messages of the given severity level.
Definition: daemon.c:65
CWS_NO_HEADER
@ CWS_NO_HEADER
First part of the stream did not look like a wav header.
Definition: check_wav.c:26
afs_info::lyrics_id
uint32_t lyrics_id
Lyrics blob associated with this file (foreign key).
Definition: afs.h:16
apc_pub_encrypt
int apc_pub_encrypt(struct asymmetric_key *pub, unsigned char *inbuf, unsigned len, unsigned char *outbuf)
Encrypt a buffer using asymmetric keys.
Definition: openssl.c:348
i9e_complete_commands
char ** i9e_complete_commands(const char *word, struct i9e_completer *completers)
Return the list of partially matching words.
Definition: interactive.c:669
lsg_filter_cmd_com_wmadec_user_data
const struct filter lsg_filter_cmd_com_wmadec_user_data
Definition: wmadec_filter.c:1227
PM_REVERSE_LOOP
@ PM_REVERSE_LOOP
Loop in reverse order.
Definition: afs.h:121
apc_free_pubkey
void apc_free_pubkey(struct asymmetric_key *key)
Deallocate a public key.
Definition: gcrypt.c:471
RSA_PRIVKEY_SEXP
#define RSA_PRIVKEY_SEXP
S-expression for a private RSA key.
Definition: gcrypt.c:111
xwrite
int xwrite(int fd, const char *buf, size_t len)
Write a buffer to a file descriptor, re-writing on short writes.
Definition: fd.c:123
mp4_get_sample_size
int mp4_get_sample_size(const struct mp4 *f, uint32_t sample, uint32_t *result)
Look up and return the size of the given sample in the stsz table.
Definition: mp4.c:769
lsg_recv_cmd_com_dccp_user_data
const struct receiver lsg_recv_cmd_com_dccp_user_data
Definition: dccp_recv.c:161
CMD_PTR
#define CMD_PTR
Definition: audiod.c:42
i9e_print_status_bar
void i9e_print_status_bar(char *buf, unsigned len)
Print the current status to stderr.
Definition: interactive.c:550
acl_allow
void acl_allow(char *addr, int netmask, struct list_head *acl, int default_deny)
Permit access for a range of IP addresses.
Definition: acl.c:170
para_sigaction
void para_sigaction(int sig, void(*handler)(int))
Install the given handler for the given signal.
Definition: signal.c:129
afs_info::last_played
uint64_t last_played
Seconds since the epoch.
Definition: afs.h:8
signal_task
Task for signal handling.
Definition: signal.h:8
filter.h
Filter-related structures and exported symbols from filter_common.c.
task_notify
void task_notify(struct task *t, int err)
Set the notification value of a task.
Definition: sched.c:291
para_accept
int para_accept(int fd, void *addr, socklen_t size, int *new_fd)
Wrapper around the accept system call.
Definition: net.c:822
MIN_CONSEC_GOOD_FRAMES
#define MIN_CONSEC_GOOD_FRAMES
Definition: mp3_afh.c:27
client_task::sbc
struct sb_context * sbc[2]
The sideband contexts for receiving/sending.
Definition: client.h:32
btr_pool_new
struct btr_pool * btr_pool_new(const char *name, size_t area_size)
Create a new buffer pool.
Definition: buffer_tree.c:70
btr_pool_free
void btr_pool_free(struct btr_pool *btrp)
Deallocate resources used by a buffer pool.
Definition: buffer_tree.c:89
afh_info::chunk_table
uint32_t * chunk_table
The table that specifies the offset of the individual pieces in the current audio file.
Definition: afh.h:38
ATTRIBUTE_ADD
@ ATTRIBUTE_ADD
An attribute was added.
Definition: afs.h:33
btr_pool_get_buffer
size_t btr_pool_get_buffer(struct btr_pool *btrp, char **result)
Obtain the current write head.
Definition: buffer_tree.c:159
wma_log2
__a_const int wma_log2(unsigned int v)
Compute the base-2 logarithm.
Definition: wma_common.c:166
ATOM_MINF
@ ATOM_MINF
Definition: mp4.c:161
mood_loop
int mood_loop(struct mood_instance *m, osl_rbtree_loop_func *func, void *data)
Iterate over the admissible files of a mood instance.
Definition: mood.c:689
AFSI_ATTRIBUTES_OFFSET
@ AFSI_ATTRIBUTES_OFFSET
Storage position of the attributes bitmap.
Definition: aft.c:134
generic_com_deny
void generic_com_deny(struct sender_command_data *scd, struct sender_status *ss)
Deny connections from the given range of IP addresses.
Definition: send_common.c:265
init_vlc
void init_vlc(struct vlc *vlc, int nb_bits, int nb_codes, const void *bits, const void *codes, int codes_size)
Build VLC decoding tables suitable for use with get_vlc().
Definition: bitstream.c:140
NUM_AFS_TABLES
#define NUM_AFS_TABLES
Used to loop over the afs tables.
Definition: afs.c:56
audiod.h
Symbols exported from audiod.c.
ATOM_TRAK
@ ATOM_TRAK
Definition: mp4.c:161
line_handler_t
int line_handler_t(char *, void *)
Used for for_each_line().
Definition: string.h:46
FOR_EACH_BUFFER_REF_SAFE
#define FOR_EACH_BUFFER_REF_SAFE(_br, _tmp, _btrn)
Definition: buffer_tree.c:249
asf_header_info::flags1
uint32_t flags1
Further decoding information (ignored).
Definition: wma.h:22
mp_eval_row
bool mp_eval_row(const struct osl_row *aft_row, struct mp_context *ctx)
Determine whether the given audio file is admissible.
Definition: mp.c:562
para_munmap
int para_munmap(void *start, size_t length)
A wrapper for munmap(2).
Definition: fd.c:496
gui_theme::author
const char * author
Also printed at startup.
Definition: gui.h:30
para_hostname
__malloc char * para_hostname(void)
Get the own hostname.
Definition: string.c:346
mp.h
Internal mood parser API (backend).
OPT_STRING_VAL
#define OPT_STRING_VAL(_name)
Definition: audiod.c:45
vss_stopped
unsigned int vss_stopped(void)
Check if the vss is currently stopped.
Definition: vss.c:793
UNIX_PATH_MAX
#define UNIX_PATH_MAX
The buffer size of the sun_path component of struct sockaddr_un.
Definition: net.c:884
task_info::pre_monitor
void(* pre_monitor)(struct sched *s, void *context)
Configure watch fds and impose an upper bound on the I/O timeout.
Definition: sched.h:56
asf_header_info::bit_rate
uint32_t bit_rate
Bits per second.
Definition: wma.h:20
misc_meta_data::num_played
unsigned int num_played
The number of audio files already sent.
Definition: server.h:65
FLACDEC_MAX_OUTPUT_SIZE
#define FLACDEC_MAX_OUTPUT_SIZE
Definition: flacdec_filter.c:201
mp_ast_node::sv
union mp_semantic_value sv
Leaf nodes only.
Definition: mp.h:77
check_private_key_file
int check_private_key_file(const char *file)
Check existence and permissions of a private key file.
Definition: crypt_common.c:127
fec_client_parms::init_fec
int(* init_fec)(struct sender_client *sc)
Transport-layer initialisation for FEC support.
Definition: send.h:163
id3_field_finish
void id3_field_finish(union id3_field *field)
ringbuffer.h
Exported symbols from ringbuffer.c.
asf_header_info::flags2
uint16_t flags2
Encodes exp_vlc, bit reservoir, vbl, number of block sizes.
Definition: wma.h:24
sender_command_data::data_slices_per_group
uint8_t data_slices_per_group
Number of slices minus number of redundant slices.
Definition: server.h:25
NUM_BLOB_COLUMNS
@ NUM_BLOB_COLUMNS
A blob table has that many columns.
Definition: afs.h:318
AFHI_CHANGE
@ AFHI_CHANGE
The afh info struct of an audio file changed.
Definition: afs.h:41
i9e_close
void i9e_close(void)
Reset the terminal and save the in-memory command line history.
Definition: interactive.c:224
imdct_end
void imdct_end(struct mdct_context *s)
Deallocate imdct resources.
Definition: imdct.c:399
FOR_EACH_BUDDY
#define FOR_EACH_BUDDY(_buddy, _list)
Definition: sync_filter.c:49
OPT_RESULT
#define OPT_RESULT(_name)
Definition: filter.c:28
WAV_HEADER_LEN
#define WAV_HEADER_LEN
Length of a standard wav header.
Definition: check_wav.c:17
pattern_match_data::num_matches
unsigned num_matches
Gets increased by one for each match.
Definition: afs.h:147
afh_free_header
void afh_free_header(char *header_buf, uint8_t audio_format_id)
Deallocate any resources obtained from afh_get_header().
Definition: afh_common.c:373
acl_allow
void acl_allow(char *addr, int mask, struct list_head *acl, int default_deny)
Permit access for a range of IP addresses.
Definition: acl.c:170
list_head::prev
struct list_head * prev
Pointer to the previous list entry.
Definition: list.h:21
xpoll
int xpoll(struct pollfd *fds, nfds_t nfds, int timeout)
Simple wrapper for poll(2).
Definition: fd.c:519
btr_no_parent
bool btr_no_parent(struct btr_node *btrn)
Find out whether a node is an orphan.
Definition: buffer_tree.c:554
aft_check_callback
int aft_check_callback(struct afs_callback_arg *aca)
Check the audio file table for inconsistencies.
Definition: aft.c:2523
filter_node::conf
void * conf
A pointer to the configuration of this instance.
Definition: filter.h:19
shm_detach
int shm_detach(void *addr)
Detach a shared memory segment.
Definition: ipc.c:189
para_next_signal
int para_next_signal(void)
Return the number of the next pending signal.
Definition: signal.c:212
COLOR_ERRMSG
@ COLOR_ERRMSG
Definition: gui.c:78
para.h
global paraslash definitions
para_unblock_signal
void para_unblock_signal(int sig)
Unblock a signal.
Definition: signal.c:195
callback_result_handler
int callback_result_handler(struct osl_object *result, uint8_t band, void *private)
Dispatch the output of an afs callback.
Definition: afs.h:192
para_buffer::private_data
void * private_data
Passed to max_size_handler().
Definition: string.h:30
OPT_STRING_VAL
#define OPT_STRING_VAL(_name, _lpr)
Definition: upgrade_db.c:22
user_list_lookup
const struct user * user_list_lookup(const char *name)
Lookup a user in the user list.
Definition: user_list.c:152
para_exec_cmdline_pid
int para_exec_cmdline_pid(pid_t *pid, const char *cmdline, int *fds)
Exec the given command.
Definition: exec.c:133
PRIVATE_OPENSSH_KEY_FOOTER
#define PRIVATE_OPENSSH_KEY_FOOTER
Private OPENSSH keys (RFC4716) end with this footer.
Definition: crypt_common.c:265
freep
void freep(void *arg)
Free the content of a pointer and set it to NULL.
Definition: string.c:258
moods_event_handler
int moods_event_handler(enum afs_events event, __a_unused struct para_buffer *pb, void *data)
Notification callback for the moods table.
Definition: mood.c:739
para_strdup
__must_check __malloc char * para_strdup(const char *s)
Paraslash's version of strdup().
Definition: string.c:154
daemon_set_priority
void daemon_set_priority(int prio)
Renice the calling process.
Definition: daemon.c:328
decode_private_key
int decode_private_key(const char *key_file, unsigned char **result, size_t *blob_size)
Decode an openssh-v1 (aka RFC4716) or PEM (aka ASN.1) private key.
Definition: crypt_common.c:280
audiod_status_dump
void audiod_status_dump(bool force)
Send the current audiod status to all connected stat clients.
Definition: audiod_command.c:447
writer
Describes a data sink for audio streams.
Definition: write.h:35
playlists_event_handler
int playlists_event_handler(enum afs_events event, __a_unused struct para_buffer *pb, void *data)
Handle afs events relevant to playlists.
Definition: playlist.c:263
task_info::context
void * context
This pointer is saved when the task is registered.
Definition: sched.h:73
i9e_client_info::loglevel
int loglevel
Threshold for i9e_log().
Definition: interactive.h:55
BITS
#define BITS
Always write 16 bit header.
Definition: wav_filter.c:19
check_wav_state
check_wav_state
The possible states of a check_wav instance.
Definition: check_wav.c:20
print_filter_helps
void print_filter_helps(bool detailed)
Print help text of each filter to stdout.
Definition: filter_common.c:121
apc_get_pubkey
int apc_get_pubkey(const char *key_file, struct asymmetric_key **result)
Read an asymmetric key from a file.
Definition: openssl.c:278
del_close_on_fork_list
void del_close_on_fork_list(int fd)
Delete one file descriptor from the close-on-fork list.
Definition: close_on_fork.c:51
CLIENT_BUFSIZE
#define CLIENT_BUFSIZE
The size of the receiving buffer.
Definition: client_common.c:30
ATOM_ALBUM
@ ATOM_ALBUM
Definition: mp4.c:161
daemon_set_loglevel
void daemon_set_loglevel(int loglevel)
Control the verbosity for logging.
Definition: daemon.c:150
score_table_columns
score_table_columns
The score table consists of two columns: The aft_row column contains pointers to the rows of the audi...
Definition: score.c:46
sc_new
struct stream_cipher * sc_new(const unsigned char *data, int len)
Allocate and initialize an aes_ctr128 stream cipher structure.
Definition: gcrypt.c:620
NUM_MAPPED_KEYS
#define NUM_MAPPED_KEYS
Definition: play.c:535
parse_fec_url
int parse_fec_url(const char *arg, struct sender_command_data *scd)
Parse a FEC URL string.
Definition: send_common.c:491
generic_acl_deplete
void generic_acl_deplete(struct list_head *acl)
Empty the access control list of a sender.
Definition: send_common.c:248
SENDER_on
@ SENDER_on
Activate the sender.
Definition: send.h:27
mixer::set
int(* set)(struct mixer_handle *handle, int val)
Change the value of the selected channel.
Definition: mix.h:33
para_atoi64
int para_atoi64(const char *str, int64_t *value)
llong_minmax
Definition: string.c:567
FOR_EACH_STATUS_ITEM
#define FOR_EACH_STATUS_ITEM(i)
Loop over each status item.
Definition: para.h:277
send_cred_buffer
ssize_t send_cred_buffer(int, char *)
Send a buffer and the credentials of the current process to a socket.
Definition: net.c:1030
RECV_CMD_OPT_GIVEN
#define RECV_CMD_OPT_GIVEN(_recv, _opt, _lpr)
Definition: recv.h:85
filter::open
void(* open)(struct filter_node *fn)
Open one instance of this filter.
Definition: filter.h:53
afs_event
__must_check int afs_event(enum afs_events event, struct para_buffer *pb, void *data)
The afs event dispatcher.
Definition: afs.c:1133
para_homedir
__must_check __malloc char * para_homedir(void)
Get the home directory of the calling user.
Definition: string.c:319
server_get_tasks
char * server_get_tasks(void)
Return the list of tasks for the server process.
Definition: server.c:129
free_lpr
void free_lpr(void)
Deallocate all lopsub parse results.
Definition: server.c:644
skip_cells
int skip_cells(const char *s, size_t cells_to_skip, size_t *bytes_to_skip)
Skip a given number of cells at the beginning of a string.
Definition: string.c:956
i9e_client_info::prompt
char * prompt
Text of the current prompt.
Definition: interactive.h:65
crypt_init
void crypt_init(void)
Initialize the crypto backend.
Definition: gcrypt.c:75
BLOB_REMOVE
@ BLOB_REMOVE
A blob is about to be removed.
Definition: afs.h:53
CL_RECEIVED_PROCEED
@ CL_RECEIVED_PROCEED
Server accepts this authentication.
Definition: client.h:18
guess_audio_format
int guess_audio_format(const char *name)
Guess the audio format judging from filename.
Definition: afh_common.c:103
btr_pool_size
size_t btr_pool_size(struct btr_pool *btrp)
Return the size of the buffer pool area.
Definition: buffer_tree.c:106
vlc::table_allocated
int table_allocated
Amount of memory allocated so far.
Definition: bitstream.h:30
TAG_LEN
#define TAG_LEN(_len)
Total length of an on-disk metadata tag.
Definition: mp4.c:871
GM_SLOPPY
@ GM_SLOPPY
Ignore the data and do not write.
Definition: grab_client.c:26
afs_info::image_id
uint32_t image_id
Image blob associated with this file (foreign key).
Definition: afs.h:14
btr_inplace_ok
bool btr_inplace_ok(struct btr_node *btrn)
Find out whether it is OK to change an input buffer.
Definition: buffer_tree.c:577
mood_load
int mood_load(const char *mood_name, struct mood_instance **result, char **msg)
Populate a score table with admissible files for the given mood.
Definition: mood.c:623
EXEC_XCMD
@ EXEC_XCMD
External process running.
Definition: gui.c:64
FOR_EACH_FECDEC_GROUP
#define FOR_EACH_FECDEC_GROUP(g, d)
Iterate over all fecdec groups.
Definition: fecdec_filter.c:83
send_queued_chunks
int send_queued_chunks(int fd, struct chunk_queue *cq)
Try to empty the chunk queue for this fd.
Definition: send_common.c:83
vss_del_fec_client
void vss_del_fec_client(struct fec_client *fc)
Remove one entry from the list of active fec clients.
Definition: vss.c:687
osl
_static_inline_ int osl(int ret)
Wrapper for osl library calls.
Definition: error.h:320
i9e_client_info::fds
int fds[3]
File descriptors to use for input/output/log.
Definition: interactive.h:63
DF_COLOR_LOG
@ DF_COLOR_LOG
Use colored output.
Definition: daemon.h:34
para_hostname
__malloc char * para_hostname(void)
Get the own hostname.
Definition: string.c:346
AUDIOD_AUDIO_FORMATS_ENUM
@ AUDIOD_AUDIO_FORMATS_ENUM
Definition: audiod.h:7
get_btr_sample_rate
int get_btr_sample_rate(struct btr_node *btrn, int32_t *result)
Ask parent btr nodes for the sample rate of the current stream.
Definition: write_common.c:205
stdout_task::task
struct task * task
The task structure used by the scheduler.
Definition: stdout.h:12
afs_cb_result_handler
int afs_cb_result_handler(struct osl_object *result, uint8_t band, void *private)
Result handler for sending data to the para_client process.
Definition: afs.c:490
ms2tv
void ms2tv(long unsigned n, struct timeval *tv)
Convert milliseconds to a struct timeval.
Definition: time.c:24
ATOM_UDTA
@ ATOM_UDTA
Definition: mp4.c:161
btr_node_description::child
struct btr_node * child
Child of the new node.
Definition: buffer_tree.h:162
DEFINE_STDERR_LOGGER
#define DEFINE_STDERR_LOGGER(funcname, loglevel_barrier)
Define a standard log function that always writes to stderr.
Definition: para.h:59
i9e_ll_completer
void i9e_ll_completer(struct i9e_completion_info *ci, struct i9e_completion_result *cr)
Complete on severity strings.
Definition: interactive.c:808
CMD_PTR
#define CMD_PTR
Definition: play.c:33
SCORECOL_SCORE
@ SCORECOL_SCORE
The score.
Definition: score.c:50
playlist_unload
void playlist_unload(struct playlist_instance *pi)
Free all resources of the given/current playlist.
Definition: playlist.c:117
playlist_load
int playlist_load(const char *name, struct playlist_instance **result, char **msg)
Populate the score table from the paths of a playlist database object.
Definition: playlist.c:149
xwritev
int xwritev(int fd, struct iovec *iov, int iovcnt)
Write an array of buffers, handling non-fatal errors.
Definition: fd.c:64
CLIENT_OPT_UINT32_VAL
#define CLIENT_OPT_UINT32_VAL(_name, _lpr)
Definition: client.h:54
mp_duration
int64_t mp_duration(struct mp_context *ctx)
Return the duration of the audio file from the afh info structure.
Definition: mp.c:402
misc_meta_data::repos_request
long unsigned repos_request
Set by the jmp/ff commands to the new position in chunks.
Definition: server.h:50
VSS_NEXT
#define VSS_NEXT
Skip remaining part of current audio file.
Definition: vss.h:17
afs_error
__printf_2_3 void afs_error(const struct afs_callback_arg *aca, const char *fmt,...)
Format and send an error message to the command handler.
Definition: afs.c:739
generic_sender_help
__malloc char * generic_sender_help(void)
Get the generic help text.
Definition: send_common.c:416
opus_header::gain
uint16_t gain
In dB, should be zero whenever possible.
Definition: opus_common.h:19
OPT_UINT32_VAL
#define OPT_UINT32_VAL(_name)
Definition: afh.c:25
strwidth
__must_check int strwidth(const char *s, size_t *result)
Compute the width of an UTF-8 string.
Definition: string.c:1001
compute_afhi
int compute_afhi(const char *path, char *data, size_t size, int fd, struct afh_info *afhi)
Call get_file_info() to obtain an afhi structure.
Definition: afh_common.c:160
daemon_open_log_or_die
void daemon_open_log_or_die(void)
Open the logfile in append mode.
Definition: daemon.c:289
for_each_stat_item
int for_each_stat_item(char *item_buf, size_t num_bytes, int(*item_handler)(int, char *))
Call a function for each complete status item of a buffer.
Definition: stat.c:31
list_entry
#define list_entry(ptr, type, member)
Get the struct in which this entry is embedded in.
Definition: list.h:125
btr_new_node
struct btr_node * btr_new_node(struct btr_node_description *bnd)
Create a new buffer tree node.
Definition: buffer_tree.c:263
para_atoi64
int para_atoi64(const char *str, int64_t *result)
llong_minmax
Definition: string.c:567
fftsample_t
float fftsample_t
Definition: imdct.c:26
NUM_LINES
#define NUM_LINES(len)
Number of lines of the window are occupied by an output line.
Definition: gui.c:186
para_listen
int para_listen(unsigned l4type, const char *addr, uint16_t port)
Create a passive / listening socket.
Definition: net.c:542
sockaddr_equal
bool sockaddr_equal(const struct sockaddr *sa1, const struct sockaddr *sa2)
Compare the address part of IPv4/6 addresses.
Definition: net.c:738
clear_and_dump_items
void clear_and_dump_items(void)
Flush and send all status items.
Definition: audiod_command.c:496
NUM_FEC_GROUPS
#define NUM_FEC_GROUPS
How many FEC groups to store in memory.
Definition: fecdec_filter.c:25
fec_decode
int fec_decode(struct fec_parms *parms, unsigned char **data, int *idx, int sz)
Decode one slice from the group of received slices.
Definition: fec.c:597
user
data needed to authenticate the user
Definition: user_list.h:24
mutex_unlock
void mutex_unlock(int id)
Unlock a mutex.
Definition: ipc.c:94
AFTCOL_AFSI
@ AFTCOL_AFSI
The audio file selector info.
Definition: aft.c:207
para_logname
__must_check __malloc char * para_logname(void)
Get the logname of the current user.
Definition: string.c:304
MAXLINE
#define MAXLINE
used in various contexts
Definition: para.h:28
attr_ops
const struct afs_table_operations attr_ops
The attribute table stores name/bitnum pairs.
Definition: attribute.c:494
stdin_task_register
void stdin_task_register(struct stdin_task *sit, struct sched *s)
Register a stdin task structure.
Definition: stdin.c:88
misc_meta_data::afs_mode_string
char afs_mode_string[MAXLINE]
This gets updated by afs and contains its current mode.
Definition: server.h:73
getbit_context
Structure for bistream I/O.
Definition: bitstream.h:12
free_vlc
void free_vlc(struct vlc *vlc)
Deallocate all resources of a VLC table.
Definition: bitstream.c:159
mp_yyscan_t
void * mp_yyscan_t
Since we use a reentrant lexer, all functions generated by flex(1) receive an additional argument of ...
Definition: mp.h:18
SENDER_off
@ SENDER_off
Deactivate the sender.
Definition: send.h:27
send_lls_callback_request
int send_lls_callback_request(afs_callback *f, const struct lls_command *const cmd, struct lls_parse_result *lpr, void *private_result_data)
Wrapper for send_callback_request() which passes a lopsub parse result.
Definition: afs.c:264
para_strcat
__must_check __malloc char * para_strcat(char *a, const char *b)
Paraslash's version of strcat().
Definition: string.c:282
write_all
int write_all(int fd, const char *buf, size_t len)
Write to a file descriptor, fail on short writes.
Definition: fd.c:142
main
int main(int argc, char *argv[])
Definition: upgrade_db.c:345
dispatch_local_connection
int dispatch_local_connection(int accept_fd)
Handle arriving connections on the local socket.
Definition: audiod_command.c:388
mp4_open
int mp4_open(const struct mp4_callback *cb, struct mp4 **result)
Read the audio track and the metadata of an mp4 file.
Definition: mp4.c:662
sched::pfd_array_len
unsigned pfd_array_len
Number of elements in the above array, passed to poll(2).
Definition: sched.h:25
send_strerror
int send_strerror(struct command_context *cc, int err)
Send an error message to a client.
Definition: command.c:198
audiod_get_decoder_flags
__malloc char * audiod_get_decoder_flags(void)
Return the flags for the decoder_flags status item.
Definition: audiod.c:220
i9e_completion_info::word_num
int word_num
The cursor is on this word.
Definition: interactive.h:14
afs_init
__noreturn void afs_init(int socket_fd)
Initialize the audio file selector process.
Definition: afs.c:926
pattern_match_data::data
void * data
Data pointer passed to the action function.
Definition: afs.h:145
mark_fd_blocking
__must_check int mark_fd_blocking(int fd)
Set a file descriptor to blocking mode.
Definition: fd.c:308
recv_bin_buffer
int recv_bin_buffer(int fd, char *buf, size_t size)
Receive data from a file descriptor.
Definition: net.c:770
mp_wc_pattern::pat
char * pat
Unescaped C string (without quotes and flags).
Definition: mp.h:34
client_task
Data specific to a client task.
Definition: client.h:26
task_get_notification
int task_get_notification(const struct task *t)
Return the notification value of a task.
Definition: sched.c:311
APC_CHALLENGE_SIZE
#define APC_CHALLENGE_SIZE
The size of the challenge sent to the client.
Definition: crypt.h:12
audio_formats
const char * audio_formats[]
array of audio format names supported by para_audiod
Definition: audiod.c:50
playlist_loop
int playlist_loop(struct playlist_instance *pi, osl_rbtree_loop_func *func, void *data)
Iterate over all admissible audio files of a playlist instance.
Definition: playlist.c:209
mp_ast_node::num_children
uint8_t num_children
The number of children is implicitly given by the id, but we include it here to avoid having to maint...
Definition: mp.h:84
user::name
char * name
The username.
Definition: user_list.h:28
mp_ast_node::children
struct mp_ast_node ** children
Pointers to the child nodes (interior nodes only).
Definition: mp.h:75
OPT_GIVEN
#define OPT_GIVEN(_name)
Definition: filter.c:30
sb_new_send
struct sb_context * sb_new_send(struct sb_buffer *sbb, bool dont_free, sb_transformation t, void *trafo_context)
Prepare to write a sideband packet.
Definition: sideband.c:62
client_task::challenge_hash
unsigned char * challenge_hash
The hash value of the decrypted challenge.
Definition: client.h:36
HGAINVLCBITS
#define HGAINVLCBITS
Definition: wmadec_filter.c:127
mp_num_attributes_set
int64_t mp_num_attributes_set(struct mp_context *ctx)
Count the number of attributes set.
Definition: mp.c:330
RECV_CMD_OPT_UINT32_VAL
#define RECV_CMD_OPT_UINT32_VAL(_recv, _opt, _lpr)
Definition: recv.h:89
para_buffer::offset
size_t offset
The next para_printf() will write at this offset.
Definition: string.h:22
mp_path
char * mp_path(struct mp_context *ctx)
Return the full path to the audio file.
Definition: mp.c:285
EXPVLCBITS
#define EXPVLCBITS
Definition: wmadec_filter.c:126
RECV_CMD_OPT_RESULT
#define RECV_CMD_OPT_RESULT(_recv, _opt, _lpr)
Definition: recv.h:83
oac_get_file_info
int oac_get_file_info(char *map, size_t numbytes, struct afh_info *afhi, struct oac_callback_info *ci)
Pass first three ogg packets to callback and build the chunk table.
Definition: ogg_afh_common.c:121
DEFINE_PARA_ERRLIST
DEFINE_PARA_ERRLIST
Array of error strings.
Definition: mixer.c:19
readv_nonblock
int readv_nonblock(int fd, struct iovec *iov, int iovcnt, size_t *num_bytes)
Read from a non-blocking file descriptor into multiple buffers.
Definition: fd.c:207
color_parse_or_die
void color_parse_or_die(const char *value, char *dst)
Create an escape sequence for colored output.
Definition: color.c:52
btr_copy
void btr_copy(const void *src, size_t n, struct btr_pool *btrp, struct btr_node *btrn)
Copy data to write head of a buffer pool and feed it to all children nodes.
Definition: buffer_tree.c:466
vss_del_fec_client
void vss_del_fec_client(struct fec_client *fc)
Remove one entry from the list of active fec clients.
Definition: vss.c:687
sched
Paraslash's scheduler.
Definition: sched.h:17
gui_color_spec
The foreground and background color of each status item, the decorations and all messages can be cust...
Definition: gui.h:9
afs_events
afs_events
Events caused by changes to an afs table.
Definition: afs.h:31
btr_next_buffer
size_t btr_next_buffer(struct btr_node *btrn, char **bufp)
Obtain the next buffer of the input queue of a buffer tree node.
Definition: buffer_tree.c:687
FOR_EACH_WRITER
#define FOR_EACH_WRITER(i)
Loop over all writers.
Definition: write_common.c:18
stat_item_data::color
struct gui_color_spec color
Foreground and background color.
Definition: gui.h:21
AUDIO_FILE_RENAME
@ AUDIO_FILE_RENAME
An audio file was renamed.
Definition: afs.h:43
PLAY_MODE_MOOD
@ PLAY_MODE_MOOD
Admissible files are determined by a mood definition.
Definition: afs.h:92
version_handle_flag
void version_handle_flag(const char *pfx, bool flag)
Print the version text and exit successfully.
Definition: version.c:63
opus_parse_header
int opus_parse_header(const char *packet, int len, struct opus_header *h)
Get metadata of an opus stream.
Definition: opus_common.c:84
http_sender
const struct sender http_sender
The HTTP sender.
Definition: http_send.c:273
DECODER_SAMPLE_FORMAT
#define DECODER_SAMPLE_FORMAT
Definition: filter_common.c:192
sender
Describes one supported sender of para_server.
Definition: send.h:46
create_shifted_argv
int create_shifted_argv(const char *buf, const char *delim, char ***result)
Split a buffer into words, offset one.
Definition: string.c:819
filter_node::task
struct task * task
The task corresponding to this filter node.
Definition: filter.h:25
string.h
exported symbols from string.c
sb_received
int sb_received(struct sb_context *c, size_t nbytes, struct sb_buffer *result)
Update the sideband context after data has been received.
Definition: sideband.c:213
CMD_PTR
#define CMD_PTR
Definition: audioc.c:32
generic_recv_pre_monitor
int generic_recv_pre_monitor(struct sched *s, struct receiver_node *rn)
Request a minimal timeout in case of buffer tree errors.
Definition: recv_common.c:113
mark_fd_nonblocking
__must_check int mark_fd_nonblocking(int fd)
Set a file descriptor to non-blocking mode.
Definition: fd.c:326
play_mode
play_mode
How audio files are selected by afs.
Definition: afs.h:90
gui_theme::sep_char
char sep_char
The character for the separator line.
Definition: gui.h:32
EXPORT_PLAY_CMD_HANDLER
#define EXPORT_PLAY_CMD_HANDLER(_cmd)
Definition: play.c:704
FEC_GROUP_USABLE
@ FEC_GROUP_USABLE
Use all data in the group.
Definition: fecdec_filter.c:256
makesock_addrinfo
int makesock_addrinfo(unsigned l4type, bool passive, struct addrinfo *ai, struct flowopts *fo)
Create an active or passive socket.
Definition: net.c:449
hash_function
void hash_function(const char *data, unsigned long len, unsigned char *hash)
Compute the hash of the given input data.
Definition: gcrypt.c:33
gui_color_spec::fg
int fg
Foreground color.
Definition: gui.h:10
mixer::get_channels
char *(* get_channels)(struct mixer_handle *handle)
Returns a string of all valid mixer channels.
Definition: mix.h:26
DF_LOG_TIME
@ DF_LOG_TIME
Prepend log message with date and time.
Definition: daemon.h:30
btr_splice_out_node
void btr_splice_out_node(struct btr_node **btrnp)
Remove a node from the buffer tree, reconnecting parent and children.
Definition: buffer_tree.c:847
sc_new
struct stream_cipher * sc_new(const unsigned char *data, int len)
Allocate and initialize an aes_ctr128 stream cipher structure.
Definition: gcrypt.c:620
read_size_header
int read_size_header(const char *buf)
Read a four-byte hex-number and return its value.
Definition: string.c:451
filter_name
const char * filter_name(int filter_num)
Return the name of a filter, given its number.
Definition: filter_common.c:52
opus_afh
const struct audio_format_handler opus_afh
The audio format handler for ogg/opus.
Definition: opus_afh.c:300
print_filter_list
void print_filter_list(void)
Print a short summary of all available filters to stdout.
Definition: filter_common.c:158
coef_vlc_table
Contains huffcodes, huffbits and run/level tables.
Definition: wmadata.h:25
compute_word_num
int compute_word_num(const char *buf, const char *delim, int offset)
Get the number of the word the cursor is on.
Definition: string.c:723
apc_free_pubkey
void apc_free_pubkey(struct asymmetric_key *key)
Deallocate a public key.
Definition: gcrypt.c:471
schedule
int schedule(struct sched *s)
The core function of all paraslash programs.
Definition: sched.c:126
INTERNAL_KEYMAP_ENTRIES
#define INTERNAL_KEYMAP_ENTRIES
Definition: play.c:503
btr_node_status
int btr_node_status(struct btr_node *btrn, size_t min_iqs, enum btr_node_type type)
Return the current state of a buffer tree node.
Definition: buffer_tree.c:1202
para_mkdir
int para_mkdir(const char *path)
Create a directory, don't fail if it already exists.
Definition: fd.c:401
tv_convex_combination
int tv_convex_combination(const long a, const struct timeval *tv1, const long b, const struct timeval *tv2, struct timeval *result)
Compute a convex combination of two time values.
Definition: time.c:130
stat_item_data::y
unsigned y
Vertical start coordinate for this item.
Definition: gui.h:19
asf_header_info::use_variable_block_len
bool use_variable_block_len
Whether blocks are of variable or of constant size.
Definition: wma.h:30
vss_shutdown
void vss_shutdown(void)
Turn off the virtual streaming system.
Definition: vss.c:1203
LS_SORT_BY_IMAGE_ID
@ LS_SORT_BY_IMAGE_ID
-s=i
Definition: aft.c:60
FEC_EOF_PACKET_LEN
#define FEC_EOF_PACKET_LEN
The number of bytes of the FEC_EOF_PACKET.
Definition: para.h:179
add_close_on_fork_list
void add_close_on_fork_list(int fd)
Add one file descriptor to the close-on-fork list.
Definition: close_on_fork.c:32
cq_get
int cq_get(struct queued_chunk *qc, const char **buf, size_t *num_bytes)
Get a pointer to the given queued chunk.
Definition: chunk_queue.c:117
lsu_merge_config_file_options
int lsu_merge_config_file_options(const char *path, const char *dflt, struct lls_parse_result **lpr, const struct lls_command *cmd, const struct lls_suite *suite, unsigned flags)
Merge command line options and config file options.
Definition: lsu.c:170
SBD_WARNING_LOG
@ SBD_WARNING_LOG
Definition: sideband.h:66
parse_config_or_die
void parse_config_or_die(bool reload)
(Re-)read the server configuration files.
Definition: server.c:195
deplete_close_on_fork_list
void deplete_close_on_fork_list(void)
Remove all listed fds from the close on fork list.
Definition: close_on_fork.c:98
BLOBCOL_DEF
@ BLOBCOL_DEF
The actual blob contents.
Definition: afs.h:316
LEFT
#define LEFT
Status item text should be left-aligned.
Definition: gui.h:64
afh_info::max_chunk_size
uint32_t max_chunk_size
Size of the largest chunk, introduced in v0.6.0.
Definition: afh.h:40
TOUCH_FLAG_FNM_PATHNAME
@ TOUCH_FLAG_FNM_PATHNAME
Whether the FNM_PATHNAME flag should be passed to fnmatch().
Definition: aft.c:2039
OPT_GIVEN
#define OPT_GIVEN(_name, _lpr)
Definition: write.c:29
user::perms
unsigned int perms
The privileges of this user.
Definition: user_list.h:32
main
int main(int argc, char *argv[])
the main function of para_audiod
Definition: audiod.c:1450
RSA_DECRYPT_SEXP
#define RSA_DECRYPT_SEXP
S-expression for decryption.
Definition: gcrypt.c:113
HASH2_SIZE
#define HASH2_SIZE
Size of the hash value in bytes.
Definition: crypt.h:205
mp4_open
int mp4_open(const struct mp4_callback *cb, struct mp4 **result)
Read the audio track and the metadata of an mp4 file.
Definition: mp4.c:662
PM_NO_PATTERN_MATCHES_EVERYTHING
@ PM_NO_PATTERN_MATCHES_EVERYTHING
If no pattern is given, loop over all rows.
Definition: afs.h:123
sched::poll_function
int(* poll_function)(struct pollfd *fds, nfds_t nfds, int timeout)
If non-NULL, use this function instead of xpoll().
Definition: sched.h:33
DEF_COEF_TABLE
#define DEF_COEF_TABLE(_x)
Definition: wmadata.h:1444
BTR_NT_INTERNAL
@ BTR_NT_INTERNAL
Definition: buffer_tree.h:114
attribute_check_callback
int attribute_check_callback(struct afs_callback_arg *aca)
Compute the attribute bit mask and check each afs info bitmap.
Definition: attribute.c:449
DEFINE_PARA_ERRLIST
DEFINE_PARA_ERRLIST
Array of error strings.
Definition: recv.c:23
task_get_notification
int task_get_notification(const struct task *t)
Return the notification value of a task.
Definition: sched.c:311
close_on_fork.h
exported symbols from close_on_fork.c
get_btr_sample_rate
int get_btr_sample_rate(struct btr_node *btrn, int32_t *result)
Ask parent btr nodes for the sample rate of the current stream.
Definition: write_common.c:205
SOL_DCCP
#define SOL_DCCP
Linux socket level.
Definition: net.h:7
oac_custom_header_init
void oac_custom_header_init(int serial, struct oac_custom_header *h)
Set the serial number of an allocated header structure.
Definition: ogg_afh_common.c:381
read_asf_header
int read_asf_header(const char *buf, int loaded, struct asf_header_info *ahi)
Read an asf audio file header.
Definition: wma_common.c:87
DEFINE_BLOB_COMPLETER
#define DEFINE_BLOB_COMPLETER(cmd, blob_type)
Definition: client.c:461
hash_compare
int hash_compare(const unsigned char *h1, const unsigned char *h2)
Compare two hashes.
Definition: crypt_common.c:150
CWS_HAVE_HEADER
@ CWS_HAVE_HEADER
Wav hader was detected.
Definition: check_wav.c:24
PRIVATE_OPENSSH_KEY_HEADER
#define PRIVATE_OPENSSH_KEY_HEADER
Private OPENSSH keys (RFC4716) start with this header.
Definition: crypt_common.c:261
i9e_completion_info::argv
char ** argv
Vector of words in buffer.
Definition: interactive.h:12
sc_crypt
void sc_crypt(struct stream_cipher *sc, struct iovec *src, struct iovec *dst)
Encrypt or decrypt a buffer using a stream cipher.
Definition: gcrypt.c:646
make_message
__must_check __malloc __printf_1_2 char * make_message(const char *fmt,...)
Allocate a sufficiently large string and print into it.
Definition: string.c:237
i9e_completion_result
Completion information returned by the completers.
Definition: interactive.h:18
sender_client
Describes one client, connected to a paraslash sender.
Definition: send.h:118
aft_get_row_of_path
int aft_get_row_of_path(const char *path, struct osl_row **row)
Get the row of the audio file table corresponding to the given path.
Definition: aft.c:429
i9e_completion_result::filename_completion_desired
bool filename_completion_desired
Whether standard filename completion should be performed.
Definition: interactive.h:22
para_buffer_flags
para_buffer_flags
Flags that change how content is printed into the buffer.
Definition: string.h:6
id3_field_init
void id3_field_init(union id3_field *field, enum id3_field_type type)
get_afsi_of_row
int get_afsi_of_row(const struct osl_row *row, struct afs_info *afsi)
Get the audio file selector info, given a row of the audio file table.
Definition: aft.c:490
ATOM_ILST
@ ATOM_ILST
Definition: mp4.c:161
client_close
void client_close(struct client_task *ct)
Close the connection to para_server and free all resources.
Definition: client_common.c:39
para_install_sighandler
void para_install_sighandler(int)
Install the generic signal handler for the given signal number.
Definition: signal.c:160
mp4_update_meta
int mp4_update_meta(struct mp4 *f)
Write back the modified metadata items to the mp4 file.
Definition: mp4.c:999
receiver::execute
btr_command_handler execute
Answer a buffer tree query.
Definition: recv.h:78
i9e_poll
int i9e_poll(struct pollfd *fds, nfds_t nfds, int timeout)
Wrapper for poll(2) which handles EINTR and returns paraslash error codes.
Definition: interactive.c:606
btr_node_description::context
void * context
Points usually to the struct that contains the node pointer.
Definition: buffer_tree.h:166
acl_check_access
int acl_check_access(int fd, struct list_head *acl, int default_deny)
Check whether the peer name of a given fd is allowed by an acl.
Definition: acl.c:154
asf_header_info::packet_size
uint32_t packet_size
Obtained from the file properties object.
Definition: wma.h:32
para_reap_child
int para_reap_child(pid_t *pid)
Reap one child.
Definition: signal.c:99
receiver::post_monitor
int(* post_monitor)(struct sched *s, void *context)
Receive data and make it available to consumers.
Definition: recv.h:71
FOR_EACH_AUDIO_FORMAT
#define FOR_EACH_AUDIO_FORMAT(i)
Iterate over each supported audio format.
Definition: afh_common.c:75
gui_theme::name
const char * name
Printed at startup.
Definition: gui.h:28
MAX_STREAM_SLOTS
#define MAX_STREAM_SLOTS
Maximal number of simultaneous instances.
Definition: audiod.c:98
signal_init_or_die
struct signal_task * signal_init_or_die(void)
Initialize the paraslash signal subsystem.
Definition: signal.c:35
parse_cidr
char * parse_cidr(const char *cidr, char *addr, ssize_t addrlen, int32_t *netmask)
Parse and validate IPv4 address/netmask string.
Definition: net.c:40
command_context::u
const struct user * u
The paraslash user that executes this command.
Definition: command.h:6
get_btr_channels
int get_btr_channels(struct btr_node *btrn, int32_t *result)
Ask parent btr nodes for the channel count of the current stream.
Definition: write_common.c:218
shm_attach
int shm_attach(int id, enum shm_attach_mode mode, void **result)
Attach a shared memory segment.
Definition: ipc.c:150
mmd
struct misc_meta_data * mmd
Pointer to shared memory area for communication between para_server and its children.
Definition: server.c:52
fec_new
int fec_new(int k, int n, struct fec_parms **parms)
Create a new encoder and return an opaque descriptor to it.
Definition: fec.c:458
MAX_CQ_BYTES
#define MAX_CQ_BYTES
Clients will be kicked if there are more than that many bytes pending.
Definition: send_common.c:31
mmap_full_file
int mmap_full_file(const char *filename, int open_mode, void **map, size_t *size, int *fd_ptr)
Open a file and map it into memory.
Definition: fd.c:435
http_sender
const struct sender udp_sender dccp_sender http_sender
The HTTP sender.
Definition: http_send.c:273
ARRAY_SIZE
#define ARRAY_SIZE(arr)
Get the size of an array.
Definition: para.h:158
spx_header_info::frame_size
int frame_size
Extracted from header.
Definition: spx.h:17
lsu_merge_cf_flags
lsu_merge_cf_flags
Flags for lsu_merge_config_file_options().
Definition: lsu.h:10
afh_info::techinfo
char * techinfo
Audio handler specific info about the file.
Definition: afh.h:31
MCF_DONT_FREE
@ MCF_DONT_FREE
After the two lopsub parse results have been merged, the merged parse result usually becomes the effe...
Definition: lsu.h:30
daemon_drop_privileges_or_die
void daemon_drop_privileges_or_die(const char *username, const char *groupname)
Give up superuser privileges.
Definition: daemon.c:349
check_wav_post_monitor
int check_wav_post_monitor(struct check_wav_context *cwc)
Filter out the wav header, pushdown everything else.
Definition: check_wav.c:124
mp4_open_meta
int mp4_open_meta(const struct mp4_callback *cb, struct mp4 **result)
Open an mp4 file in metadata-only mode.
Definition: mp4.c:841
mp_parse_regex_pattern
int mp_parse_regex_pattern(const char *src, struct mp_re_pattern *result)
Parse and compile an extended regular expression pattern, including flags.
Definition: mp.c:157
para_strdup
__must_check __malloc char * para_strdup(const char *s)
Paraslash's version of strdup().
Definition: string.c:154
daemon_log_welcome
void daemon_log_welcome(const char *name)
Log the startup message containing the paraslash version.
Definition: daemon.c:315
vss_init
void vss_init(int afs_socket, struct sched *s)
Initialize the virtual streaming system task.
Definition: vss.c:1165
score_clear
void score_clear(void)
Remove all entries from the score table, but keep the table open.
Definition: score.c:319
vss_shutdown
void vss_shutdown(void)
Turn off the virtual streaming system.
Definition: vss.c:1203
BLOCK_MAX_SIZE
#define BLOCK_MAX_SIZE
Definition: wmadec_filter.c:37
score_delete
int score_delete(const struct osl_row *aft_row)
Remove an entry from the rbtree of admissible files.
Definition: score.c:247
gui_theme::lines_min
int lines_min
Minimal admissible number of lines to display this theme.
Definition: gui.h:40
SBD_COMMAND
@ SBD_COMMAND
Definition: sideband.h:66
daemon_set_loglevel
void daemon_set_loglevel(int loglevel)
Control the verbosity for logging.
Definition: daemon.c:150
xvasprintf
__printf_2_0 unsigned xvasprintf(char **result, const char *fmt, va_list ap)
Print a formatted message to a dynamically allocated string.
Definition: string.c:181
deplete_close_on_fork_list
void deplete_close_on_fork_list(void)
Remove all listed fds from the close on fork list.
Definition: close_on_fork.c:98
mp_ast_node
Describes one node of the abstract syntax tree.
Definition: mp.h:70
mp_parse_error
__printf_3_4 void mp_parse_error(int line, struct mp_context *ctx, const char *fmt,...)
Set the error bit in the parser context and log a message.
Definition: mp.c:231
NUM_SB_DESIGNATORS
@ NUM_SB_DESIGNATORS
Definition: sideband.h:66
oss_mixer
const struct mixer oss_mixer
The mixer operations for the OSS mixer.
Definition: oss_mix.c:135
filter_get
const struct filter * filter_get(int filter_num)
Obtain a reference to a filter structure.
Definition: filter_common.c:32
audio_file_table_columns
audio_file_table_columns
The columns of the audio file table.
Definition: aft.c:201
ITEM
#define ITEM(x)
INITIALIZED_LIST_HEAD
#define INITIALIZED_LIST_HEAD(name)
Define an initialized list head.
Definition: list.h:25
sender::client_cmds
int(* client_cmds[NUM_SENDER_CMDS])(struct sender_command_data *)
Array of function pointers for the sender subcommands.
Definition: send.h:100
btr_drain
void btr_drain(struct btr_node *btrn)
Clear the input queue of a buffer tree node.
Definition: buffer_tree.c:762
AFHI_SECONDS_TOTAL_OFFSET
@ AFHI_SECONDS_TOTAL_OFFSET
Where the number of seconds is stored.
Definition: aft.c:297
ATOM_MOOV
@ ATOM_MOOV
Definition: mp4.c:161
gui_theme::cmd
struct gui_color_spec cmd
Color of the name and args of the executing process.
Definition: gui.h:48
i9e_extract_completions
int i9e_extract_completions(const char *word, char **string_list, char ***result)
Return the possible completions for a given word.
Definition: interactive.c:634
afsi_change_event_data::old_afsi
struct afs_info * old_afsi
Afs info before the change.
Definition: afs.h:73
shm_new
int shm_new(size_t size)
Create a new shared memory area of given size.
Definition: ipc.c:116
stat_item_values
char * stat_item_values[NUM_STAT_ITEMS]
The array of status items sent by para_server.
Definition: audiod.c:160
shutdown_client
void shutdown_client(struct sender_client *sc, struct sender_status *ss)
Shut down a client connected to a paraslash sender.
Definition: send_common.c:45
FEC_STATE_DISABLED
@ FEC_STATE_DISABLED
temporarily disabled
Definition: vss.c:125
btr_pushdown
void btr_pushdown(struct btr_node *btrn)
Feed all buffer references of the input queue through the output channel.
Definition: buffer_tree.c:504
SAMPLE_FORMATS
#define SAMPLE_FORMATS
The sample formats supported by paraslash.
Definition: para.h:199
recv_cred_buffer
int recv_cred_buffer(int, char *, size_t)
Receive a buffer and the Unix credentials of the sending process.
Definition: net.c:1083
audio_file_data::audio_format_id
uint8_t audio_format_id
Needed to get the audio file header.
Definition: afh.h:69
oac_callback_info
Callback structure provided by audio format handlers.
Definition: ogg_afh_common.h:21
COMMAND_BUF_SIZE
#define COMMAND_BUF_SIZE
Stdout/stderr of the executing process is read in chunks of this size.
Definition: gui.c:144
btr_get_node_start
void btr_get_node_start(struct btr_node *btrn, struct timeval *tv)
Get the time of the first I/O for a buffer tree node.
Definition: buffer_tree.c:1233
attribute_check_callback
int attribute_check_callback(struct afs_callback_arg *aca)
Compute the attribute bit mask and check each afs info bitmap.
Definition: attribute.c:449
ringbuffer_filled
unsigned ringbuffer_filled(struct ringbuffer *rb)
Get the number of entries in the ring buffer.
Definition: ringbuffer.c:98
sender_status::max_clients
int max_clients
The maximal number of simultaneous connections.
Definition: send.h:181
sched_request_timeout_ms
void sched_request_timeout_ms(long unsigned ms, struct sched *s)
Bound the I/O timeout to at most the given amount of milliseconds.
Definition: sched.c:391
ATTRIBUTE_RENAME
@ ATTRIBUTE_RENAME
An attribute was renamed.
Definition: afs.h:35
tv_divide
void tv_divide(const unsigned long divisor, const struct timeval *tv, struct timeval *result)
Compute a fraction of given struct timeval.
Definition: time.c:107
MP_TAG
#define MP_TAG(_name)
Define a function which extracts and returns the value of a meta tag.
Definition: mp.c:423
pattern_match_data::input_skip
unsigned input_skip
Do not try to match the first inputs of lpr.
Definition: afs.h:143
VLCBITS
#define VLCBITS
Definition: wmadec_filter.c:128
parse_quoted_string
unsigned parse_quoted_string(const char *src, const char quote_chars[2], char **result)
Parse a (generalized) string literal.
Definition: mp.c:84
afs_table_operations::close
void(* close)(void)
Gets called on shutdown and on SIGHUP.
Definition: afs.h:81
theme_init
void theme_init(const char *name, struct gui_theme *t)
Initialize a theme.
Definition: gui_theme.c:394
sender_command_data::max_slice_bytes
uint16_t max_slice_bytes
Maximal slice size.
Definition: server.h:21
TRANSFORM_ZERO
#define TRANSFORM_ZERO(a0, a1, a2, a3)
Definition: imdct.c:134
check_writer_arg_or_die
int check_writer_arg_or_die(const char *wa, struct lls_parse_result **lprp)
Check if the given string is a valid command line for any writer.
Definition: write_common.c:79
CRT_TERM_RQ
@ CRT_TERM_RQ
Someone wants us for dead (com_quit()).
Definition: play.c:56
vss_paused
unsigned int vss_paused(void)
Check if the vss is currently paused.
Definition: vss.c:781
sched_request_barrier
int sched_request_barrier(struct timeval *barrier, struct sched *s)
Bound the I/O timeout by an absolute time in the future.
Definition: sched.c:409
ls_listing_mode
ls_listing_mode
The different listing modes of the ls command.
Definition: aft.c:69
DEFINE_PARA_ERRLIST
DEFINE_PARA_ERRLIST
Array of error strings.
Definition: upgrade_db.c:25
AFHI_HEADER_LEN_OFFSET
@ AFHI_HEADER_LEN_OFFSET
Definition: aft.c:305
mp4_get_channel_count
uint16_t mp4_get_channel_count(const struct mp4 *f)
Return the number of channels of the audio track.
Definition: mp4.c:808
SBD_NOTICE_LOG
@ SBD_NOTICE_LOG
Definition: sideband.h:66
DEFINE_PARA_ERRLIST
DEFINE_PARA_ERRLIST
Array of error strings.
Definition: client.c:23
para_listen_simple
int para_listen_simple(unsigned l4type, uint16_t port)
Create a socket which listens on all network addresses.
Definition: net.c:580
vlc::bits
int bits
Number of bits of the table.
Definition: bitstream.h:24
sender::status
char *(* status)(void)
Return current status info about this sender.
Definition: send.h:66
rmatt_event_data
Used as data for afs_event() for events of type ATTRIBUTE_ADD.
Definition: afs.h:59
send_queued_chunks
int send_queued_chunks(int fd, struct chunk_queue *cq)
Try to empty the chunk queue for this fd.
Definition: send_common.c:83
decode_public_key
int decode_public_key(const char *filename, unsigned char **blob, size_t *decoded_size)
Perform sanity checks and base64-decode an ssh-rsa key.
Definition: crypt_common.c:88
oac_rewrite_tags
int oac_rewrite_tags(const char *map, size_t mapsize, int fd, char *meta_packet, size_t meta_sz)
Change meta tags of ogg files.
Definition: ogg_afh_common.c:225
get_afsi_of_row
int get_afsi_of_row(const struct osl_row *row, struct afs_info *afsi)
Get the audio file selector info, given a row of the audio file table.
Definition: aft.c:490
OPT_STRING_VAL
#define OPT_STRING_VAL(_cmd, _opt)
Definition: mixer.c:40
receiver::open
int(* open)(struct receiver_node *rn)
Open one instance of the receiver.
Definition: recv.h:58
NO_ADMISSIBLE_FILES
@ NO_ADMISSIBLE_FILES
No admissible audio file was found.
Definition: afs.h:115
strwidth
__must_check int strwidth(const char *s, size_t *result)
Compute the width of an UTF-8 string.
Definition: string.c:1001
senders
const struct sender *const senders[]
NULL-terminated list, defined in vss.c.
Definition: vss.c:39
get_btr_sample_format
int get_btr_sample_format(struct btr_node *btrn, int32_t *result)
Ask parent btr nodes for the number of bits per sample and the byte sex.
Definition: write_common.c:231
COLOR_MSG
@ COLOR_MSG
Definition: gui.c:77
for_each_stat_item
int for_each_stat_item(char *item_buf, size_t num_bytes, int(*item_handler)(int, char *))
Call a function for each complete status item of a buffer.
Definition: stat.c:31
sender_command_data::slices_per_group
uint8_t slices_per_group
Number of data slices plus redundant slices.
Definition: server.h:23
sockaddr_equal
bool sockaddr_equal(const struct sockaddr *sa1, const struct sockaddr *sa2)
Compare the address part of IPv4/6 addresses.
Definition: net.c:738
SERVER_CMD_OPT_GIVEN
#define SERVER_CMD_OPT_GIVEN(_cmd, _opt, _lpr)
How many times an option was given.
Definition: command.h:43
lsg_filter_cmd_com_mp3dec_user_data
const struct filter lsg_filter_cmd_com_mp3dec_user_data
Definition: mp3dec_filter.c:187
alsa_mixer
const struct mixer alsa_mixer
The mixer operations for the ALSA mixer.
Definition: alsa_mix.c:216
i9e_open
int i9e_open(struct i9e_client_info *ici, struct sched *s)
Register the i9e task and initialize readline.
Definition: interactive.c:443
hash2_to_asc
void hash2_to_asc(const unsigned char *hash, char *asc)
Convert a hash2 value to ascii format.
Definition: crypt_common.c:163
gui_theme
Theme definition.
Definition: gui.h:26
connect_local_socket
int connect_local_socket(const char *name)
Prepare, create, and connect to a Unix domain socket for local communication.
Definition: net.c:988
mixer_subcommand_handler_t
int(* mixer_subcommand_handler_t)(const struct mixer *)
Definition: mixer.c:43
main
int main(int argc, char **argv)
The main function of para_afh.
Definition: afh.c:210
i9e_signal_dispatch
void i9e_signal_dispatch(int sig_num)
Tell i9e that the caller received a signal.
Definition: interactive.c:579
status_item_list
const char * status_item_list[]
The list of all status items used by para_{server,audiod,gui}.
Definition: filter.c:34
task_info::post_monitor
int(* post_monitor)(struct sched *s, void *context)
Perform I/O on file descriptors which are ready for I/O.
Definition: sched.h:67
SBD_CRIT_LOG
@ SBD_CRIT_LOG
Definition: sideband.h:66
MAX_ERRORS
#define MAX_ERRORS
Give up decoding after that many errors.
Definition: aacdec_filter.c:22
NO_PERMISSION_REQUIRED
@ NO_PERMISSION_REQUIRED
Definition: user_list.h:14
KEY_TYPE_TXT
#define KEY_TYPE_TXT
If the key begins with this text, we treat it as an ssh key.
Definition: crypt_common.c:17
LS_SORT_BY_LYRICS_ID
@ LS_SORT_BY_LYRICS_ID
-s=y
Definition: aft.c:61
btr_drain
void btr_drain(struct btr_node *btrn)
Clear the input queue of a buffer tree node.
Definition: buffer_tree.c:762
audiod_get_btr_root
struct btr_node * audiod_get_btr_root(void)
Return the root node of the current buffer tree.
Definition: audiod.c:684
daemon_set_log_color_or_die
void daemon_set_log_color_or_die(const char *arg)
Set the color for log messages of the given severity level.
Definition: daemon.c:65
i9e_completion_info::point
int point
Cursor position.
Definition: interactive.h:11
sched_request_barrier_or_min_delay
int sched_request_barrier_or_min_delay(struct timeval *barrier, struct sched *s)
Bound the I/O timeout or request a minimal delay.
Definition: sched.c:430
AFTCOL_CHUNKS
@ AFTCOL_CHUNKS
The chunk table info and the chunk table of the audio file.
Definition: upgrade_db.c:124
makesock
int makesock(unsigned l4type, bool passive, const char *host, uint16_t port_number, struct flowopts *fo)
Resolve IPv4/IPv6 address and create a ready-to-use active or passive socket.
Definition: net.c:512
SBD_OUTPUT
@ SBD_OUTPUT
Definition: sideband.h:66
btr_pool_new
struct btr_pool * btr_pool_new(const char *name, size_t area_size)
Create a new buffer pool.
Definition: buffer_tree.c:70
i9e_completion_info::argc
int argc
Number of elements(words) in argv.
Definition: interactive.h:13
taginfo::album
char * album
TALB/ALBUM/alb.
Definition: afh.h:19
extract_v4_addr
void extract_v4_addr(const struct sockaddr_storage *ss, struct in_addr *ia)
Extract IPv4 or IPv6-mapped-IPv4 address from sockaddr_storage.
Definition: net.c:721
hash_to_asc
void hash_to_asc(const unsigned char *hash, char *asc)
Convert a hash value to ascii format.
Definition: crypt_common.c:138
PAD64
#define PAD64
Definition: base64.c:54
i9e_print_completions
int i9e_print_completions(struct i9e_completer *completers)
Print possible completions to stdout.
Definition: interactive.c:738
btr_copy
void btr_copy(const void *src, size_t n, struct btr_pool *btrp, struct btr_node *btrn)
Copy data to write head of a buffer pool and feed it to all children nodes.
Definition: buffer_tree.c:466
fec_client_parms::need_periodic_header
bool need_periodic_header
Whether the header must be sent periodically.
Definition: send.h:151
AFH_RECV_CMD
#define AFH_RECV_CMD
Definition: play.c:114
afh_info::seconds_total
uint32_t seconds_total
The length of the audio file in seconds.
Definition: afh.h:29
NUM_COMPARE
#define NUM_COMPARE(x, y)
evaluates to 1 if x < y, to -1 if x > y and to 0 if x == y
Definition: afs.h:287
main
int main(int argc, char *argv[])
Para_write's main function.
Definition: write.c:140
afs_pid
pid_t afs_pid
The process id of the audio file selector process.
Definition: server.c:86
sc_free
void sc_free(struct stream_cipher *sc)
Deallocate a stream cipher structure.
Definition: gcrypt.c:638
task_notify
void task_notify(struct task *t, int err)
Set the notification value of a task.
Definition: sched.c:291
playlist_load
int playlist_load(const char *name, struct playlist_instance **result, char **msg)
Populate the score table from the paths of a playlist database object.
Definition: playlist.c:149
sb_new_send
struct sb_context * sb_new_send(struct sb_buffer *sbb, bool dont_free, sb_transformation t, void *trafo_context)
Prepare to write a sideband packet.
Definition: sideband.c:62
remote_name
char * remote_name(int fd)
Look up the remote side of a connected socket structure.
Definition: net.c:684
afh_info
Audio format dependent information.
Definition: afh.h:25
DCCP_SOCKOPT_CCID
#define DCCP_SOCKOPT_CCID
Sets both TX/RX CCID.
Definition: dccp_recv.c:31
hash_to_asc
void hash_to_asc(const unsigned char *hash, char *asc)
Convert a hash value to ascii format.
Definition: crypt_common.c:138
user_list_init
void user_list_init(const char *user_list_file)
Initialize the list of users allowed to connect to para_server.
Definition: user_list.c:70
main
int main(int argc, char *argv[])
The main function of para_play.
Definition: play.c:1260
server_lpr
struct lls_parse_result * server_lpr
The active value for all config options of para_server.
Definition: server.c:60
valid_fd_012
void valid_fd_012(void)
Ensure that file descriptors 0, 1, and 2 are valid.
Definition: fd.c:569
PLAY_MODE_PLAYLIST
@ PLAY_MODE_PLAYLIST
All listed files are admissible.
Definition: afs.h:94
sender_status::default_port
int default_port
Default TCP/DCCP port number for addresses w/o port.
Definition: send.h:175
check_wav.h
Detect, process and cut a wav header.
command_context::scc
struct stream_cipher_context scc
File descriptor and crypto keys.
Definition: command.h:8
score_get_best
int score_get_best(struct osl_row **aft_row, long *score)
Get the admissible audio file with highest score.
Definition: score.c:223
DEFINE_PARA_ERRLIST
DEFINE_PARA_ERRLIST
Array of error strings.
Definition: filter.c:24
misc_meta_data::events
unsigned int events
The event counter.
Definition: server.h:63
OGGDEC_MAX_OUTPUT_SIZE
#define OGGDEC_MAX_OUTPUT_SIZE
Suspend decoding if output queue size is larger than that.
Definition: oggdec_filter.c:177
main
int main(int argc, char *argv[])
The main function of para_server.
Definition: server.c:659
mp4_tag::value
char * value
An arbitrary string value.
Definition: mp4.h:50
WMA_FRAME_SKIP
#define WMA_FRAME_SKIP
Definition: wma.h:41
INIT_STDERR_LOGGING
#define INIT_STDERR_LOGGING(loglevel_barrier)
Define the standard log function and activate it.
Definition: para.h:74
btr_node_type
btr_node_type
The three different types of buffer tree nodes.
Definition: buffer_tree.h:110
afh_rewrite_tags
int afh_rewrite_tags(int audio_format_id, void *map, size_t mapsize, struct taginfo *tags, int output_fd, const char *filename)
Create a copy of the given file with altered meta tags.
Definition: afh_common.c:476
server_cmd_user_data
The lopsub user data structure for server commands.
Definition: command.h:23
stat_item_values
char * stat_item_values[NUM_STAT_ITEMS]
The array of status items sent by para_server.
Definition: audiod.c:160
audiod_status_dump
void audiod_status_dump(bool force)
Send the current audiod status to all connected stat clients.
Definition: audiod_command.c:447
images_event_handler
__a_const int images_event_handler(__a_unused enum afs_events event, __a_unused struct para_buffer *pb, __a_unused void *data)
Dummy event handler for the images table.
Definition: afs.c:1162
filter_get
const struct filter * filter_get(int filter_num)
Obtain a reference to a filter structure.
Definition: filter_common.c:32
flowopt_new
struct flowopts * flowopt_new(void)
Allocate and initialize a flowopt queue.
Definition: net.c:298
btr_node_status
int btr_node_status(struct btr_node *btrn, size_t min_iqs, enum btr_node_type type)
Return the current state of a buffer tree node.
Definition: buffer_tree.c:1202
CMD_PTR
#define CMD_PTR
Definition: afh.c:21
rmatt_event_data::name
const char * name
The name of the attribute being added.
Definition: afs.h:61
afs_callback
int afs_callback(struct afs_callback_arg *aca)
The "top half" of an afs command.
Definition: afs.h:181
btr_pushdown
void btr_pushdown(struct btr_node *btrn)
Feed all buffer references of the input queue through the output channel.
Definition: buffer_tree.c:504
apc_pub_encrypt
int apc_pub_encrypt(struct asymmetric_key *pub, unsigned char *inbuf, unsigned len, unsigned char *outbuf)
Encrypt a buffer using asymmetric keys.
Definition: gcrypt.c:556
AFTCOL_AFHI
@ AFTCOL_AFHI
The audio format handler info.
Definition: upgrade_db.c:122
opus_header::version
int version
lower 4 bits of the version byte, must be 0.
Definition: opus_common.h:11
para_listen_simple
int para_listen_simple(unsigned l4type, uint16_t port)
Create a socket which listens on all network addresses.
Definition: net.c:580
i9e_close
void i9e_close(void)
Reset the terminal and save the in-memory command line history.
Definition: interactive.c:224
AFTCOL_PATH
@ AFTCOL_PATH
The full path in the filesystem.
Definition: aft.c:205
OPT_GIVEN
#define OPT_GIVEN(_name, _lpr)
Definition: upgrade_db.c:20
PARA_CRIT_LOG
#define PARA_CRIT_LOG(f,...)
Definition: para.h:222
NUM_SCORE_COLUMNS
@ NUM_SCORE_COLUMNS
This table has two columns.
Definition: score.c:52
makesock_addrinfo
int makesock_addrinfo(unsigned l4type, bool passive, struct addrinfo *ai, struct flowopts *fo)
Create an active or passive socket.
Definition: net.c:449
version.h
Functions for printing the version string.
mp_is_set
bool mp_is_set(const char *attr, struct mp_context *ctx)
Check whether the given attribute is set for the current audio file.
Definition: mp.c:307
btr_add_output_dont_free
void btr_add_output_dont_free(const char *buf, size_t size, struct btr_node *btrn)
Insert a buffer into the buffer tree, non-freeing variant.
Definition: buffer_tree.c:411
MAX_FRAME_SIZE
#define MAX_FRAME_SIZE
120ms at 48000
Definition: opusdec_filter.c:60
VSS_WRITE
@ VSS_WRITE
Read-only operation on the virtual streaming system.
Definition: user_list.h:18
FOR_EACH_MIXER
#define FOR_EACH_MIXER(i)
Definition: mixer.c:32
afs_server_code
afs_server_code
Codes used for communication between the server and the afs process.
Definition: afs.h:111
generic_com_off
void generic_com_off(struct sender_status *ss)
Deactivate a paraslash sender.
Definition: send_common.c:328
lsg_filter_cmd_com_compress_user_data
const struct filter lsg_filter_cmd_com_compress_user_data
Definition: compress_filter.c:161
activate_grab_clients
void activate_grab_clients(struct sched *s)
Activate inactive grab clients if possible.
Definition: grab_client.c:151
search_pattern
const char * search_pattern(const char *pattern, int pattern_len, const char *buf, int buf_size)
Find the first occurrence of the given pattern.
Definition: wma_common.c:24
BLOCK_MIN_BITS
#define BLOCK_MIN_BITS
Definition: wmadec_filter.c:35
mp4_get_sample_rate
uint16_t mp4_get_sample_rate(const struct mp4 *f)
Return the sample rate stored in the stsd atom.
Definition: mp4.c:794
DCCP_SOCKOPT_TX_CCID
#define DCCP_SOCKOPT_TX_CCID
Set/get the TX CCID.
Definition: dccp_send.c:49
FILTER_CMD
#define FILTER_CMD(_num)
Definition: filter.h:102
para_unblock_signal
void para_unblock_signal(int sig)
Unblock a signal.
Definition: signal.c:195
server_cmd_user_data::handler
server_cmd_handler_t handler
Pointer to the command handler.
Definition: command.h:25
i9e_open
int i9e_open(struct i9e_client_info *ici, struct sched *s)
Register the i9e task and initialize readline.
Definition: interactive.c:443
stdout_task
The task structure used for writing to stdout.
Definition: stdout.h:10
receiver_node::btrp
struct btr_pool * btrp
Each receiver node maintains a buffer pool for the received data.
Definition: recv.h:20
afh_supports_dynamic_chunks
bool afh_supports_dynamic_chunks(int audio_format_id)
Tell whether an audio format handler provides chunk tables.
Definition: afh_common.c:89
i9e_signal_dispatch
void i9e_signal_dispatch(int sig_num)
Tell i9e that the caller received a signal.
Definition: interactive.c:579
sender_status::default_deny
int default_deny
Whether the access control list is a whitelist.
Definition: send.h:183
check_receiver_arg
int check_receiver_arg(const char *ra, struct lls_parse_result **lprp)
Check if the given string is a valid receiver specifier.
Definition: recv_common.c:35
lsu_merge_config_file_options
int lsu_merge_config_file_options(const char *path, const char *dflt, struct lls_parse_result **lpr, const struct lls_command *cmd, const struct lls_suite *suite, unsigned flags)
Merge command line options and config file options.
Definition: lsu.c:170
ATTRIBUTE_REMOVE
@ ATTRIBUTE_REMOVE
An attribute was removed.
Definition: afs.h:37
AFS_SOCKET_CHECK_FOR_WRITE
@ AFS_SOCKET_CHECK_FOR_WRITE
Socket fd was monitored for writing.
Definition: vss.c:47
LS_MODE_PARSER
@ LS_MODE_PARSER
-l=c
Definition: aft.c:75
EXPORT_CMD
#define EXPORT_CMD(_cmd)
Definition: mixer.c:45
i9e_client_info::key_handler
int(* key_handler)(int key)
In single key mode, this callback is executed instead.
Definition: interactive.h:59
btr_add_output_pool
void btr_add_output_pool(struct btr_pool *btrp, size_t size, struct btr_node *btrn)
Feed data to child nodes of a buffer tree node.
Definition: buffer_tree.c:436
main
int main(int argc, char *argv[])
The main function of para_recv.
Definition: recv.c:63
oac_custom_header_flush
void oac_custom_header_flush(struct oac_custom_header *h)
Force remaining packets into an ogg page.
Definition: ogg_afh_common.c:412
shm_size
int shm_size(int id, size_t *result)
Get the size of a shared memory segment.
Definition: ipc.c:169
crypt_shutdown
void crypt_shutdown(void)
Allocate all resources of the crypto backend.
Definition: gcrypt.c:99
SBD_EMERG_LOG
@ SBD_EMERG_LOG
Definition: sideband.h:66
RECV_CMD_OPT_STRING_VAL
#define RECV_CMD_OPT_STRING_VAL(_recv, _opt, _lpr)
Definition: recv.h:87
cq_new
struct chunk_queue * cq_new(size_t max_pending)
Allocate and initialize a chunk queue.
Definition: chunk_queue.c:131
get_afhi_of_row
int get_afhi_of_row(const struct osl_row *row, struct afh_info *afhi)
Get the audio format handler info, given a row of the audio file table.
Definition: aft.c:590
daemon_flags
daemon_flags
Daemon log configuration flags.
Definition: daemon.h:24
fec_client_state
fec_client_state
A FEC client is always in one of these states.
Definition: vss.c:123
generic_sender_status
__malloc char * generic_sender_status(struct sender_status *ss, const char *name)
Return a string containing the current status of a sender.
Definition: send_common.c:184
mp4_callback::user_data
void * user_data
This pointer is propagated to each call of all methods.
Definition: mp4.h:19
sched::timeout
int timeout
The timeout (also in milliseconds) for the next iteration.
Definition: sched.h:21
SBD_AFS_CB_FAILURE
@ SBD_AFS_CB_FAILURE
Definition: sideband.h:66
sched_shutdown
void sched_shutdown(struct sched *s)
Deallocate all resources of all tasks of a scheduler instance.
Definition: sched.c:204
get_time_string
__malloc char * get_time_string(void)
Compute the play time based on information of the current slot.
Definition: audiod.c:293
ogg_afh_common.h
Structures and prototypes common to audio format handlers that use the ogg container format.
version_single_line
const char * version_single_line(const char *pfx)
Get the version string for an executable.
Definition: version.c:17
AFSI_IMAGE_ID_OFFSET
@ AFSI_IMAGE_ID_OFFSET
Storage position of the .image_id field.
Definition: aft.c:138
para_strerror
_static_inline_ const char * para_strerror(int num)
Paraslash's version of strerror(3).
Definition: error.h:291
receiver::close
void(* close)(struct receiver_node *rn)
Close this instance of the receiver.
Definition: recv.h:67
sched.h
Sched and task structures and exported symbols from sched.c.
HTTP_ERR_MSG
#define HTTP_ERR_MSG
Message sent to clients that do not send a valid get request.
Definition: http_send.c:31
CMD_PTR
#define CMD_PTR
Definition: filter.c:27
EMBRACE
#define EMBRACE(...)
Used to avoid a shortcoming in vim's syntax highlighting.
Definition: para.h:182
user_list_init
void user_list_init(const char *user_list_file)
Initialize the list of users allowed to connect to para_server.
Definition: user_list.c:70
afs_cb_result_handler
int afs_cb_result_handler(struct osl_object *result, uint8_t band, void *private)
Result handler for sending data to the para_client process.
Definition: afs.c:490
server_lpr
struct lls_parse_result * server_lpr
The active value for all config options of para_server.
Definition: server.c:60
aft_check_attributes
int aft_check_attributes(uint64_t att_mask, struct para_buffer *pb)
Iterate over all audio files and check the attribute bit mask.
Definition: aft.c:2577
DEFINE_PARA_ERRLIST
DEFINE_PARA_ERRLIST
Array of error strings.
Definition: server.c:41
sb_get_send_buffers
int sb_get_send_buffers(struct sb_context *c, struct iovec iov[2])
Obtain pointer(s) to the sideband send buffer(s).
Definition: sideband.c:127
grab_client.h
exported symbols from grab_client.c
SENDER_SUBCOMMANDS
#define SENDER_SUBCOMMANDS
A little preprocessor fu helps to create the sender_subcommand enumeration below and the list of send...
Definition: send.h:9
btr_command_handler
int(* btr_command_handler)(struct btr_node *btrn, const char *command, char **result)
Per node handler used for inter node communication.
Definition: buffer_tree.h:134
para_install_sighandler
void para_install_sighandler(int sig)
Install the generic signal handler for the given signal number.
Definition: signal.c:160
theme_prev
void theme_prev(struct gui_theme *t)
Activate the previous available theme.
Definition: gui_theme.c:419
pattern_match_data::action
int(* action)(struct osl_table *table, struct osl_row *row, const char *name, void *data)
For each matching row, this function will be called.
Definition: afs.h:149
client_task::task
struct task * task
The client task structure.
Definition: client.h:44
tv_add
void tv_add(const struct timeval *a, const struct timeval *b, struct timeval *sum)
Add two time values.
Definition: time.c:72
sched::pidx_array_len
unsigned pidx_array_len
Mumber of elements in the above pidx array.
Definition: sched.h:31
accept_sender_client
struct sender_client * accept_sender_client(struct sender_status *ss)
Accept a connection on the socket(s) this server is listening on.
Definition: send_common.c:369
mood_unload
void mood_unload(struct mood_instance *m)
Free all resources of a mood instance.
Definition: mood.c:563
FILTER_CMD_OPT
#define FILTER_CMD_OPT(_cmd, _opt)
Definition: filter.h:103
task_info::name
const char * name
Used for log messages and by get_task_list().
Definition: sched.h:43
mp_parse_wildcard_pattern
void mp_parse_wildcard_pattern(const char *src, struct mp_wc_pattern *result)
Parse a wildcard pattern, including flags.
Definition: mp.c:197
i9e_completer::name
const char * name
The command for which this completer provides completion.
Definition: interactive.h:42
mp_re_pattern::flags
unsigned flags
Subset of the cflags described in regex(3).
Definition: mp.h:29
AFSI_LYRICS_ID_OFFSET
@ AFSI_LYRICS_ID_OFFSET
Storage position of the .lyrics_id field.
Definition: aft.c:140
apc_get_pubkey
int apc_get_pubkey(const char *key_file, struct asymmetric_key **result)
Read an asymmetric key from a file.
Definition: gcrypt.c:426
filter::post_monitor
int(* post_monitor)(struct sched *s, void *context)
Convert (filter) input data into output data.
Definition: filter.h:89
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.
Definition: vss.c:671
audio_file_loop
int audio_file_loop(void *private_data, osl_rbtree_loop_func *func)
Call the given function for each file in the audio file table.
Definition: aft.c:1536
LLS_ERROR_BIT
#define LLS_ERROR_BIT
Like SYSTEM_ERROR_BIT, but for errors from the lopsub library.
Definition: error.h:262
getbit_context::index
int index
Bit counter.
Definition: bitstream.h:18
shm_attach
int shm_attach(int id, enum shm_attach_mode mode, void **result)
Attach a shared memory segment.
Definition: ipc.c:150
TS_RUNNING
@ TS_RUNNING
Task is active.
Definition: sched.c:30
spx_header_info::extra_headers
int extra_headers
Must be skipped during decode.
Definition: spx.h:29
score_close
void score_close(struct osl_table *t)
Free all volatile objects, then close the table.
Definition: score.c:284
xwritev
int xwritev(int fd, struct iovec *iov, int iovcnt)
Write an array of buffers, handling non-fatal errors.
Definition: fd.c:64
misc_meta_data::chunks_sent
long unsigned chunks_sent
The number of data chunks sent so far.
Definition: server.h:48
misc_meta_data
Miscellaneous data for communication between server and command handlers.
Definition: server.h:42
fec_client_parms::slices_per_group
uint8_t slices_per_group
Number of data slices plus redundant slices.
Definition: send.h:147
i9e_client_info::bound_keyseqs
char ** bound_keyseqs
The array of valid key sequences for libreadline.
Definition: interactive.h:61
pattern_match_data
Structure passed to for_each_matching_row().
Definition: afs.h:129
mp4_open_meta
int mp4_open_meta(const struct mp4_callback *cb, struct mp4 **result)
Open an mp4 file in metadata-only mode.
Definition: mp4.c:841
BACKLOG
#define BACKLOG
Functions to support listening sockets.
Definition: net.h:55
hash2_to_asc
void hash2_to_asc(const unsigned char *hash, char *asc)
Convert a hash2 value to ascii format.
Definition: crypt_common.c:163
AUDIO_FILE_REMOVE
@ AUDIO_FILE_REMOVE
An audio file is about to be removed.
Definition: afs.h:47
lsu_com_help
int lsu_com_help(bool long_help, const struct lls_parse_result *lpr, const struct lls_suite *suite, const char *(*aux_info_cb)(unsigned cmd_num, bool verbose), char **result, unsigned *num_chars)
A generic implementation of the help subcommand.
Definition: lsu.c:107
vss_init
void vss_init(int afs_socket, struct sched *s)
Initialize the virtual streaming system task.
Definition: vss.c:1165
gui_theme::dflt
struct gui_color_spec dflt
Default color, see assume_default_colors(3).
Definition: gui.h:34
FOR_EACH_AUDIO_FORMAT
#define FOR_EACH_AUDIO_FORMAT(af)
Iterate over all supported audio formats.
Definition: audiod.c:189
OPT_STRING_VAL
#define OPT_STRING_VAL(_name)
Definition: gui.c:34
crypt_shutdown
void crypt_shutdown(void)
Allocate all resources of the crypto backend.
Definition: gcrypt.c:99
i9e_client_info::completers
struct i9e_completer * completers
The array of completers, one per command.
Definition: interactive.h:73
set_max_chunk_size
void set_max_chunk_size(struct afh_info *afhi)
Determine the maximal chunk size by investigating the chunk table.
Definition: afh_common.c:438
OPT_UINT32_VAL
#define OPT_UINT32_VAL(_name)
Definition: audioc.c:37
NUM_SUPPORTED_MIXERS
#define NUM_SUPPORTED_MIXERS
Definition: mixer.c:31
para_logname
__must_check __malloc char * para_logname(void)
Get the logname of the current user.
Definition: string.c:304
CL_EXECUTING
@ CL_EXECUTING
Command is executing.
Definition: client.h:20
receiver_node::private_data
void * private_data
Receiver-specific data.
Definition: recv.h:12
filter_setup
int filter_setup(const char *fa, void **conf, struct lls_parse_result **lprp)
Parse a filter command line and call the corresponding ->setup method.
Definition: filter_common.c:76
main
int main(int argc, char *argv[])
The client program to connect to para_server.
Definition: client.c:628
stdout_task::must_set_nonblock_flag
bool must_set_nonblock_flag
Whether we have to set STDOUT to nonblocking mode.
Definition: stdout.h:18
stat_item_values
char * stat_item_values[NUM_STAT_ITEMS]
The array of status items sent by para_server.
Definition: play.c:109
key_value_copy
char * key_value_copy(const char *src, size_t len, const char *key)
Copy the value of a key=value pair.
Definition: string.c:891
OPT_GIVEN
#define OPT_GIVEN(_name)
Definition: play.c:36
sched_write_ok
bool sched_write_ok(int fd, const struct sched *s)
Check whether writing is possible (i.e., does not block).
Definition: sched.c:560
user_list_deplete
void user_list_deplete(void)
Remove all entries from the user list.
Definition: user_list.c:48
btr_get_input_queue_size
size_t btr_get_input_queue_size(struct btr_node *btrn)
Return the amount of available input bytes of a buffer tree node.
Definition: buffer_tree.c:819
mp4_close
void mp4_close(struct mp4 *f)
Deallocate all resources associated with an mp4 file handle.
Definition: mp4.c:590
oac_custom_header_append
int oac_custom_header_append(ogg_packet *op, struct oac_custom_header *h)
Submit an ogg packet to a custom header structure.
Definition: ogg_afh_common.c:397
load_afd
int load_afd(int shmid, struct audio_file_data *afd)
Extract a afd stored in a shared memory area.
Definition: aft.c:646
stringify_port
const char * stringify_port(int port, const char *transport)
Stringify port number, resolve into service name where defined.
Definition: net.c:217
CRT_NONE
@ CRT_NONE
Everybody is happy.
Definition: play.c:50
mp4_callback::read
ssize_t(* read)(void *user_data, void *buffer, size_t length)
This should return the number of bytes read on success.
Definition: mp4.h:24
COLOR_TOP
@ COLOR_TOP
Definition: gui.c:80
lsg_write_cmd_com_file_user_data
struct writer lsg_write_cmd_com_file_user_data
the init function of the file writer
Definition: file_write.c:130
sched_shutdown
void sched_shutdown(struct sched *s)
Deallocate all resources of all tasks of a scheduler instance.
Definition: sched.c:204
set_max_chunk_size
void set_max_chunk_size(struct afh_info *afhi)
Determine the maximal chunk size by investigating the chunk table.
Definition: afh_common.c:438
mp4_metadata
An array of name/value pairs.
Definition: mp4.h:61
status_item_list
const char * status_item_list[]
The list of all status items used by para_{server,audiod,gui}.
Definition: audiod_command.c:82
get_vlc
int get_vlc(struct getbit_context *gbc, const struct vlc *vlc)
Parse a vlc code.
Definition: bitstream.c:172
crypt.h
Public crypto interface.
COLOR_MAXLEN
#define COLOR_MAXLEN
"\033[1;38;5;2xx;48;5;2xxm\0" is 23 bytes
Definition: color.h:5
lsg_write_cmd_com_ao_user_data
struct writer lsg_write_cmd_com_ao_user_data
Definition: ao_write.c:422
get_audio_file_path_of_row
int get_audio_file_path_of_row(const struct osl_row *row, char **path)
Get the path of an audio file, given a row of the audio file table.
Definition: aft.c:527
send_errctx
int send_errctx(struct command_context *cc, char *errctx)
Send an error context to a client,.
Definition: command.c:213
AFTCOL_HASH
@ AFTCOL_HASH
The hash on the content of the audio file.
Definition: aft.c:203
signal_task::fd
int fd
The signal pipe.
Definition: signal.h:10
stream_cipher_context::send
struct stream_cipher * send
Key used for sending data.
Definition: crypt.h:115
mp_semantic_value
The possible values of a node in the abstract syntax tree (AST).
Definition: mp.h:50
NUM_ATT_COLUMNS
@ NUM_ATT_COLUMNS
Number of columns in this table.
Definition: attribute.c:30
GF_BITS
#define GF_BITS
Code over GF(256).
Definition: fec.c:45
mp_free_ast
void mp_free_ast(struct mp_ast_node *root)
Deallocate an abstract syntax tree.
loglevels
loglevels
sample_format
Definition: para.h:215
now
const struct timeval * now
This is set by the scheduler at the beginning of its main loop.
Definition: sched.c:47
AFHI_CHANNELS_OFFSET
@ AFHI_CHANNELS_OFFSET
Number of channels is stored here.
Definition: aft.c:317
afs_info::num_played
uint32_t num_played
Counts how many times the file was selected.
Definition: afs.h:12
para_buffer
A string buffer used for para_printf().
Definition: string.h:12
vss_playing
unsigned int vss_playing(void)
Check if vss status flag P (playing) is set.
Definition: vss.c:748
uid_is_whitelisted
bool uid_is_whitelisted(uid_t uid)
Lookup the given UID in the whitelist.
Definition: audiod.c:1409
oac_custom_header_get
size_t oac_custom_header_get(char **buf, struct oac_custom_header *h)
Return the custom header buffer and deallocate resources.
Definition: ogg_afh_common.c:437
filter_node::lpr
struct lls_parse_result * lpr
The parsed command line, merged with options given in the config file.
Definition: filter.h:21
para_log
__printf_2_3 void(* para_log)(int, const char *,...)
The log function of para_gui, always set to curses_log().
Definition: gui.c:502
audio_format_name
const char * audio_format_name(int)
audio_format_handler
Definition: afh_common.c:56
ATOM_STSD
@ ATOM_STSD
Definition: mp4.c:161
mood_check_callback
int mood_check_callback(struct afs_callback_arg *aca)
Check all moods for syntax errors.
Definition: mood.c:216
mmd
struct misc_meta_data * mmd
Pointer to shared memory area for communication between para_server and its children.
Definition: server.c:52
spx_header_info::state
void * state
Holds the state of the decoder.
Definition: spx.h:15
recv_cred_buffer
int recv_cred_buffer(int fd, char *buf, size_t size)
Receive a buffer and the Unix credentials of the sending process.
Definition: net.c:1083
mixer::name
const char *const name
Used to identify the mixer.
Definition: mix.h:22
acl.h
Exported functions of acl.c.
mp_semantic_value::wc_pattern
struct mp_wc_pattern wc_pattern
Right-hand side operand of =|.
Definition: mp.h:54
DCCP_MAX_HEADER
#define DCCP_MAX_HEADER
Estimated worst-case length of a DCCP header including options.
Definition: dccp_send.c:101
score_open
void score_open(struct osl_table **result)
Allocate a score table instance.
Definition: score.c:308
read_size_header
int read_size_header(const char *buf)
Read a four-byte hex-number and return its value.
Definition: string.c:451
TOUCH_FLAG_VERBOSE
@ TOUCH_FLAG_VERBOSE
Activates verbose mode.
Definition: aft.c:2041
sc_new
struct stream_cipher * sc_new(const unsigned char *data, int len)
Allocate and initialize an aes_ctr128 stream cipher structure.
Definition: openssl.c:364
CWS_NEED_HEADER
@ CWS_NEED_HEADER
Initial state, less than WAV_HEADER_LEN bytes available.
Definition: check_wav.c:22
connect_local_socket
int connect_local_socket(const char *name)
Prepare, create, and connect to a Unix domain socket for local communication.
Definition: net.c:988
btr_pushdown_one
void btr_pushdown_one(struct btr_node *btrn)
Feed the next buffer of the input queue through the output channel.
Definition: buffer_tree.c:520
sender_status::client_list
struct list_head client_list
The list of connected clients.
Definition: send.h:187
lsg_recv_cmd_com_http_user_data
const struct receiver lsg_recv_cmd_com_http_user_data
Definition: http_recv.c:170
command.h
The structure of server and afs commands.
main
int main(int argc, char *argv[])
The main function of para_mixer.
Definition: mixer.c:570
FEC_SWAP
#define FEC_SWAP(a, b)
Swap two numbers.
Definition: fec.c:237
GET_NUM_DIGITS
#define GET_NUM_DIGITS(x, num)
Compute the number of (decimal) digits of a number.
Definition: aft.c:703
lsg_filter_cmd_com_spxdec_user_data
const struct filter lsg_filter_cmd_com_spxdec_user_data
Definition: spxdec_filter.c:305
ALARM_TIMEOUT
#define ALARM_TIMEOUT
Shut down non-authorized connections after that many seconds.
Definition: server.c:46
tv_scale
void tv_scale(const unsigned long mult, const struct timeval *tv, struct timeval *result)
Compute integer multiple of given struct timeval.
Definition: time.c:91
COLOR_RESET
#define COLOR_RESET
Switch back to normal colors.
Definition: color.h:8
para_mkdir
int para_mkdir(const char *path)
Create a directory, don't fail if it already exists.
Definition: fd.c:401
client_parse_config
int client_parse_config(int argc, char *argv[], struct client_task **ct_ptr, int *loglevel)
Parse a client configuration.
Definition: client_common.c:555
SBD_ERROR_LOG
@ SBD_ERROR_LOG
Definition: sideband.h:66
misc_meta_data::loglevel
int loglevel
Set by the ll command.
Definition: server.h:77
ATTCOL_BITNUM
@ ATTCOL_BITNUM
The bit number (0-63).
Definition: attribute.c:26
generic_sender_status
__malloc char * generic_sender_status(struct sender_status *ss, const char *name)
Return a string containing the current status of a sender.
Definition: send_common.c:184
afh_info::frequency
uint16_t frequency
Frequency in Hz.
Definition: afh.h:54
sched_request_timeout
void sched_request_timeout(struct timeval *to, struct sched *s)
Impose an upper bound for the I/O timeout.
Definition: sched.c:375
afh_get_start_chunk
int32_t afh_get_start_chunk(int32_t approx_chunk_num, const struct afh_info *afhi, uint8_t audio_format_id)
Find a suitable start chunk.
Definition: afh_common.c:313
CAB_LPR_OFFSET
@ CAB_LPR_OFFSET
Start of the (serialized) lopsub parse result.
Definition: aft.c:1567
wma.h
The asf_header structure and public wma function declarations.
grab_flags
grab_flags
Flags specified as arguments to the grab command.
Definition: grab_client.c:34
sched_monitor_writefd
void sched_monitor_writefd(int fd, struct sched *s)
Instruct the scheduler to monitor an fd for readiness for writing.
Definition: sched.c:512
audiod_status
int audiod_status
The current mode of operation (AUDIOD_OFF, AUDIOD_ON or AUDIOD_STANDBY).
Definition: audiod.c:166
btr_search_node
struct btr_node * btr_search_node(const char *name, struct btr_node *root)
Find the node with the given name in the buffer tree.
Definition: buffer_tree.c:1157
i9e_log
__printf_2_3 void i9e_log(int ll, const char *fmt,...)
The log function of the i9e subsystem.
Definition: interactive.c:526
LS_SORT_BY_CHANNELS
@ LS_SORT_BY_CHANNELS
-s=c
Definition: aft.c:59
para_open
int para_open(const char *path, int flags, mode_t mode)
Wrapper for the open(2) system call.
Definition: fd.c:380
misc_meta_data::afd
struct audio_file_data afd
Describes the current audio file.
Definition: server.h:79
DEFINE_BLOB_FUNCTIONS
#define DEFINE_BLOB_FUNCTIONS(table_name, short_name, c_short_name)
Define all functions for this blob type.
Definition: blob.c:637
afh_info::tags
struct taginfo tags
Id3 tags, vorbis comments, aac tags.
Definition: afh.h:33
SERVER_CMD_UINT32_VAL
#define SERVER_CMD_UINT32_VAL(_cmd, _opt, _lpr)
Fetch the (first) argument given to an option of type uint32.
Definition: command.h:47
gui_color_pair
gui_color_pair
Codes for various colors.
Definition: gui.c:73
LS_SORT_BY_NUM_PLAYED
@ LS_SORT_BY_NUM_PLAYED
-s=n
Definition: aft.c:57
sched
struct sched sched
The scheduler instance of para_audiod.
Definition: audiod.c:124
PM_SKIP_EMPTY_NAME
@ PM_SKIP_EMPTY_NAME
If the data in match_column is the empty string, skip this row.
Definition: afs.h:125
lsg_filter_cmd_com_wav_user_data
const struct filter lsg_filter_cmd_com_wav_user_data
Definition: wav_filter.c:118
AFS_WRITE
@ AFS_WRITE
Read-only operation on the AFS database.
Definition: user_list.h:16
stdout_task::btrn
struct btr_node * btrn
Stdout is always a leaf node in the buffer tree.
Definition: stdout.h:14
GUI_COMMANDS
#define GUI_COMMANDS
Definition: gui.c:93
NB_LSP_COEFS
#define NB_LSP_COEFS
Definition: wmadata.h:79
para_mmap
int para_mmap(size_t length, int prot, int flags, int fd, void *map)
Paraslash's wrapper for mmap.
Definition: fd.c:351
BLOBCOL_NAME
@ BLOBCOL_NAME
The unique name of the blob.
Definition: afs.h:314
check_writer_arg_or_die
int check_writer_arg_or_die(const char *wa, struct lls_parse_result **lprp)
Check if the given string is a valid command line for any writer.
Definition: write_common.c:79
para_realloc
__must_check void * para_realloc(void *p, size_t size)
Paraslash's version of realloc().
Definition: string.c:116
read_ok
int read_ok(int fd)
Check a file descriptor for readability.
Definition: fd.c:539
btr_context
void * btr_context(struct btr_node *btrn)
Obtain the context of a buffer node tree.
Definition: buffer_tree.c:936
search_pattern
const char * search_pattern(const char *pattern, int pattern_len, const char *buf, int buf_size)
Find the first occurrence of the given pattern.
Definition: wma_common.c:24
sender_status::num_listen_fds
unsigned num_listen_fds
Number of sockets to listen on, size of the two arrays below.
Definition: send.h:171
audio_format_handler::get_header
void(* get_header)(void *map, size_t mapsize, char **buf, size_t *len)
Optional, used for header-rewriting.
Definition: afh.h:97
sb_sent
bool sb_sent(struct sb_context *c, size_t nbytes)
Update the sideband context after data has been sent.
Definition: sideband.c:160
mp_new_ast_leaf_node
struct mp_ast_node * mp_new_ast_leaf_node(int id)
Allocate a new leaf node for the abstract syntax tree.
find_openssh_bignum_offset
int find_openssh_bignum_offset(const unsigned char *data, int len)
Check header of an openssh private key and compute bignum offset.
Definition: crypt_common.c:200
FOR_EACH_LISTEN_FD
#define FOR_EACH_LISTEN_FD(_n, _ss)
Iterate over all listening addresses of the http/dccp sender.
Definition: send.h:191
asf_header_info::use_exp_vlc
bool use_exp_vlc
Whether exponents are coded with VLC codes.
Definition: wma.h:26
mp4_update_meta
int mp4_update_meta(struct mp4 *f)
Write back the modified metadata items to the mp4 file.
Definition: mp4.c:999
OPT_RESULT
#define OPT_RESULT(_cmd, _opt)
Definition: mixer.c:37
i9e_poll
int i9e_poll(struct pollfd *fds, nfds_t nfds, int timeout)
Wrapper for poll(2) which handles EINTR and returns paraslash error codes.
Definition: interactive.c:606
btr_next_buffer_omit
size_t btr_next_buffer_omit(struct btr_node *btrn, size_t omit, char **bufp)
Obtain the next buffer of the input queue, omitting data.
Definition: buffer_tree.c:622
CMD_PTR
#define CMD_PTR
Definition: recv.c:25
AUTH_REQUEST_MSG
#define AUTH_REQUEST_MSG
Sent by para_client to initiate the authentication procedure.
Definition: para.h:79
para_atoi32
int para_atoi32(const char *str, int32_t *value)
Convert a string to a 32-bit signed integer value.
Definition: string.c:604
generic_acl_deplete
void generic_acl_deplete(struct list_head *acl)
Empty the access control list of a sender.
Definition: send_common.c:248
get_random_bytes_or_die
void get_random_bytes_or_die(unsigned char *buf, int num)
Fill a buffer with random content.
Definition: gcrypt.c:65
score_update
int score_update(const struct osl_row *aft_row, long percent)
Replace a row of the score table.
Definition: score.c:136
for_each_line
int for_each_line(unsigned flags, char *buf, size_t size, line_handler_t *line_handler, void *private_data)
Call a custom function for each complete line.
Definition: string.c:382
DEFINE_PARA_ERRLIST
DEFINE_PARA_ERRLIST
Array of error strings.
Definition: gui.c:27
para_exec_cmdline_pid
int para_exec_cmdline_pid(pid_t *pid, const char *cmdline, int *fds)
Exec the given command.
Definition: exec.c:133
OSL_ERRNO_TO_PARA_ERROR
#define OSL_ERRNO_TO_PARA_ERROR(num)
Set the osl error bit for the given number.
Definition: error.h:277
now
const struct timeval * now
This is set by the scheduler at the beginning of its main loop.
Definition: sched.c:47
MCF_OVERRIDE
@ MCF_OVERRIDE
Whether the options specified in the configuration file should override the currently effective optio...
Definition: lsu.h:18
sc_free
void sc_free(struct stream_cipher *sc)
Deallocate a stream cipher structure.
Definition: gcrypt.c:638
list_first_entry
#define list_first_entry(ptr, type, member)
Get the first element of a list.
Definition: list.h:162
stream_cipher_context::fd
int fd
The socket file descriptor.
Definition: crypt.h:111
oac_callback_info::private_data
void * private_data
Data specific to the audio format handler.
Definition: ogg_afh_common.h:35
decode_public_key
int decode_public_key(const char *filename, unsigned char **blob, size_t *decoded_size)
Perform sanity checks and base64-decode an ssh-rsa key.
Definition: crypt_common.c:88
VSS_STATUS_FLAG_NEXT
@ VSS_STATUS_FLAG_NEXT
Whether the 'N' flag is set.
Definition: audiod.c:113
CMD_PTR
#define CMD_PTR
Definition: upgrade_db.c:17
sc_free
void sc_free(struct stream_cipher *sc)
Deallocate a stream cipher structure.
Definition: openssl.c:375
MAX_COMMAND_LEN
#define MAX_COMMAND_LEN
Commands including options must be shorter than this.
Definition: command.c:43
score_add
int score_add(const struct osl_row *aft_row, long score, struct osl_table *t)
Add a (row, score) pair to the score table.
Definition: score.c:99
gui_theme::cols_min
int cols_min
Minimal admissible number of columns to display this theme.
Definition: gui.h:42
afh_get_afhi_txt
unsigned afh_get_afhi_txt(int audio_format_num, struct afh_info *afhi, char **result)
Pretty-print the contents of a struct afh_info into a buffer.
Definition: afh_common.c:393
PKT_OPENSSH
#define PKT_OPENSSH
OPENSSH keys (since openssh-7.8, paraslash.0.6.3)
Definition: crypt_backend.h:17
LLS_ERRNO_TO_PARA_ERROR
#define LLS_ERRNO_TO_PARA_ERROR(num)
Set the lopsub error bit for the error code.
Definition: error.h:280
afh_get_chunk
__must_check int afh_get_chunk(long unsigned chunk_num, struct afh_info *afhi, uint8_t audio_format_id, const void *map, size_t mapsize, const char **buf, uint32_t *len, void **afh_context)
Get one chunk of audio data.
Definition: afh_common.c:248
fd.h
exported symbols from fd.c
signal_shutdown
void signal_shutdown(struct signal_task *st)
Close the write end of the signal pipe, deallocate resources.
Definition: signal.c:233
stdin_task::btrn
struct btr_node * btrn
Stdin is always the root of a buffer tree.
Definition: stdin.h:10
main
int main(int argc, char *argv[])
The client program to connect to para_audiod.
Definition: audioc.c:331
btr_get_node_start
void btr_get_node_start(struct btr_node *btrn, struct timeval *tv)
Get the time of the first I/O for a buffer tree node.
Definition: buffer_tree.c:1233
mmd_mutex
int mmd_mutex
The mutex protecting the shared memory area containing the mmd struct.
Definition: server.c:77
format_url
__malloc char * format_url(const char *url, int default_port)
Pretty-print a host/port pair.
Definition: net.c:193
check_receiver_arg
int check_receiver_arg(const char *ra, struct lls_parse_result **lprp)
Check if the given string is a valid receiver specifier.
Definition: recv_common.c:35
tv_diff
int tv_diff(const struct timeval *b, const struct timeval *a, struct timeval *diff)
Compute the difference of two time values.
Definition: time.c:42
daemon_close_log
void daemon_close_log(void)
Close the log file of the daemon.
Definition: daemon.c:275
SBD_DEBUG_LOG
@ SBD_DEBUG_LOG
Definition: sideband.h:66
audio_format_handler::rewrite_tags
int(* rewrite_tags)(const char *map, size_t mapsize, struct taginfo *tags, int output_fd, const char *filename)
Write audio file with altered tags, optional.
Definition: afh.h:124
fec_encode
void fec_encode(struct fec_parms *parms, const unsigned char *const *src, unsigned char *dst, int idx, int sz)
Compute one encoded slice of the given input.
Definition: fec.c:516
open_and_update_audio_file
int open_and_update_audio_file(int *fd)
Open the audio file with highest score and set up an afd structure.
Definition: aft.c:1043
spx_header_info::mode
const SpeexMode * mode
Narrow/wide/ultrawide band, bitstream version.
Definition: spx.h:31
get_attribute_text
int get_attribute_text(uint64_t *atts, const char *delim, char **text)
Get a string containing the set attributes in text form.
Definition: attribute.c:385
OPT_UINT32_VAL
#define OPT_UINT32_VAL(_name)
Definition: play.c:37
write_ok
int write_ok(int fd)
Check a file descriptor for writability.
Definition: fd.c:556
ASN1_TYPE_INTEGER
@ ASN1_TYPE_INTEGER
The next object is an integer.
Definition: gcrypt.c:127
btr_pool_get_buffer
size_t btr_pool_get_buffer(struct btr_pool *btrp, char **result)
Obtain the current write head.
Definition: buffer_tree.c:159
send_sb
int send_sb(struct stream_cipher_context *scc, void *buf, size_t numbytes, int band, bool dont_free)
Send a sideband packet through a blocking file descriptor.
Definition: command.c:146
OPT_GIVEN
#define OPT_GIVEN(_opt, _lpr)
Definition: resample_filter.c:20
CLIENT_OPT_GIVEN
#define CLIENT_OPT_GIVEN(_name, _lpr)
Definition: client.h:52
sb_new_recv
struct sb_context * sb_new_recv(size_t max_size, sb_transformation t, void *trafo_context)
Prepare to receive a sideband packet.
Definition: sideband.c:37
sb_free
void sb_free(struct sb_context *c)
Deallocate all memory associated with a sideband handle.
Definition: sideband.c:105
opus_header::input_sample_rate
uint32_t input_sample_rate
Sample rate of the input stream, used by the audio format handler.
Definition: opus_common.h:17
para_log
__printf_2_3 void(* para_log)(int, const char *,...)
The log function of para_gui, always set to curses_log().
Definition: afh.c:28
mp4_metadata::tags
struct mp4_tag * tags
It's OK to change this, for example by calling realloc().
Definition: mp4.h:63
para_sigaction
void para_sigaction(int sig, void(*handler)(int))
Install the given handler for the given signal.
Definition: signal.c:129
i9e_log
__printf_2_3 void i9e_log(int ll, const char *fmt,...)
The log function of the i9e subsystem.
Definition: interactive.c:526
PBF_SIZE_PREFIX
@ PBF_SIZE_PREFIX
Prefix each buffer with its length.
Definition: string.h:8
list_head
A list head is just a pair of pointers.
Definition: list.h:17
alloc
__must_check __malloc void * alloc(size_t size)
Paraslash's version of malloc().
Definition: string.c:133
OPT_UINT32_VAL
#define OPT_UINT32_VAL(_name)
Definition: filter.c:31
get_attribute_bitmap
void get_attribute_bitmap(const uint64_t *atts, char *buf)
Return a binary representation of the given attribute value.
Definition: attribute.c:365
mp_semantic_value::re_pattern
struct mp_re_pattern re_pattern
Right-hand side operand of =~.
Definition: mp.h:55
BTR_NT_LEAF
@ BTR_NT_LEAF
Definition: buffer_tree.h:116
VSS_READ
@ VSS_READ
Read-write operation on the AFS database.
Definition: user_list.h:17
cq_dequeue
void cq_dequeue(struct chunk_queue *cq)
Remove the current chunk from the queue.
Definition: chunk_queue.c:83
daemon_log
__printf_2_3 void daemon_log(int ll, const char *fmt,...)
The log function for para_server and para_audiod.
Definition: daemon.c:444
sched_read_ok
bool sched_read_ok(int fd, const struct sched *s)
Check whether there is data to read on the given fd.
Definition: sched.c:545
btr_next_buffer_omit
size_t btr_next_buffer_omit(struct btr_node *btrn, size_t omit, char **bufp)
Obtain the next buffer of the input queue, omitting data.
Definition: buffer_tree.c:622
para_buffer::flags
unsigned flags
Definition: string.h:20
FEC_EOF_PACKET
#define FEC_EOF_PACKET
Data that indicates an eof-condition for a fec-encoded stream.
Definition: para.h:176
ATOM_STBL
@ ATOM_STBL
Definition: mp4.c:161
para_realloc
__must_check void * para_realloc(void *p, size_t size)
Paraslash's version of realloc().
Definition: string.c:116
AES_CRT128_BLOCK_SIZE
#define AES_CRT128_BLOCK_SIZE
AES block size in bytes.
Definition: crypt_backend.h:8
client_task::key_file
char * key_file
The RSA private key.
Definition: client.h:40
ATTACH_RO
@ ATTACH_RO
Definition: ipc.h:4
flowopt_add
void flowopt_add(struct flowopts *fo, int level, int opt, const char *name, const void *val, int len)
Append new socket option to flowopt queue.
Definition: net.c:318
DECL_FFT
#define DECL_FFT(n, n2, n4)
Definition: imdct.c:166
afh.h
Structures for audio format handling (para_server).
vss_paused
unsigned int vss_paused(void)
Check if the vss is currently paused.
Definition: vss.c:781
tv_add
void tv_add(const struct timeval *a, const struct timeval *b, struct timeval *sum)
Add two time values.
Definition: time.c:72
check_wav_pre_monitor
void check_wav_pre_monitor(struct sched *s, struct check_wav_context *cwc)
Request a minimal timeout if not idle.
Definition: check_wav.c:50
fec_group_usability
fec_group_usability
The different states of a complete FEC group.
Definition: fecdec_filter.c:252
FOR_EACH_FRAME
#define FOR_EACH_FRAME(_f, _buf, _size, _ps)
Definition: wma_afh.c:17
mutex_destroy
int mutex_destroy(int id)
Destroy a mutex.
Definition: ipc.c:38
EXPORT_AUDIOD_CMD_HANDLER
#define EXPORT_AUDIOD_CMD_HANDLER(_cmd)
Define the user_data pointer as expected by lopsub.
Definition: audiod_command.c:47
i9e_attach_to_stdout
void i9e_attach_to_stdout(struct btr_node *producer)
Prepare writing to stdout.
Definition: interactive.c:193
filter
Describes a method to convert audio data.
Definition: filter.h:44
vlc::table
int16_t(* table)[2]
The code and the bits table.
Definition: bitstream.h:26
afh_supports_dynamic_chunks
bool afh_supports_dynamic_chunks(int audio_format_id)
Tell whether an audio format handler provides chunk tables.
Definition: afh_common.c:89
RECV_CMD
#define RECV_CMD(_num)
Definition: recv.h:81
read_and_compare
int read_and_compare(int fd, const char *expectation)
Read a buffer and compare its contents to a string, ignoring case.
Definition: fd.c:278
MIN_FRAME_SIZE
#define MIN_FRAME_SIZE
Definition: mp3_afh.c:29
afh_close
void afh_close(void *afh_context, uint8_t audio_format_id)
Deallocate resources allocated due to dynamic chunk handling.
Definition: afh_common.c:287
btr_merge
void btr_merge(struct btr_node *btrn, size_t dest_size)
Combine input queue buffers.
Definition: buffer_tree.c:1101
filter_node::btrn
struct btr_node * btrn
The buffer tree node.
Definition: filter.h:23
FOR_EACH_SENDER
#define FOR_EACH_SENDER(_i)
Iterate over all senders.
Definition: send.h:115
daemon_get_loglevel
int daemon_get_loglevel(void)
Get the current log level of the daemon.
Definition: daemon.c:163
apc_priv_decrypt
int apc_priv_decrypt(const char *key_file, unsigned char *outbuf, unsigned char *inbuf, int inlen)
Decrypt a buffer using a private key.
Definition: openssl.c:313
lsg_filter_cmd_com_opusdec_user_data
const struct filter lsg_filter_cmd_com_opusdec_user_data
Definition: opusdec_filter.c:286
shm_detach
int shm_detach(void *addr)
Detach a shared memory segment.
Definition: ipc.c:189
asf_header_info::use_bit_reservoir
bool use_bit_reservoir
If false, a frame is equal to a superframe.
Definition: wma.h:28
filter_node::private_data
void * private_data
Each filter may store any filter-specific information about the particular instance of the filter her...
Definition: filter.h:15
print_writer_helps
void print_writer_helps(bool detailed)
Print the help text of all writers to stdout.
Definition: write_common.c:153
tv_scale
void tv_scale(const unsigned long mult, const struct timeval *tv, struct timeval *result)
Compute integer multiple of given struct timeval.
Definition: time.c:91
status_item_list
const char * status_item_list[]
status items
Definition: afh_common.c:15
lsu.h
Lopsub Utilities, enums and public functions.
WRITE_CMD_OPT_UINT32_VAL
#define WRITE_CMD_OPT_UINT32_VAL(_cmd, _opt, _lpr)
Definition: write.h:61
OPT_UINT32_VAL
#define OPT_UINT32_VAL(_name)
Definition: audiod.c:46
afh_rewrite_tags
int afh_rewrite_tags(int audio_format_id, void *map, size_t mapsize, struct taginfo *tags, int output_fd, const char *filename)
Create a copy of the given file with altered meta tags.
Definition: afh_common.c:476
free_sender_status
void free_sender_status(const struct sender_status *ss)
Deallocate all resources allocated in init_sender_status().
Definition: send_common.c:166
DEFINE_PARA_ERRLIST
DEFINE_PARA_ERRLIST
Array of error strings.
Definition: audioc.c:27
flowopt_cleanup
void flowopt_cleanup(struct flowopts *fo)
Deallocate all resources of a flowopts structure.
Definition: net.c:363
add_close_on_fork_list
void add_close_on_fork_list(int fd)
Add one file descriptor to the close-on-fork list.
Definition: close_on_fork.c:32
LS_SORT_BY_HASH
@ LS_SORT_BY_HASH
-s=h
Definition: aft.c:65
afs_callback_arg
Arguments passed to each afs callback.
Definition: afs.h:153
load_afd
int load_afd(int shmid, struct audio_file_data *afd)
Extract a afd stored in a shared memory area.
Definition: aft.c:646
afsi_change_event_data
Used as data for afs_event() for events of type ATTRIBUTE_AFSI_CHANGE.
Definition: afs.h:69
gui_theme::output
struct gui_color_spec output
Color for stdout of the executing process.
Definition: gui.h:50
list_head::next
struct list_head * next
Pointer to the next list entry.
Definition: list.h:19
LSP_POW_BITS
#define LSP_POW_BITS
Definition: wmadec_filter.c:51
pattern_match_data::loop_col_num
unsigned loop_col_num
Determines the loop order.
Definition: afs.h:133
writer_get
const struct writer * writer_get(int wid)
Return the writer structure from a writer ID.
Definition: write_common.c:44
OPT_STRING_VAL
#define OPT_STRING_VAL(_name, _lpr)
Definition: recv.c:30
audio_file_loop
int audio_file_loop(void *private_data, osl_rbtree_loop_func *func)
Call the given function for each file in the audio file table.
Definition: aft.c:1536
makesock
int makesock(unsigned l4type, bool passive, const char *host, uint16_t port_number, struct flowopts *fo)
Generic socket creation (passive and active sockets).
Definition: net.c:512
touch_flags
touch_flags
Flags used by the touch command.
Definition: aft.c:2037
extract_v4_addr
void extract_v4_addr(const struct sockaddr_storage *ss, struct in_addr *ia)
Extract IPv4 or IPv6-mapped-IPv4 address from sockaddr_storage.
Definition: net.c:721
ATOM_STSC
@ ATOM_STSC
Definition: mp4.c:161
WRITE_CMD_OPT_GIVEN
#define WRITE_CMD_OPT_GIVEN(_cmd, _opt, _lpr)
Definition: write.h:59
command_context
Per connection data available to command handlers.
Definition: command.h:4
xrename
int xrename(const char *oldpath, const char *newpath)
Change the name or location of a file.
Definition: fd.c:28
i9e_print_completions
int i9e_print_completions(struct i9e_completer *completers)
Print possible completions to stdout.
Definition: interactive.c:738
btr_pool_size
size_t btr_pool_size(struct btr_pool *btrp)
Return the size of the buffer pool area.
Definition: buffer_tree.c:106
com_add_buffer_offsets
com_add_buffer_offsets
The format of the data stored by save_audio_file_data().
Definition: aft.c:1561
sb_new_recv
struct sb_context * sb_new_recv(size_t max_size, sb_transformation t, void *trafo_context)
Prepare to receive a sideband packet.
Definition: sideband.c:37
HTTP_STREAMING
@ HTTP_STREAMING
Definition: http_recv.c:31
ATOM_ITEMS
#define ATOM_ITEMS
A macro defining the atoms we care about.
Definition: mp4.c:135
BLOB_ADD
@ BLOB_ADD
A new blob was added.
Definition: afs.h:49
misc_meta_data::num_connects
unsigned int num_connects
The number of connections para_server received so far.
Definition: server.h:69
LS_MODE_CHUNKS
@ LS_MODE_CHUNKS
-l=m
Definition: aft.c:74
playlist_loop
int playlist_loop(struct playlist_instance *pi, osl_rbtree_loop_func *func, void *data)
Iterate over all admissible audio files of a playlist instance.
Definition: playlist.c:209
sender_command_data::cmd_num
int cmd_num
Greater than zero indicates that a sender cmd is already queued.
Definition: server.h:11
get_vlc
int get_vlc(struct getbit_context *gbc, const struct vlc *vlc)
Parse a vlc code.
Definition: bitstream.c:172
server_get_tasks
char * server_get_tasks(void)
Return the list of tasks for the server process.
Definition: server.c:129
generic_max_transport_msg_size
int generic_max_transport_msg_size(int sockfd)
Get the maximum transport-layer message size (MMS_S).
Definition: net.c:658
i9e_completion_info
Structure passed as input to the completers.
Definition: interactive.h:8
misc_meta_data::sender_cmd_data
struct sender_command_data sender_cmd_data
Used by the sender command.
Definition: server.h:75
close_listed_fds
void close_listed_fds(void)
Close all fds in the list and destroy all list entries.
Definition: close_on_fork.c:88
sanitize_str
__must_check int sanitize_str(const char *src, size_t max_width, char **result, size_t *width)
Truncate and sanitize a (wide character) string.
Definition: string.c:1055
TELL_CB_DUMMY_VAL
#define TELL_CB_DUMMY_VAL
Definition: flacdec_filter.c:93
afh_free_header
void afh_free_header(char *header_buf, uint8_t audio_format_id)
Deallocate any resources obtained from afh_get_header().
Definition: afh_common.c:373
misc_meta_data::vss_status_flags
unsigned int vss_status_flags
The "old" status flags – commands may only read them.
Definition: server.h:44
OPT_INT32_VAL
#define OPT_INT32_VAL(_name)
The (first) argument to a server option of type int32.
Definition: server.h:99
sb_buffer::band
uint8_t band
The band designator.
Definition: sideband.h:85
SENDER_allow
@ SENDER_allow
Allow connections from given IP address(es).
Definition: send.h:27
para_buffer::size
size_t size
The size of buf.
Definition: string.h:16
SBD_EXIT__FAILURE
@ SBD_EXIT__FAILURE
Definition: sideband.h:66
dccp_available_ccids
int dccp_available_ccids(uint8_t **ccid_array)
Probe the list of DCCP CCIDs configured on this host.
Definition: net.c:851
grab_mode
grab_mode
How to handle blocking writes for the grab client fds.
Definition: grab_client.c:24
gf_mul
#define gf_mul(x, y)
Multiply two GF numbers.
Definition: fec.c:74
base64.h
uudecode/base64 API.
para_log
__printf_2_3 void(* para_log)(int, const char *,...)
Definition: audiod.c:48
ogg_afh
const struct audio_format_handler ogg_afh
The ogg vorbis audio format handler.
Definition: ogg_afh.c:182
blob_table_columns
blob_table_columns
blob_symbols
Definition: afs.h:310
flowopt_new
struct flowopts * flowopt_new(void)
Allocate and initialize a flowopt queue.
Definition: net.c:298
FOR_EACH_KEY_MAP
#define FOR_EACH_KEY_MAP(_i)
Definition: gui.c:36
btr_parent
struct btr_node * btr_parent(struct btr_node *btrn)
Get the parent node of a buffer tree node.
Definition: buffer_tree.c:1248
sched_monitor_readfd
void sched_monitor_readfd(int fd, struct sched *s)
Instruct the scheduler to monitor an fd for readiness for reading.
Definition: sched.c:499
HTTP_SENT_GET_REQUEST
@ HTTP_SENT_GET_REQUEST
Definition: http_recv.c:31
daemon_init_colors_or_die
bool daemon_init_colors_or_die(int color_arg, int color_arg_auto, int color_arg_no, bool logfile_given)
Initialize color mode if necessary.
Definition: daemon.c:108
theme_init
void theme_init(const char *name, struct gui_theme *t)
Initialize a theme.
Definition: gui_theme.c:394
get_btr_channels
int get_btr_channels(struct btr_node *btrn, int32_t *result)
Ask parent btr nodes for the channel count of the current stream.
Definition: write_common.c:218
GF_SIZE
#define GF_SIZE
The largest number in GF(256)
Definition: fec.c:47
apc_get_pubkey
int apc_get_pubkey(const char *key_file, struct asymmetric_key **result)
Read an asymmetric key from a file.
Definition: gcrypt.c:426
score_loop
int score_loop(osl_rbtree_loop_func *func, struct osl_table *t, void *data)
Call the given function for each row of the score table.
Definition: score.c:209
fec_client_parms::data_slices_per_group
uint8_t data_slices_per_group
Number of slices minus number of redundant slices.
Definition: send.h:149
ringbuffer_get
void * ringbuffer_get(struct ringbuffer *rb, int num)
Get one entry from a ringbuffer.
Definition: ringbuffer.c:83
TS_DEAD
@ TS_DEAD
Task has been reaped and may be removed from the task list.
Definition: sched.c:28
audio_format_handler::close
void(* close)(void *afh_context)
Deallocate the resources occupied by ->open().
Definition: afh.h:117
EMPTY_STATUS_ITEMS
#define EMPTY_STATUS_ITEMS
These status items are cleared if no audio file is currently open.
Definition: command.c:424
MP3DEC_MAX_FRAME
#define MP3DEC_MAX_FRAME
Definition: mp3dec_filter.c:74
SENDER_deny
@ SENDER_deny
Deny connections from given IP address(es).
Definition: send.h:27
filter::teardown
void(* teardown)(const struct lls_parse_result *lpr, void *conf)
Deallocate precomputed resources.
Definition: filter.h:85
interactive.h
Public API for interactive sessions.
acl_add_entry
void acl_add_entry(struct list_head *acl, char *addr, int netmask)
Add an entry to an access control list.
Definition: acl.c:82
VSS_NOMORE
#define VSS_NOMORE
Stop playing after current audio file.
Definition: vss.h:15
sender::shutdown
void(* shutdown)(void)
Dellocate all resources.
Definition: send.h:92
score_delete
int score_delete(const struct osl_row *aft_row)
Remove an entry from the rbtree of admissible files.
Definition: score.c:247
mood_unload
void mood_unload(struct mood_instance *m)
Free all resources of a mood instance.
Definition: mood.c:563
btr_add_output
void btr_add_output(char *buf, size_t size, struct btr_node *btrn)
Insert a malloced buffer into the buffer tree.
Definition: buffer_tree.c:381
error.h
List of error codes and messages.
IS_OSL_ERROR
#define IS_OSL_ERROR(num)
Check whether the osl error bit is set.
Definition: error.h:268
task_register
struct task * task_register(struct task_info *info, struct sched *s)
Add a task to the scheduler task list.
Definition: sched.c:228
filter::setup
void *(* setup)(const struct lls_parse_result *lpr)
Prepare the filter according to command line options.
Definition: filter.h:79
writer::close
void(* close)(struct writer_node *)
Close one instance of the writer.
Definition: write.h:45
afs_init
__noreturn void afs_init(int socket_fd)
Initialize the audio file selector process.
Definition: afs.c:926
print_receiver_helps
void print_receiver_helps(bool detailed)
Print out the help texts to all receivers.
Definition: recv_common.c:80
lsg_recv_cmd_com_afh_user_data
const struct receiver lsg_recv_cmd_com_afh_user_data
Definition: afh_recv.c:242
compute_afhi
int compute_afhi(const char *path, char *data, size_t size, int fd, struct afh_info *afhi)
Call get_file_info() to obtain an afhi structure.
Definition: afh_common.c:160
para_block_signal
void para_block_signal(int sig)
Block a signal for the caller.
Definition: signal.c:175
HEADER_LEN_OFFSET
@ HEADER_LEN_OFFSET
The length of the audio file header (4 bytes).
Definition: aft.c:309
register_writer_node
void register_writer_node(struct writer_node *wn, struct btr_node *parent, struct sched *s)
Open a writer node and register the corresponding task.
Definition: write_common.c:132
para_strcat
__must_check __malloc char * para_strcat(char *a, const char *b)
Paraslash's version of strcat().
Definition: string.c:282
daemon_set_hooks
void daemon_set_hooks(void(*pre_log_hook)(void), void(*post_log_hook)(void))
Register functions to be called before and after a message is logged.
Definition: daemon.c:184
LS_MODE_SHORT
@ LS_MODE_SHORT
Default listing mode.
Definition: aft.c:70
skip_cells
int skip_cells(const char *s, size_t cells_to_skip, size_t *result)
Skip a given number of cells at the beginning of a string.
Definition: string.c:956
para_log
__printf_2_3 void(* para_log)(int, const char *,...)
Definition: audioc.c:40
AFHI_MAX_CHUNK_SIZE_OFFSET
@ AFHI_MAX_CHUNK_SIZE_OFFSET
Size of the largest chunk in bytes.
Definition: aft.c:311
get_attribute_text
int get_attribute_text(uint64_t *atts, const char *delim, char **text)
Get a string containing the set attributes in text form.
Definition: attribute.c:385
theme_prev
void theme_prev(struct gui_theme *t)
Activate the previous available theme.
Definition: gui_theme.c:419
main
int main(int argc, char *argv[])
The main function of para_filter.
Definition: filter.c:103
AFS_CLIENT_TIMEOUT
#define AFS_CLIENT_TIMEOUT
Shutdown connection if query has not arrived until this many seconds.
Definition: afs.c:849
btr_next_buffer
size_t btr_next_buffer(struct btr_node *btrn, char **bufp)
Obtain the next buffer of the input queue of a buffer tree node.
Definition: buffer_tree.c:687
task_status
int task_status(const struct task *t)
Return the status value of a task.
Definition: sched.c:324
mp4_get_duration
uint64_t mp4_get_duration(const struct mp4 *f)
Compute the duration of an mp4 file.
Definition: mp4.c:713
audiod_get_decoder_flags
__malloc char * audiod_get_decoder_flags(void)
Return the flags for the decoder_flags status item.
Definition: audiod.c:220
zalloc
__must_check __malloc void * zalloc(size_t size)
Allocate and initialize memory.
Definition: string.c:97
wma_afh
const struct audio_format_handler wma_afh
The audio format handler for Windows Media Audio.
Definition: wma_afh.c:654
cq_update
void cq_update(struct chunk_queue *cq, size_t sent)
Change the number of bytes sent for the current queued chunk.
Definition: chunk_queue.c:99
mp_eval_ast
bool mp_eval_ast(struct mp_ast_node *root, struct mp_context *ctx)
Evaluate an abstract syntax tree, starting at the root node.
FEC_GROUP_USABLE_SKIP_HEADER
@ FEC_GROUP_USABLE_SKIP_HEADER
Use the group, but drop its audio file header.
Definition: fecdec_filter.c:258
vss_chunk_time
struct timeval * vss_chunk_time(void)
Get the chunk time of the current audio file.
Definition: vss.c:169
audio_formats
const char * audio_formats[]
define the array containing all supported audio formats
Definition: audiod.c:50
BF
#define BF(x, y, a, b)
Definition: imdct.c:97
VSS_PLAYING
#define VSS_PLAYING
Currently playing.
Definition: vss.h:21
vss_repos
unsigned int vss_repos(void)
Check if a reposition request is pending.
Definition: vss.c:770
hex
#define hex(a)
Return the hex characters of the lower 4 bits.
Definition: string.c:427
DEFINE_PARA_ERRLIST
DEFINE_PARA_ERRLIST
Array of error strings.
Definition: afh.c:17
sender_command_data::netmask
int netmask
Used for allow/deny.
Definition: server.h:17
writer_name
const char * writer_name(int wid)
Return name of the writer identified by a writer ID.
Definition: write_common.c:58
ATOM_MDIA
@ ATOM_MDIA
Definition: mp4.c:161
mp_num_attributes_set
int64_t mp_num_attributes_set(struct mp_context *ctx)
Count the number of attributes set.
Definition: mp.c:330
acl_get_contents
char * acl_get_contents(struct list_head *acl)
Compute a string containing the contents of an acl.
Definition: acl.c:130
opus_common.h
Common declarations for the opus decoder and audio format handler.
generic_max_transport_msg_size
int generic_max_transport_msg_size(int sockfd)
Determining maximum payload (packet) size.
Definition: net.c:658
arr_alloc
__must_check __malloc void * arr_alloc(size_t nmemb, size_t size)
Allocate an array, abort on failure or bugs.
Definition: string.c:60
chunk_queue.h
Exported symbols from chunk_queue.c.
crypt_init
void crypt_init(void)
Initialize the crypto backend.
Definition: openssl.c:43
afs_max_size_handler_data::band
uint8_t band
The sideband designator for this data packet.
Definition: afs.h:201
close_listed_fds
void close_listed_fds(void)
Close all fds in the list and destroy all list entries.
Definition: close_on_fork.c:88
arr_zalloc
__must_check __malloc void * arr_zalloc(size_t nmemb, size_t size)
Allocate and initialize an array, abort on failure or bugs.
Definition: string.c:75
ringbuffer_add
void * ringbuffer_add(struct ringbuffer *rb, void *data)
Add one entry to a ringbuffer.
Definition: ringbuffer.c:63
recv_bin_buffer
__must_check int recv_bin_buffer(int fd, char *buf, size_t size)
Receive data from a file descriptor.
Definition: net.c:770
sender_client::fd
int fd
The file descriptor of the client.
Definition: send.h:120
aft_ops
const struct afs_table_operations aft_ops
The audio file table contains information about known audio files.
Definition: aft.c:2736
guess_audio_format
int guess_audio_format(const char *name)
Guess the audio format judging from filename.
Definition: afh_common.c:103
generic_sender_help
__malloc char * generic_sender_help(void)
Get the generic help text.
Definition: send_common.c:416
afh_get_header
void afh_get_header(struct afh_info *afhi, uint8_t audio_format_id, void *map, size_t mapsize, char **buf, size_t *len)
Get the header of an audio file.
Definition: afh_common.c:349
AFS_SOCKET_READY
@ AFS_SOCKET_READY
Socket is inactive.
Definition: vss.c:45
AFHI_BITRATE_OFFSET
@ AFHI_BITRATE_OFFSET
Position of the bitrate.
Definition: aft.c:299
mp4_callback::truncate
int(* truncate)(void *user_data)
Unlike the truncate system call, this function does not receive an offset.
Definition: mp4.h:42
btr_add_output_pool
void btr_add_output_pool(struct btr_pool *btrp, size_t size, struct btr_node *btrn)
Feed data to child nodes of a buffer tree node.
Definition: buffer_tree.c:436
fec_free
void fec_free(struct fec_parms *p)
Deallocate a fec params structure.
Definition: fec.c:438
btr_node_description
Structure for creating new buffer tree nodes.
Definition: buffer_tree.h:156
IS_SYSTEM_ERROR
#define IS_SYSTEM_ERROR(num)
Check whether the system error bit is set.
Definition: error.h:265
AFSI_AUDIO_FORMAT_UNUSED_OFFSET
@ AFSI_AUDIO_FORMAT_UNUSED_OFFSET
2 bytes reserved space for future usage.
Definition: aft.c:146
lookup_address
int lookup_address(unsigned l4type, bool passive, const char *host, int port_number, struct addrinfo **result)
Resolve an IPv4/IPv6 address.
Definition: net.c:396
mp_parse_wildcard_pattern
void mp_parse_wildcard_pattern(const char *src, struct mp_wc_pattern *result)
Parse a wildcard pattern, including flags.
Definition: mp.c:197
ATOM_COMMENT
@ ATOM_COMMENT
Definition: mp4.c:161
OSL_ERROR_BIT
#define OSL_ERROR_BIT
Like SYSTEM_ERROR_BIT, but for errors from the osl library.
Definition: error.h:259
afs_table_operations::open
int(* open)(const char *base_dir)
Gets called on startup and on SIGHUP.
Definition: afs.h:79
NUM_AFT_COLUMNS
@ NUM_AFT_COLUMNS
The number of columns of this table.
Definition: upgrade_db.c:126
SBD_INFO_LOG
@ SBD_INFO_LOG
Definition: sideband.h:66
stdin_task::task
struct task * task
The task structure.
Definition: stdin.h:8
btr_pool_unused
size_t btr_pool_unused(struct btr_pool *btrp)
Get the number of unused bytes in the buffer pool.
Definition: buffer_tree.c:132
receiver_node::task
struct task * task
The task associated with this instance.
Definition: recv.h:16
mp_semantic_value::intval
int64_t intval
Constants, bitrate, frequency, etc.
Definition: mp.h:53
MAX_CHANNELS
#define MAX_CHANNELS
Definition: wmadec_filter.c:47
OPT_UINT32_VAL
#define OPT_UINT32_VAL(_name, _lpr)
Definition: write.c:30
write_buffer
_static_inline_ int write_buffer(int fd, const char *buf)
Write a NULL-terminated buffer.
Definition: fd.h:36
send_afs_status
int send_afs_status(struct command_context *cc, int parser_friendly)
Get the current afs status items from the afs process and send it.
Definition: aft.c:2473
SCF_PARSER_FRIENDLY
@ SCF_PARSER_FRIENDLY
Enable parser-friendly output.
Definition: audiod_command.c:56
sched_monitor_readfd
void sched_monitor_readfd(int fd, struct sched *s)
Instruct the scheduler to monitor an fd for readiness for reading.
Definition: sched.c:499
daemon_init_colors_or_die
bool daemon_init_colors_or_die(int color_arg, int color_arg_auto, int color_arg_no, bool logfile_given)
Initialize color mode if necessary.
Definition: daemon.c:108
spx_afh
const struct audio_format_handler spx_afh
The ogg/speex audio format handler.
Definition: spx_afh.c:257
TRANSFORM
#define TRANSFORM(a0, a1, a2, a3, wre, wim)
Definition: imdct.c:126
sb_designator
sb_designator
All valid sideband designators.
Definition: sideband.h:66
status_item_list
const char * status_item_list[]
The list of all status items.
Definition: afh_common.c:15
taginfo::artist
char * artist
TPE1 (id3v2) / ARTIST (vorbis) / ART (aac)/ author(spx)
Definition: afh.h:13
misc_meta_data::new_vss_status_flags
unsigned int new_vss_status_flags
The new status flags – commands may set them.
Definition: server.h:46
filter::pre_monitor
void(* pre_monitor)(struct sched *s, void *context)
Force a zero timeout if data is available in the buffer tree.
Definition: filter.h:87
i9e_client_info::producer
struct btr_node * producer
If non-NULL, this node is attached immediately to the stdout btr node of the i9e subsystem.
Definition: interactive.h:78
ALL_AUDIO_FORMATS
#define ALL_AUDIO_FORMATS
For each audio file the number of its audio format is stored in the database.
Definition: afh_common.c:23
sender_status
Describes the current status of one paraslash sender.
Definition: send.h:169
OPT_RESULT
#define OPT_RESULT(_name)
Definition: afh.c:22
FRAME_HEADER_SIZE
#define FRAME_HEADER_SIZE
Definition: mp3_afh.c:28
para_buffer::max_size_handler
int(* max_size_handler)(char *buf, size_t size, void *private_data)
If an attempt to print into this buffer is made that would need to grow buf to a size larger than max...
Definition: string.h:28
btr_consume
void btr_consume(struct btr_node *btrn, size_t numbytes)
Deallocate the given number of bytes from the input queue.
Definition: buffer_tree.c:707
lsu_com_help
int lsu_com_help(bool long_help, const struct lls_parse_result *lpr, const struct lls_suite *suite, const char *(*aux_info_cb)(unsigned cmd_num, bool verbose), char **result, unsigned *num_chars)
A generic implementation of the help subcommand.
Definition: lsu.c:107
LS_SORT_BY_SCORE
@ LS_SORT_BY_SCORE
-s=s
Definition: aft.c:55
OPT_GIVEN
#define OPT_GIVEN(_name)
Definition: audioc.c:35
EXEC_DCMD
@ EXEC_DCMD
para or display process running.
Definition: gui.c:63
SESSION_KEY_LEN
#define SESSION_KEY_LEN
Number of bytes of the session key for stream ciphers.
Definition: crypt.h:99
score_loop
int score_loop(osl_rbtree_loop_func *func, struct osl_table *t, void *data)
Call the given function for each row of the score table.
Definition: score.c:209
WRITE_CMD
#define WRITE_CMD(_num)
Definition: write.h:55
FOR_EACH_BUFFER_REF
#define FOR_EACH_BUFFER_REF(_br, _btrn)
Definition: buffer_tree.c:247
task_register
struct task * task_register(struct task_info *info, struct sched *s)
Add a task to the scheduler task list.
Definition: sched.c:228
get_btr_sample_format
int get_btr_sample_format(struct btr_node *btrn, int32_t *result)
Ask parent btr nodes for the number of bits per sample and the byte sex.
Definition: write_common.c:231
mp4.h
Public API of the mp4 parser.
daemon_close_log
void daemon_close_log(void)
Close the log file of the daemon.
Definition: daemon.c:275
sender_status::acl
struct list_head acl
The whitelist/blacklist.
Definition: send.h:185
aac_afh
const struct audio_format_handler aac_afh
The audio format handler for the Advanced Audio Codec.
Definition: aac_afh.c:256
aft_ops
const struct afs_table_operations aft_ops
The audio file table contains information about known audio files.
Definition: aft.c:2736
spx_header_info::channels
int channels
The number of channels of the current stream.
Definition: spx.h:25
update_quadratic_deviation
_static_inline_ int64_t update_quadratic_deviation(int64_t n, int64_t old_qd, int64_t old_val, int64_t new_val, int64_t old_sum)
Compute the new quadratic deviation in case one element changes.
Definition: mood.c:418
receiver::pre_monitor
void(* pre_monitor)(struct sched *s, void *context)
Ask the scheduler to monitor receive fds.
Definition: recv.h:69
taginfo::year
char * year
TDRC/YEAR/day.
Definition: afh.h:17
parse_config_or_die
void parse_config_or_die(bool reload)
(Re-)read the server configuration files.
Definition: server.c:195
wav_params::channels_given
int channels_given
Whether the channel count was given.
Definition: check_wav.h:17
aft_get_row_of_path
int aft_get_row_of_path(const char *path, struct osl_row **row)
Get the row of the audio file table corresponding to the given path.
Definition: aft.c:429
gui_theme::top_lines_default
int top_lines_default
Default number of lines of the top window.
Definition: gui.h:36
PARA_INFO_LOG
#define PARA_INFO_LOG(f,...)
Definition: para.h:218
sb_free
void sb_free(struct sb_context *c)
Deallocate all memory associated with a sideband handle.
Definition: sideband.c:105
sender::resolve_target
int(* resolve_target)(const char *, struct sender_command_data *)
Resolve target-specific URL string.
Definition: send.h:109
i9e_completion_result::dont_append_space
bool dont_append_space
Suppress adding a space character after the completed word.
Definition: interactive.h:24
writer_node::lpr
struct lls_parse_result * lpr
The parsed command line, merged with options given in the config file.
Definition: write.h:14
sched::pidx
unsigned * pidx
Maps fds to indices of the pfd array.
Definition: sched.h:29
mp4_get_duration
uint64_t mp4_get_duration(const struct mp4 *f)
Compute the duration of an mp4 file.
Definition: mp4.c:713
filter_node::min_iqs
size_t min_iqs
The minimal input queue size, see btr_node_status().
Definition: filter.h:27
mmd
struct misc_meta_data * mmd
Pointer to shared memory area for communication between para_server and its children.
Definition: server.c:52
remote_name
char * remote_name(int sockfd)
Pretty-printing of IPv4/6 socket addresses.
Definition: net.c:684
stringify_port
const char * stringify_port(int port, const char *transport)
Stringify port number, resolve into service name where defined.
Definition: net.c:217
mood_loop
int mood_loop(struct mood_instance *m, osl_rbtree_loop_func *func, void *data)
Iterate over the admissible files of a mood instance.
Definition: mood.c:689
vss_repos
unsigned int vss_repos(void)
Check if a reposition request is pending.
Definition: vss.c:770
sb_transformation
void(* sb_transformation)(struct iovec *src, struct iovec *dst, void *trafo_context)
The type of a sideband transformation.
Definition: sideband.h:110
writer::execute
btr_command_handler execute
The callback handler.
Definition: write.h:52
get_audio_file_path_of_row
int get_audio_file_path_of_row(const struct osl_row *row, char **path)
Get the path of an audio file, given a row of the audio file table.
Definition: aft.c:527
signal.h
exported symbols from signal.c
acl_check_access
int acl_check_access(int fd, struct list_head *acl, int default_deny)
Check whether the peer name of a given fd is allowed by an acl.
Definition: acl.c:154
recv_sb
int recv_sb(struct stream_cipher_context *scc, enum sb_designator expected_band, size_t max_size, struct iovec *result)
Receive a sideband packet from a blocking file descriptor.
Definition: command.c:292
FOR_EACH_FILTER
#define FOR_EACH_FILTER(j)
Iterate over all filters.
Definition: filter_common.c:20
init_sender_status
void init_sender_status(struct sender_status *ss, const struct lls_opt_result *acl_opt_result, const struct lls_opt_result *listen_address_opt_result, int default_port, int max_clients, int default_deny)
Initialize a struct sender status.
Definition: send_common.c:113
pattern_match_data::match_col_num
unsigned match_col_num
Data from this column is matched against the given patterns.
Definition: afs.h:135
send_errctx
int send_errctx(struct command_context *cc, char *errctx)
Send an error context to a client,.
Definition: command.c:213
SERVER_CMD_OPT_RESULT
#define SERVER_CMD_OPT_RESULT(_cmd, _opt, _lpr)
Get the lopsub parse result of an option.
Definition: command.h:39
mp4_metadata::count
unsigned count
The number of entries of the array.
Definition: mp4.h:65
ASN1_TYPE_SEQUENCE
@ ASN1_TYPE_SEQUENCE
Keys start with one big type sequence.
Definition: gcrypt.c:131
sender_status::num_clients
int num_clients
The current number of simultaneous connections.
Definition: send.h:179
MP_AFSI
#define MP_AFSI(_name)
Define a function which returns a field of the afs_info structure.
Definition: mp.c:357
ringbuffer_add
void * ringbuffer_add(struct ringbuffer *rb, void *data)
Add one entry to a ringbuffer.
Definition: ringbuffer.c:63
fec_new
int fec_new(int k, int n, struct fec_parms **result)
Create a new encoder and return an opaque descriptor to it.
Definition: fec.c:458
base64_decode
int base64_decode(char const *src, size_t encoded_size, char **result, size_t *decoded_size)
base64-decode a buffer.
Definition: base64.c:73
FEC_MAGIC
#define FEC_MAGIC
The FEC header starts with this magic value.
Definition: fec.h:39
recv_buffer
int recv_buffer(int fd, char *buf, size_t size)
Receive and write terminating NULL byte.
Definition: net.c:794
OPT_GIVEN
#define OPT_GIVEN(_name)
Definition: audiod.c:44
LS_SORT_BY_AUDIO_FORMAT
@ LS_SORT_BY_AUDIO_FORMAT
-s=a
Definition: aft.c:64
filter_node::callbacks
struct list_head callbacks
The list of registered callbacks.
Definition: filter.h:17
imdct.h
Exported symbols from imdct.c.
fec_free
void fec_free(struct fec_parms *p)
Deallocate a fec params structure.
Definition: fec.c:438
HASH_SIZE
#define HASH_SIZE
Size of the hash value in bytes.
Definition: crypt.h:166
decoder_execute
int decoder_execute(const char *cmd, unsigned sample_rate, unsigned channels, char **result)
Execute a btr command for a decoder.
Definition: filter_common.c:209
wav_params
These come from the command line arguments.
Definition: check_wav.h:13
SERVER_CMD_CMD_PTR
#define SERVER_CMD_CMD_PTR(_cmd)
Get the lopsub command pointer by command name.
Definition: command.h:35
i9e_get_error
int i9e_get_error(void)
Return the error state of the i9e task.
Definition: interactive.c:50
afh_info::channels
uint8_t channels
The number of channels.
Definition: afh.h:52
portable_io.h
Inline functions for binary IO.
vss_playing
unsigned int vss_playing(void)
Check if vss status flag P (playing) is set.
Definition: vss.c:748
sched_min_delay
void sched_min_delay(struct sched *s)
Set the I/O timeout to the minimal possible value.
Definition: sched.c:359
PRIVATE_PEM_KEY_HEADER
#define PRIVATE_PEM_KEY_HEADER
Private PEM keys (legacy format) start with this header.
Definition: crypt_common.c:259
generic_com_on
void generic_com_on(struct sender_status *ss, unsigned protocol)
Activate a paraslash sender.
Definition: send_common.c:282
DEFINE_PARA_ERRLIST
DEFINE_PARA_ERRLIST
Array of error strings.
Definition: audiod.c:39
stream_cipher_context::recv
struct stream_cipher * recv
Key used for receiving data.
Definition: crypt.h:113
CMD_PTR
#define CMD_PTR
Definition: gui.c:31
SBD_EXIT__SUCCESS
@ SBD_EXIT__SUCCESS
Definition: sideband.h:66
sc_crypt
void sc_crypt(struct stream_cipher *sc, struct iovec *src, struct iovec *dst)
Encrypt or decrypt a buffer using a stream cipher.
Definition: openssl.c:402
cq_new
struct chunk_queue * cq_new(size_t max_pending)
Allocate and initialize a chunk queue.
Definition: chunk_queue.c:131
cq_destroy
void cq_destroy(struct chunk_queue *cq)
Deallocate all resources of this queue.
Definition: chunk_queue.c:145
init_sender_status
void init_sender_status(struct sender_status *ss, const struct lls_opt_result *acl_opt_result, const struct lls_opt_result *listen_address_opt_result, int default_port, int max_clients, int default_deny)
Initialize a struct sender status.
Definition: send_common.c:113
FEC_GROUP_UNUSABLE
@ FEC_GROUP_UNUSABLE
Drop the group (because we did not receive the header yet).
Definition: fecdec_filter.c:254
daemon_drop_privileges_or_die
void daemon_drop_privileges_or_die(const char *username, const char *groupname)
Give up superuser privileges.
Definition: daemon.c:349
sender_command_data::sender_num
int sender_num
The number of the sender in question.
Definition: server.h:13
COLOR_BOT
@ COLOR_BOT
Definition: gui.c:81
aft_check_attributes
int aft_check_attributes(uint64_t att_mask, struct para_buffer *pb)
Iterate over all audio files and check the attribute bit mask.
Definition: aft.c:2577
receiver
Describes a possible data source for audio streams.
Definition: recv.h:50
cq_enqueue
int cq_enqueue(struct chunk_queue *cq, const char *buf, size_t num_bytes)
Add a chunk to the given queue.
Definition: chunk_queue.c:49
imdct
void imdct(struct mdct_context *ctx, float *output, const float *input)
Compute the inverse MDCT.
Definition: imdct.c:315
afs_callback_arg::fd
int fd
The local socket connecting afs and the command handler.
Definition: afs.h:155
btr_pool_get_buffers
int btr_pool_get_buffers(struct btr_pool *btrp, struct iovec iov[2])
Get references to buffers pointing to free space of the buffer pool area.
Definition: buffer_tree.c:177
LS_SORT_BY_DURATION
@ LS_SORT_BY_DURATION
-s=d
Definition: aft.c:63
ATS_SEEN_MP4A
@ ATS_SEEN_MP4A
We have seen an mp4a atom but no subsequent trak atom yet.
Definition: mp4.c:33
U32_OPTVAL
#define U32_OPTVAL(_opt, _lpr)
Definition: resample_filter.c:19
daemonize
int daemonize(bool parent_waits)
Do the usual stuff to become a daemon.
Definition: daemon.c:227
ipc.h
inter process communication and shared memory routines
filter_setup
int filter_setup(const char *fa, void **conf, struct lls_parse_result **lprp)
Parse a filter command line and call the corresponding ->setup method.
Definition: filter_common.c:76
stdout.h
Writing to stdout via buffer trees.
stdin_task_register
void stdin_task_register(struct stdin_task *sit, struct sched *s)
Register a stdin task structure.
Definition: stdin.c:88
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.
Definition: vss.c:656
AFHI_INFO_STRING_OFFSET
@ AFHI_INFO_STRING_OFFSET
The tag info position.
Definition: aft.c:319
AFHI_FREQUENCY_OFFSET
@ AFHI_FREQUENCY_OFFSET
Position of the frequency.
Definition: aft.c:301
BLOCK_NB_SIZES
#define BLOCK_NB_SIZES
Definition: wmadec_filter.c:39
oac_custom_header_new
__malloc struct oac_custom_header * oac_custom_header_new(void)
Allocate and return a custom header structure.
Definition: ogg_afh_common.c:368
afs_callback_arg::lpr
struct lls_parse_result * lpr
Convenience pointer for the deserialized parse result.
Definition: afs.h:168
FOR_EACH_RECEIVER
#define FOR_EACH_RECEIVER(i)
Iterate over all available receivers.
Definition: recv.h:95
afh_get_afhi_txt
unsigned afh_get_afhi_txt(int audio_format_num, struct afh_info *afhi, char **result)
Pretty-print the contents of a struct afh_info into a buffer.
Definition: afh_common.c:393
task_notify_all
void task_notify_all(struct sched *s, int err)
Set the notification value of all tasks of a scheduler instance.
Definition: sched.c:344
writer_node::wid
int wid
The ID of this writer.
Definition: write.h:10
free_status_items
void free_status_items(void)
Deallocate and invalidate the status item strings.
Definition: aft.c:980
free_vlc
void free_vlc(struct vlc *vlc)
Deallocate all resources of a VLC table.
Definition: bitstream.c:159
afhi_offsets
afhi_offsets
The on-disk layout of a afhi struct.
Definition: aft.c:295
WAV_HEADER_LEN
#define WAV_HEADER_LEN
A wav header is always 44 bytes.
Definition: wav_filter.c:17
lsg_filter_cmd_com_prebuffer_user_data
const struct filter lsg_filter_cmd_com_prebuffer_user_data
Definition: prebuffer_filter.c:87
mp_wc_pattern::flags
unsigned flags
For modifying matching behaviour.
Definition: mp.h:35
writer_get
const struct writer * writer_get(int wid)
Return the writer structure from a writer ID.
Definition: write_common.c:44
xwrite
int xwrite(int fd, const char *buf, size_t len)
Write a buffer to a file descriptor, re-writing on short writes.
Definition: fd.c:123
HTTP_CONNECTED
@ HTTP_CONNECTED
We accepted the connection on the tcp socket.
Definition: http_send.c:36
mp_parse_error
__printf_3_4 void mp_parse_error(int line, struct mp_context *ctx, const char *fmt,...)
Set the error bit in the parser context and log a message.
Definition: mp.c:231
mp4_get_sample_size
int mp4_get_sample_size(const struct mp4 *f, uint32_t sample, uint32_t *result)
Look up and return the size of the given sample in the stsz table.
Definition: mp4.c:769
free_argv
void free_argv(char **argv)
Free an array of words created by create_argv() or create_shifted_argv().
Definition: string.c:745
crypt_shutdown
void crypt_shutdown(void)
Allocate all resources of the crypto backend.
Definition: openssl.c:55
FEC_GROUP_USABLE_WITH_HEADER
@ FEC_GROUP_USABLE_WITH_HEADER
Use the group, including its header.
Definition: fecdec_filter.c:260
afh_get_chunk
__must_check int afh_get_chunk(long unsigned chunk_num, struct afh_info *afhi, uint8_t audio_format_id, const void *map, size_t mapsize, const char **buf, uint32_t *len, void **afh_context)
Get one chunk of audio data.
Definition: afh_common.c:248
vss.h
Exported functions from vss.c (para_server).
asf_header_info::header_len
int header_len
The size of the audio file header.
Definition: wma.h:10
HTTP_INVALID_GET_REQUEST
@ HTTP_INVALID_GET_REQUEST
We didn't receive a valid get request.
Definition: http_send.c:42
iov_valid
_static_inline_ bool iov_valid(const struct iovec *iov)
Simple sanity check for I/O vectors.
Definition: para.h:122
para_log
__printf_2_3 void(* para_log)(int, const char *,...)
Definition: client.c:32
CLIENT_CMD_PTR
#define CLIENT_CMD_PTR
Definition: client.h:49
write_va_buffer
__printf_2_3 int write_va_buffer(int fd, const char *fmt,...)
A fprintf-like function for raw file descriptors.
Definition: fd.c:169
para_accept
int para_accept(int fd, void *addr, socklen_t size, int *new_fd)
Wrapper around the accept system call.
Definition: net.c:822
btr_log_tree
void btr_log_tree(struct btr_node *btrn, int loglevel)
Write the current buffer (sub-)tree to the log.
Definition: buffer_tree.c:1142
mp_eval_row
bool mp_eval_row(const struct osl_row *aft_row, struct mp_context *ctx)
Determine whether the given audio file is admissible.
Definition: mp.c:562
FEC_STATE_NONE
@ FEC_STATE_NONE
not initialized and not enabled
Definition: vss.c:124
OPT_GIVEN
#define OPT_GIVEN(_name)
Definition: afh.c:23
stdin.h
The standard in task structure.
lsg_filter_cmd_com_resample_user_data
const struct filter lsg_filter_cmd_com_resample_user_data
Definition: resample_filter.c:277
FEC_HEADER_SIZE
#define FEC_HEADER_SIZE
Each FEC slice contains a FEC header of this size.
Definition: fec.h:37
daemon_set_start_time
void daemon_set_start_time(void)
Set the startup time.
Definition: daemon.c:397
sb_get_recv_buffer
void sb_get_recv_buffer(struct sb_context *c, struct iovec *iov)
Obtain a pointer to the next sideband read buffer.
Definition: sideband.c:182
ringbuffer_filled
unsigned ringbuffer_filled(struct ringbuffer *rb)
Get the number of entries in the ring buffer.
Definition: ringbuffer.c:98
audio_file_data::max_chunk_size
uint32_t max_chunk_size
Size of the largest chunk.
Definition: afh.h:67
sched_request_timeout_ms
void sched_request_timeout_ms(long unsigned ms, struct sched *s)
Bound the I/O timeout to at most the given amount of milliseconds.
Definition: sched.c:391
read_ok
int read_ok(int fd)
Check a file descriptor for readability.
Definition: fd.c:539
zalloc
__must_check void * zalloc(size_t size)
Allocate and initialize memory.
Definition: string.c:97
AFS_SOCKET_AFD_PENDING
@ AFS_SOCKET_AFD_PENDING
vss wrote a request to the socket and waits for reply from afs.
Definition: vss.c:49
apc_priv_decrypt
int apc_priv_decrypt(const char *key_file, unsigned char *outbuf, unsigned char *inbuf, int inlen)
Decrypt a buffer using a private key.
Definition: gcrypt.c:489
mixer
Operations provided by each mixer plugin.
Definition: mix.h:20
register_writer_node
void register_writer_node(struct writer_node *wn, struct btr_node *parent, struct sched *s)
Open a writer node and register the corresponding task.
Definition: write_common.c:132
ERRNO_TO_PARA_ERROR
#define ERRNO_TO_PARA_ERROR(num)
Set the system error bit for the given number.
Definition: error.h:274
user::node
struct list_head node
The position of this user in the list of users.
Definition: user_list.h:26
DF_LOG_HOSTNAME
@ DF_LOG_HOSTNAME
Whether the hostname should be logged.
Definition: daemon.h:26
afs_info
Audio file selector data stored in the audio file table.
Definition: afs.h:6
para_munmap
int para_munmap(void *start, size_t length)
A wrapper for munmap(2).
Definition: fd.c:496
base64_decode
int base64_decode(char const *src, size_t encoded_size, char **result, size_t *decoded_size)
base64-decode a buffer.
Definition: base64.c:73
btr_pool_free
void btr_pool_free(struct btr_pool *btrp)
Deallocate resources used by a buffer pool.
Definition: buffer_tree.c:89
vss_stopped
unsigned int vss_stopped(void)
Check if the vss is currently stopped.
Definition: vss.c:793
daemon_set_flag
void daemon_set_flag(unsigned flag)
Set one of the daemon config flags.
Definition: daemon.c:197
audio_format_handler::open
int(* open)(const void *map, size_t mapsize, void **afh_context)
An audio format handler may signify support for dynamic chunks by defining ->get_chunk below.
Definition: afh.h:108
mp4_get_channel_count
uint16_t mp4_get_channel_count(const struct mp4 *f)
Return the number of channels of the audio track.
Definition: mp4.c:808
send_callback_request
int send_callback_request(afs_callback *f, struct osl_object *query, callback_result_handler *result_handler, void *private_result_data)
Ask the afs process to call a given function.
Definition: afs.c:173
FELF_DISCARD_FIRST
@ FELF_DISCARD_FIRST
Don't call line handler for the first input line.
Definition: string.h:42
AFSI_SIZE
@ AFSI_SIZE
On-disk storage space needed.
Definition: aft.c:148
CRT_FILE_CHANGE
@ CRT_FILE_CHANGE
New file should be loaded (com_next()).
Definition: play.c:54
CHECK_HEADER
#define CHECK_HEADER(_p, _h)
Definition: wma_afh.c:284
imdct_init
int imdct_init(int nbits, struct mdct_context **result)
Initialize the inverse modified cosine transform.
Definition: imdct.c:363
SB_DESIGNATORS_ARRAY
#define SB_DESIGNATORS_ARRAY
List of stringified sidedband designators.
Definition: sideband.h:71
parse_fec_url
int parse_fec_url(const char *arg, struct sender_command_data *scd)
Parse a FEC URL string.
Definition: send_common.c:491
ASN1_TYPE_BIT_STRING
@ ASN1_TYPE_BIT_STRING
Bit string object.
Definition: gcrypt.c:129
tv2ms
long unsigned tv2ms(const struct timeval *tv)
Convert struct timeval to milliseconds.
Definition: time.c:13
stdin_task::btrp
struct btr_pool * btrp
Use a buffer pool to minimize memcpy due to alignment problems.
Definition: stdin.h:12
PARA_ABS
#define PARA_ABS(x)
Compute the absolute value of x.
Definition: para.h:45
get_task_list
char * get_task_list(struct sched *s)
Get the list of all registered tasks.
Definition: sched.c:255
server_command_permissions
server_command_permissions
Flags for server commands and user permissions.
Definition: user_list.h:13
AFSI_SIZE
#define AFSI_SIZE
Definition: upgrade_db.c:129
oss_mixer
const struct mixer alsa_mixer oss_mixer
Declared even if unsupported because it does not hurt and avoids ifdefs.
Definition: oss_mix.c:135
shutdown_client
void shutdown_client(struct sender_client *sc, struct sender_status *ss)
Shut down a client connected to a paraslash sender.
Definition: send_common.c:45
afh_close
void afh_close(void *afh_context, uint8_t audio_format_id)
Deallocate resources allocated due to dynamic chunk handling.
Definition: afh_common.c:287
FOR_EACH_MAPPED_KEY
#define FOR_EACH_MAPPED_KEY(i)
Definition: play.c:536
LS_SORT_BY_FREQUENCY
@ LS_SORT_BY_FREQUENCY
-s=f
Definition: aft.c:58
pattern_match_data::fnmatch_flags
int fnmatch_flags
This value is passed verbatim to fnmatch().
Definition: afs.h:139
daemon_get_uptime_str
__malloc char * daemon_get_uptime_str(const struct timeval *current_time)
Construct a string containing the current uptime.
Definition: daemon.c:431
stat_client_flags
stat_client_flags
Flags used for the stat command of para_audiod.
Definition: audiod_command.c:54
print_writer_helps
void print_writer_helps(bool detailed)
Print the help text of all writers to stdout.
Definition: write_common.c:153
LS_SORT_BY_LAST_PLAYED
@ LS_SORT_BY_LAST_PLAYED
-s=l
Definition: aft.c:56
signal_shutdown
void signal_shutdown(struct signal_task *st)
Close the write end of the signal pipe, deallocate resources.
Definition: signal.c:233
SBD_CHALLENGE
@ SBD_CHALLENGE
Definition: sideband.h:66
ls_sorting_method
ls_sorting_method
The different sorting methods of the ls command.
Definition: aft.c:53
daemon_set_priority
void daemon_set_priority(int prio)
Renice the calling process.
Definition: daemon.c:328
audio_format_handler::get_file_info
int(* get_file_info)(char *map, size_t numbytes, int fd, struct afh_info *afhi)
Check if this audio format handler can handle the file.
Definition: afh.h:94
btr_inplace_ok
bool btr_inplace_ok(struct btr_node *btrn)
Find out whether it is OK to change an input buffer.
Definition: buffer_tree.c:577
FOR_EACH_CHANNEL
#define FOR_EACH_CHANNEL(i)
Iterate over all defined mixer channels.
Definition: oss_mix.c:38
NEXT_AUDIO_FILE
@ NEXT_AUDIO_FILE
An audio file was successfully opened.
Definition: afs.h:113
mixer::set_channel
int(* set_channel)(struct mixer_handle *handle, const char *mixer_channel)
Select the channel for subsequent get/set operations.
Definition: mix.h:28
sender_client::name
char * name
The socket "name" of the client.
Definition: send.h:122
audiod_get_btr_root
struct btr_node * audiod_get_btr_root(void)
Return the root node of the current buffer tree.
Definition: audiod.c:684
OPT_STRING_VAL
#define OPT_STRING_VAL(_name)
Definition: afh.c:24
wmadata.h
Various WMA tables.
sched_request_barrier_or_min_delay
int sched_request_barrier_or_min_delay(struct timeval *barrier, struct sched *s)
Bound the I/O timeout or request a minimal delay.
Definition: sched.c:430
afh_info::header_len
uint32_t header_len
The header is needed by senders in case a new client connects in the middle of the stream.
Definition: afh.h:50
lsg_recv_cmd_com_udp_user_data
const struct receiver lsg_recv_cmd_com_udp_user_data
Definition: udp_recv.c:189
mp4_get_tag_value
__malloc char * mp4_get_tag_value(const struct mp4 *f, const char *item)
Return the value of the given tag item.
Definition: mp4.c:1047
write_ok
int write_ok(int fd)
Check a file descriptor for writability.
Definition: fd.c:556
mmd
struct misc_meta_data * mmd
Pointer to shared memory area for communication between para_server and its children.
Definition: server.c:52
find_openssh_bignum_offset
int find_openssh_bignum_offset(const unsigned char *data, int len)
Check header of an openssh private key and compute bignum offset.
Definition: crypt_common.c:200
send_sb
int send_sb(struct stream_cipher_context *scc, void *buf, size_t numbytes, int band, bool dont_free)
Send a sideband packet through a blocking file descriptor.
Definition: command.c:146
i9e_client_info::history_file
char * history_file
Where to store the readline history.
Definition: interactive.h:67
compute_chunk_time
void compute_chunk_time(long unsigned chunk_num, struct timeval *chunk_tv, struct timeval *stream_start, struct timeval *result)
Compute when to send a chunk of an audio file.
Definition: time.c:170
vlc
A variable length code table.
Definition: bitstream.h:22
opus_header
Various bits stored in the header of an opus stream.
Definition: opus_common.h:9
sc_crypt
void sc_crypt(struct stream_cipher *sc, struct iovec *src, struct iovec *dst)
Encrypt or decrypt a buffer using a stream cipher.
Definition: gcrypt.c:646
CL_RECEIVED_CHALLENGE
@ CL_RECEIVED_CHALLENGE
Server sends encrypted challenge.
Definition: client.h:14
vss_chunk_time
struct timeval * vss_chunk_time(void)
Get the chunk time of the current audio file.
Definition: vss.c:169
afs_pid
pid_t afs_pid
The process id of the audio file selector process.
Definition: server.c:86
lsg_filter_cmd_com_amp_user_data
const struct filter lsg_filter_cmd_com_amp_user_data
Definition: amp_filter.c:100
FOR_EACH_CHILD_SAFE
#define FOR_EACH_CHILD_SAFE(_tn, _tmp, _btrn)
Definition: buffer_tree.c:244
slot
struct slot_info slot[5]
para_audiod uses MAX_STREAM_SLOTS different slots, each of which may be associated with a receiver/fi...
Definition: audiod.c:108
PARA_MAX
#define PARA_MAX(x, y)
Compute the maximum of x and y.
Definition: para.h:38
stdin_task
The task structure used for reading from stdin.
Definition: stdin.h:6
mp_year
int64_t mp_year(struct mp_context *ctx)
Parse and return the value of the year tag.
Definition: mp.c:447
afs_info::audio_format_id
uint8_t audio_format_id
Mp3, ogg, ...
Definition: afs.h:18
para_homedir
__must_check __malloc char * para_homedir(void)
Get the home directory of the calling user.
Definition: string.c:319
free_lpr
void free_lpr(void)
Deallocate all lopsub parse results.
Definition: server.c:644
afh_info::bitrate
uint16_t bitrate
Exact meaning depends on audio format.
Definition: afh.h:56
writer_node
Describes one running instance of a writer.
Definition: write.h:8
CHUNK_TV_TV_SEC_OFFSET
@ CHUNK_TV_TV_SEC_OFFSET
The seconds part of the chunk time (4 bytes).
Definition: aft.c:313
arr_alloc
__must_check __malloc void * arr_alloc(size_t nmemb, size_t size)
Allocate an array, abort on failure or bugs.
Definition: string.c:60
hash_function
void hash_function(const char *data, unsigned long len, unsigned char *hash)
Compute the hash of the given input data.
Definition: gcrypt.c:33
valid_fd_012
void valid_fd_012(void)
Ensure that file descriptors 0, 1, and 2 are valid.
Definition: fd.c:569
pattern_match_data::table
struct osl_table * table
Loop over all rows in this table.
Definition: afs.h:131
daemon_log
__printf_2_3 void daemon_log(int ll, const char *fmt,...)
The log function for para_server and para_audiod.
Definition: daemon.c:444
sender_command_data
Arguments for the sender command.
Definition: server.h:9
sched_read_ok
bool sched_read_ok(int fd, const struct sched *s)
Check whether there is data to read on the given fd.
Definition: sched.c:545
sender::name
const char * name
The name of the sender.
Definition: send.h:48
dccp_sender
const struct sender dccp_sender
The DCCP sender.
Definition: dccp_send.c:258
signal_pre_monitor
_static_inline_ void signal_pre_monitor(struct sched *s, void *context)
Monitor the signal fd for reading.
Definition: signal.h:30
para_log
__printf_2_3 void(* para_log)(int, const char *,...)
The log function of para_gui, always set to curses_log().
Definition: play.c:107
clock_get_realtime
struct timeval * clock_get_realtime(struct timeval *tv)
Retrieve the time of the realtime clock.
Definition: time.c:194
sb_get_recv_buffer
void sb_get_recv_buffer(struct sb_context *c, struct iovec *iov)
Obtain a pointer to the next sideband read buffer.
Definition: sideband.c:182
client_task::lpr
struct lls_parse_result * lpr
The parsed command line (including the command).
Definition: client.h:38
btr_new_node
struct btr_node * btr_new_node(struct btr_node_description *bnd)
Create a new buffer tree node.
Definition: buffer_tree.c:263
CAB_AUDIO_FORMAT_ID_OFFSET
@ CAB_AUDIO_FORMAT_ID_OFFSET
Audio format id.
Definition: aft.c:1569
audio_file_data
Data about the current audio file, passed from afs to server.
Definition: afh.h:60
HTTP_STREAMING
@ HTTP_STREAMING
Connection is ready for sending audio data.
Definition: http_send.c:40
send.h
Sender-related defines and structures.
parse_url
char * parse_url(const char *url, char *host, ssize_t hostlen, int32_t *port)
Parse and validate URL string.
Definition: net.c:142
clear_afhi
void clear_afhi(struct afh_info *afhi)
Deallocate the contents of an afh_info structure.
Definition: afh_common.c:209
btr_get_output_queue_size
size_t btr_get_output_queue_size(struct btr_node *btrn)
Return number of queued output bytes of a buffer tree node.
Definition: buffer_tree.c:878
mp4_tag::item
char * item
The item name: "artist", "title", "album", "comment", or "date".
Definition: mp4.h:48
MAX_HOSTLEN
#define MAX_HOSTLEN
The maximum length of the host component in an URL.
Definition: net.h:11
fec.h
Exported symbols from fec.c.
sender_subcommand
sender_subcommand
Each sender subcommand gets an SENDER_xxx identifier.
Definition: send.h:26
btr_exec_up
int btr_exec_up(struct btr_node *btrn, const char *command, char **value_result)
Execute an inter-node command on the given node or on a parent node.
Definition: buffer_tree.c:906
crypt_backend.h
Non-public crypto interface.
sched::num_pfds
unsigned num_pfds
Number of fds registered for montitoring so far.
Definition: sched.h:27
CMD_PTR
#define CMD_PTR
Get a reference to the supercommand of para_server.
Definition: server.c:185
writer::post_monitor
int(* post_monitor)(struct sched *s, void *context)
Write audio data.
Definition: write.h:39
para_log
__printf_2_3 void(* para_log)(int, const char *,...)
Definition: afh.c:28
playlist_check_callback
int playlist_check_callback(struct afs_callback_arg *aca)
Check the playlist table for inconsistencies.
Definition: playlist.c:105
i9e_complete_option
void i9e_complete_option(char **opts, struct i9e_completion_info *ci, struct i9e_completion_result *cr)
Complete according to the given options.
Definition: interactive.c:710
lls
_static_inline_ int lls(int ret)
Wrapper for lopsub library calls.
Definition: error.h:333
generic_com_off
void generic_com_off(struct sender_status *ss)
Deactivate a paraslash sender.
Definition: send_common.c:328
mutex_destroy
int mutex_destroy(int id)
Destroy a mutex.
Definition: ipc.c:38
coef_vlc_table::levels
const uint16_t * levels
Table to build run/level tables.
Definition: wmadata.h:33
mp4_num_samples
uint32_t mp4_num_samples(const struct mp4 *f)
Return the number of samples of the audio track.
Definition: mp4.c:820
vss_status_flags
vss_status_flags
The vss status flags audiod is interested in.
Definition: audiod.c:111
i9e_attach_to_stdout
void i9e_attach_to_stdout(struct btr_node *producer)
Prepare writing to stdout.
Definition: interactive.c:193
VSS_REPOS
#define VSS_REPOS
A reposition request was sent by a client.
Definition: vss.h:19
writer_name
const char * writer_name(int wid)
Return name of the writer identified by a writer ID.
Definition: write_common.c:58
misc_meta_data::stream_start
struct timeval stream_start
The time para_server started to stream.
Definition: server.h:56
mp_duration
int64_t mp_duration(struct mp_context *ctx)
Return the duration of the audio file from the afh info structure.
Definition: mp.c:402
FOR_EACH_FIELD
#define FOR_EACH_FIELD(f, j, fr)
Definition: mp3_afh.c:99
mp_is_set
bool mp_is_set(const char *attr, struct mp_context *ctx)
Check whether the given attribute is set for the current audio file.
Definition: mp.c:307
for_each_line_flags
for_each_line_flags
Controls the behavior of for_each_line().
Definition: string.h:38
sender_command_data::port
int port
The port number for add/remove.
Definition: server.h:19
OPT_STRING_VAL
#define OPT_STRING_VAL(_name)
Definition: audioc.c:36
daemon_get_loglevel
int daemon_get_loglevel(void)
Get the current log level of the daemon.
Definition: daemon.c:163
crypt_init
void crypt_init(void)
Initialize the crypto backend.
Definition: gcrypt.c:75
activate_grab_clients
void activate_grab_clients(struct sched *s)
Activate inactive grab clients if possible.
Definition: grab_client.c:151
btr_pool_unused
size_t btr_pool_unused(struct btr_pool *btrp)
Get the number of unused bytes in the buffer pool.
Definition: buffer_tree.c:132
DEFINE_PARA_ERRLIST
DEFINE_PARA_ERRLIST
Array of error strings.
Definition: play.c:29
ATTACH_RW
@ ATTACH_RW
Definition: ipc.h:4
theme_next
void theme_next(struct gui_theme *t)
Activate the next available theme.
Definition: gui_theme.c:432
mp4_get_sample_rate
uint16_t mp4_get_sample_rate(const struct mp4 *f)
Return the sample rate stored in the stsd atom.
Definition: mp4.c:794
getbit_context::num_bits
uint32_t num_bits
Length of buffer in bits (always a multiple of 8).
Definition: bitstream.h:16
playlist_check_callback
int playlist_check_callback(struct afs_callback_arg *aca)
Check the playlist table for inconsistencies.
Definition: playlist.c:105
attribute_table_columns
attribute_table_columns
The columns of the attribute table.
Definition: attribute.c:24
pattern_match_data::pm_flags
unsigned pm_flags
Definition: afs.h:137
para_listen
int para_listen(unsigned l4type, const char *addr, uint16_t port)
Create a passive / listening socket.
Definition: net.c:542
receiver_node::lpr
struct lls_parse_result * lpr
The parsed command line options for this instance.
Definition: recv.h:14
opus_header::nb_coupled
int nb_coupled
Number of streams to decode as 2 channel streams.
Definition: opus_common.h:23
daemon_get_uptime_str
__malloc char * daemon_get_uptime_str(const struct timeval *current_time)
Construct a string containing the current uptime.
Definition: daemon.c:431
check_wav_post_monitor
int check_wav_post_monitor(struct check_wav_context *cwc)
Filter out the wav header, pushdown everything else.
Definition: check_wav.c:124
flowopt_cleanup
void flowopt_cleanup(struct flowopts *fo)
Deallocate all resources of a flowopts structure.
Definition: net.c:363
NOISE_TAB_SIZE
#define NOISE_TAB_SIZE
Definition: wmadec_filter.c:49
mutex_unlock
void mutex_unlock(int id)
Unlock a mutex.
Definition: ipc.c:94
WRITE_CMD_OPT_RESULT
#define WRITE_CMD_OPT_RESULT(_cmd, _opt, _lpr)
Definition: write.h:57
para_regcomp
int para_regcomp(regex_t *preg, const char *regex, int cflags)
Compile a regular expression.
Definition: string.c:835
ATOM_STSZ
@ ATOM_STSZ
Definition: mp4.c:161
COLOR_SEPARATOR
@ COLOR_SEPARATOR
Definition: gui.c:79
FOR_EACH_CHILD
#define FOR_EACH_CHILD(_tn, _btrn)
Definition: buffer_tree.c:242
tv_diff
int tv_diff(const struct timeval *b, const struct timeval *a, struct timeval *diff)
Compute the difference of two time values.
Definition: time.c:42
MIN_AFHI_SIZE
@ MIN_AFHI_SIZE
Minimal on-disk size of a valid afhi struct.
Definition: aft.c:321
opus_header::channels
int channels
1..255
Definition: opus_common.h:13
mutex_lock
void mutex_lock(int id)
Lock the given mutex.
Definition: ipc.c:68
list_for_each_entry
#define list_for_each_entry(pos, head, member)
Iterate over a list.
Definition: list.h:134
ringbuffer_new
struct ringbuffer * ringbuffer_new(unsigned size)
Initialize a new ringbuffer.
Definition: ringbuffer.c:42
write_all
int write_all(int fd, const char *buf, size_t len)
Write to a file descriptor, fail on short writes.
Definition: fd.c:142
string_compare
int string_compare(const struct osl_object *obj1, const struct osl_object *obj2)
Compare two osl objects of string type.
Definition: afs.c:351
stdout_task_register
void stdout_task_register(struct stdout_task *sot, struct sched *s)
Register a stdout task structure.
Definition: stdout.c:78
afs_max_size_handler
_static_inline_ int afs_max_size_handler(char *buf, size_t size, void *private)
Standard max_size handler for AFS commands.
Definition: afs.h:219
btr_consume
void btr_consume(struct btr_node *btrn, size_t numbytes)
Deallocate the given number of bytes from the input queue.
Definition: buffer_tree.c:707
cq_peek
struct queued_chunk * cq_peek(struct chunk_queue *cq)
Lookup the next chunk in the queue.
Definition: chunk_queue.c:71
RSA_PUBKEY_SEXP
#define RSA_PUBKEY_SEXP
S-expression for the public part of an RSA key.
Definition: gcrypt.c:109
send_sb_va
__printf_3_4 int send_sb_va(struct stream_cipher_context *scc, int band, const char *fmt,...)
Create a variable sized buffer and send it as a sideband packet.
Definition: command.c:177
oac_custom_header_flush
void oac_custom_header_flush(struct oac_custom_header *h)
Force remaining packets into an ogg page.
Definition: ogg_afh_common.c:412
shm_size
int shm_size(int id, size_t *result)
Get the size of a shared memory segment.
Definition: ipc.c:169
asf_header_info::audio_stream_info_start
int audio_stream_info_start
Offset of the audio stream info header.
Definition: wma.h:12
send_strerror
int send_strerror(struct command_context *cc, int err)
Send an error message to a client.
Definition: command.c:198
mark_fd_blocking
__must_check int mark_fd_blocking(int fd)
Set a file descriptor to blocking mode.
Definition: fd.c:308
mutex_new
int mutex_new(void)
Define a new mutex.
Definition: ipc.c:23
CL_RECEIVED_WELCOME
@ CL_RECEIVED_WELCOME
Server sends the welcome message.
Definition: client.h:10
receiver_node::receiver
const struct receiver * receiver
Points to the corresponding receiver.
Definition: recv.h:10
INIT_BLOB_TABLE
#define INIT_BLOB_TABLE(table_name)
Define a blob table.
Definition: blob.c:76
misc_meta_data::active_connections
unsigned int active_connections
The number of connections currently active.
Definition: server.h:71
misc_meta_data::num_commands
unsigned int num_commands
The number of executed commands.
Definition: server.h:67
arr_realloc
__must_check void * arr_realloc(void *ptr, size_t nmemb, size_t size)
Reallocate an array, abort on failure or bugs.
Definition: string.c:33
misc_meta_data::current_chunk
long unsigned current_chunk
The number of the chunk currently being sent.
Definition: server.h:52
get_time_string
__malloc char * get_time_string(void)
Compute the play time based on information of the current slot.
Definition: audiod.c:293
version_single_line
const char * version_single_line(const char *pfx)
Get the version string for an executable.
Definition: version.c:17
spx.h
Structures and prototypes common to the speex audio format handler and the speex decoder.
xasprintf
__printf_2_3 unsigned xasprintf(char **result, const char *fmt,...)
Print to a dynamically allocated string, variable number of arguments.
Definition: string.c:213
hash2_function
void hash2_function(const char *data, unsigned long len, unsigned char *hash)
Compute the hash2 of the given input data.
Definition: gcrypt.c:49
spx_header_info::nframes
int nframes
Number of frames per packet, extracted from header.
Definition: spx.h:23
flac_afh
const struct audio_format_handler flac_afh
The audio format handler for flac (free lossless audio decoder).
Definition: flac_afh.c:522
BLOB_RENAME
@ BLOB_RENAME
A blob was renamed.
Definition: afs.h:51
CAB_HASH_OFFSET
@ CAB_HASH_OFFSET
The hash of the audio file being added.
Definition: aft.c:1571
DCCP_SOCKOPT_GET_CUR_MPS
#define DCCP_SOCKOPT_GET_CUR_MPS
Max packet size, RFC 4340, 14.
Definition: dccp_send.c:97
handle_connect
int handle_connect(int fd)
Perform user authentication and execute a command.
Definition: command.c:915
mp_path
char * mp_path(struct mp_context *ctx)
Return the full path to the audio file.
Definition: mp.c:285
LS_MODE_LONG
@ LS_MODE_LONG
-l or -l=l
Definition: aft.c:71
read_nonblock
int read_nonblock(int fd, void *buf, size_t sz, size_t *num_bytes)
Read from a non-blocking file descriptor into a single buffer.
Definition: fd.c:256
spx_process_header
int spx_process_header(unsigned char *packet, long bytes, struct spx_header_info *shi)
Obtain information about a speex file from an ogg packet.
Definition: spx_common.c:83
oac_get_file_info
int oac_get_file_info(char *map, size_t numbytes, struct afh_info *afhi, struct oac_callback_info *ci)
Pass first three ogg packets to callback and build the chunk table.
Definition: ogg_afh_common.c:121
BTR_NT_ROOT
@ BTR_NT_ROOT
Definition: buffer_tree.h:112
sb_sent
bool sb_sent(struct sb_context *c, size_t nbytes)
Update the sideband context after data has been sent.
Definition: sideband.c:160
COLOR_COMMAND
@ COLOR_COMMAND
Definition: gui.c:75
mixer::get
int(* get)(struct mixer_handle *handle)
Return the (normalized) current value of the selected channel.
Definition: mix.h:31
wav_params::channels_arg
int channels_arg
Number of channels, or the default value.
Definition: check_wav.h:15
parse_url
char * parse_url(const char *url, char *host, ssize_t hostlen, int32_t *port)
Parse and validate URL string.
Definition: net.c:142
HANDSHAKE_BUFSIZE
#define HANDSHAKE_BUFSIZE
Definition: command.c:836
recv_buffer
int recv_buffer(int fd, char *buf, size_t size)
Receive and write terminating NULL byte.
Definition: net.c:794
audio_format_handler::get_chunk
int(* get_chunk)(uint32_t chunk_num, void *afh_context, const char **buf, uint32_t *len)
Return a reference to one chunk.
Definition: afh.h:114
afs_info::amp
uint8_t amp
Amplification value.
Definition: afs.h:20
RECEIVER
#define RECEIVER(_a)
Definition: audiod.c:95
send_cred_buffer
ssize_t send_cred_buffer(int sock, char *buf)
Send a buffer and the credentials of the current process to a socket.
Definition: net.c:1030
i9e_client_info::line_handler
int(* line_handler)(char *line)
Complete input lines are passed to this callback function.
Definition: interactive.h:57
mp4_callback
Callbacks provided by the user of the mp4 parsing API.
Definition: mp4.h:17
SENDER_add
@ SENDER_add
Add a target (udp only).
Definition: send.h:27
version_handle_flag
void version_handle_flag(const char *pfx, bool flag)
Print the version text and exit successfully.
Definition: version.c:63
mood_check_callback
int mood_check_callback(struct afs_callback_arg *aca)
Check all moods for syntax errors.
Definition: mood.c:216
sender::pre_monitor
void(* pre_monitor)(struct sched *s)
Ask the scheduler to monitor file descriptors.
Definition: send.h:81
create_shifted_argv
int create_shifted_argv(const char *buf, const char *delim, char ***result)
Split a buffer into words, offset one.
Definition: string.c:819
check_wav_shutdown
void check_wav_shutdown(struct check_wav_context *cwc)
Dellocate all ressources of a check_wav instance.
Definition: check_wav.c:231
sched_min_delay
void sched_min_delay(struct sched *s)
Set the I/O timeout to the minimal possible value.
Definition: sched.c:359
close_stat_clients
void close_stat_clients(void)
Empty the status clients list.
Definition: audiod_command.c:128
fec_client_parms::send_fec
void(* send_fec)(struct sender_client *sc, char *buf, size_t len)
Push out FEC-encoded packets.
Definition: send.h:165
PRIVATE_PEM_KEY_FOOTER
#define PRIVATE_PEM_KEY_FOOTER
Private PEM keys (legacy format) end with this footer.
Definition: crypt_common.c:263
i9e_complete_option
void i9e_complete_option(char **opts, struct i9e_completion_info *ci, struct i9e_completion_result *cr)
Complete according to the given options.
Definition: interactive.c:710
FOR_EACH_BUDDY_SAFE
#define FOR_EACH_BUDDY_SAFE(_buddy, _tmp_buddy, _list)
Definition: sync_filter.c:51
apc_free_pubkey
void apc_free_pubkey(struct asymmetric_key *pub)
Deallocate a public key.
Definition: openssl.c:305
mp4_num_samples
uint32_t mp4_num_samples(const struct mp4 *f)
Return the number of samples of the audio track.
Definition: mp4.c:820
afsi_offsets
afsi_offsets
Describes the layout of the mmapped-afs info struct.
Definition: aft.c:130
bitstream.h
Bitstream structures and inline functions.
process_is_command_handler
bool process_is_command_handler(void)
Tell whether the executing process is a command handler.
Definition: server.c:99
stat_item_values
char * stat_item_values[NUM_STAT_ITEMS]
Dummy version which only contains NULL pointers.
Definition: filter.c:42
opus_header::nb_streams
int nb_streams
Number of logical streams (usually 1).
Definition: opus_common.h:21
SBD_AWAITING_DATA
@ SBD_AWAITING_DATA
Definition: sideband.h:66
I9E_DUMMY_COMPLETER
#define I9E_DUMMY_COMPLETER(name)
Define a completer which does nothing.
Definition: interactive.h:32
aft_check_callback
int aft_check_callback(struct afs_callback_arg *aca)
Check the audio file table for inconsistencies.
Definition: aft.c:2523
OPT_ADD
#define OPT_ADD(fo, lev, opt, val, len)
Flowopt shortcut.
Definition: dccp_recv.c:67
spx_header_info::stereo
SpeexStereoState stereo
Only needed for stereo streams.
Definition: spx.h:27
rmatt_event_data::bitnum
unsigned char bitnum
Its bit number.
Definition: afs.h:63
ringbuffer_get
void * ringbuffer_get(struct ringbuffer *rb, int num)
Get one entry from a ringbuffer.
Definition: ringbuffer.c:83
grab_client_new
int grab_client_new(int fd, struct lls_parse_result *lpr, struct sched *s)
Create and activate a grab client.
Definition: grab_client.c:261
afs_callback_arg::pbout
struct para_buffer pbout
Will be written on band SBD_OUTPUT, fully buffered.
Definition: afs.h:159
buffer_tree.h
Buffer tree management.
receiver_node
Describes one instance of a receiver.
Definition: recv.h:8
string_compare
int string_compare(const struct osl_object *obj1, const struct osl_object *obj2)
Compare two osl objects of string type.
Definition: afs.c:351
btr_exec_up
int btr_exec_up(struct btr_node *btrn, const char *command, char **value_result)
Execute an inter-node command on the given node or on a parent node.
Definition: buffer_tree.c:906
pattern_match_flags
pattern_match_flags
Flags passed to for_each_matching_row().
Definition: afs.h:119
hash2_function
void hash2_function(const char *data, unsigned long len, unsigned char *hash)
Compute the hash2 of the given input data.
Definition: openssl.c:419
shm_get_shmmax
size_t shm_get_shmmax(void)
Get the maximal size of a shared memory area.
Definition: ipc.c:211
WRITE_STATUS_ITEM
#define WRITE_STATUS_ITEM(b, n, f,...)
Write the contents of a status item to a para_buffer.
Definition: string.h:59
mp_init
int mp_init(const char *definition, int nbytes, struct mp_context **result, char **errmsg)
Initialize the mood parser.
Definition: mp.c:507
gui_theme::sep
struct gui_color_spec sep
Color for the separator line.
Definition: gui.h:56
i9e_completion_info::word
char * word
The word the cursor is in.
Definition: interactive.h:10
shutdown_clients
void shutdown_clients(struct sender_status *ss)
Shut down all clients connected to a paraslash sender.
Definition: send_common.c:68
mp_init
int mp_init(const char *definition, int nbytes, struct mp_context **result, char **errmsg)
Initialize the mood parser.
Definition: mp.c:507
btr_remove_node
void btr_remove_node(struct btr_node **btrnp)
Remove a node from a buffer tree.
Definition: buffer_tree.c:787
daemon_set_hooks
void daemon_set_hooks(void(*pre_log_hook)(void), void(*post_log_hook)(void))
Register functions to be called before and after a message is logged.
Definition: daemon.c:184
open_and_update_audio_file
int open_and_update_audio_file(int *fd)
Open the audio file with highest score and set up an afd structure.
Definition: aft.c:1043
afh_get_start_chunk
int32_t afh_get_start_chunk(int32_t approx_chunk_num, const struct afh_info *afhi, uint8_t audio_format_id)
Find a suitable start chunk.
Definition: afh_common.c:313
tv2ms
long unsigned tv2ms(const struct timeval *tv)
Convert struct timeval to milliseconds.
Definition: time.c:13
key_value_copy
char * key_value_copy(const char *src, size_t len, const char *key)
Copy the value of a key=value pair.
Definition: string.c:891
del_close_on_fork_list
void del_close_on_fork_list(int fd)
Delete one file descriptor from the close-on-fork list.
Definition: close_on_fork.c:51
oac_rewrite_tags
int oac_rewrite_tags(const char *map, size_t map_sz, int fd, char *meta_packet, size_t meta_sz)
Change meta tags of ogg files.
Definition: ogg_afh_common.c:225
writer_node::btrn
struct btr_node * btrn
The buffer tree node associated with this writer node.
Definition: write.h:16
SOCK_DCCP
#define SOCK_DCCP
Linux socket type.
Definition: net.c:235
PARA_DEBUG_LOG
#define PARA_DEBUG_LOG(f,...)
Definition: para.h:217
imdct_end
void imdct_end(struct mdct_context *ctx)
Deallocate imdct resources.
Definition: imdct.c:399
version_text
const char * version_text(const char *pfx)
Get the full version text.
Definition: version.c:37
OPUSDEC_MAX_OUTPUT_SIZE
#define OPUSDEC_MAX_OUTPUT_SIZE
Definition: opusdec_filter.c:208
oac_callback_info::packet_callback
int(* packet_callback)(ogg_packet *packet, int packet_num, int serial, struct afh_info *afhi, void *private_data)
ogg_get_file_info() calls this function for the first three ogg packets, or until the callback return...
Definition: ogg_afh_common.h:32
i9e_completer::completer
void(* completer)(struct i9e_completion_info *, struct i9e_completion_result *)
The completer returns all possible completions via the second parameter.
Definition: interactive.h:44
oac_custom_header_append
int oac_custom_header_append(ogg_packet *op, struct oac_custom_header *h)
Submit an ogg packet to a custom header structure.
Definition: ogg_afh_common.c:397
generic_com_allow
void generic_com_allow(struct sender_command_data *scd, struct sender_status *ss)
Allow connections from the given range of IP addresses.
Definition: send_common.c:235
handle_connect
int handle_connect(int fd)
Perform user authentication and execute a command.
Definition: command.c:915
OPT_GIVEN
#define OPT_GIVEN(_cmd, _opt)
Definition: mixer.c:39
client_connect
int client_connect(struct client_task *ct, struct sched *s, struct btr_node *parent, struct btr_node *child)
Connect to para_server and register the client task.
Definition: client_common.c:487
sender::send
void(* send)(long unsigned current_chunk, long unsigned chunks_sent, const char *buf, size_t len, const char *header_buf, size_t header_len)
The send-hook.
Definition: send.h:77
daemon_get_uptime
time_t daemon_get_uptime(const struct timeval *current_time)
Get the uptime.
Definition: daemon.c:414
xasprintf
__printf_2_3 unsigned xasprintf(char **result, const char *fmt,...)
Print to a dynamically allocated string, variable number of arguments.
Definition: string.c:213
ATS_INITIAL
@ ATS_INITIAL
We haven't encountered an mp4a atom so far.
Definition: mp4.c:31
sender_client::cq
struct chunk_queue * cq
The list of pending chunks for this client.
Definition: send.h:128
client_parse_config
int client_parse_config(int argc, char *argv[], struct client_task **ct_ptr, int *loglevel)
Parse a client configuration.
Definition: client_common.c:555
mmap_full_file
int mmap_full_file(const char *path, int open_mode, void **map, size_t *size, int *fd_ptr)
Open a file and map it into memory.
Definition: fd.c:435
NUM_THEMES
#define NUM_THEMES
Number of elements in the themes array.
Definition: gui_theme.c:370
NUM_AFT_COLUMNS
@ NUM_AFT_COLUMNS
The number of columns of this table.
Definition: aft.c:213
stat_item_data::prefix
const char * prefix
Text to print before the item content.
Definition: gui.h:16
arr_zalloc
__must_check __malloc void * arr_zalloc(size_t nmemb, size_t size)
Allocate and initialize an array, abort on failure or bugs.
Definition: string.c:75
sc_trafo
_static_inline_ void sc_trafo(struct iovec *src, struct iovec *dst, void *trafo_context)
Wrapper for sc_crypt() that can be used as a sideband transformation.
Definition: crypt.h:152
para_random
_static_inline_ long int para_random(unsigned max)
Return a random non-negative integer in an interval.
Definition: para.h:110
pass_buffer_as_shm
int pass_buffer_as_shm(int fd, uint8_t band, const char *buf, size_t size)
Send data as shared memory to a file descriptor.
Definition: afs.c:688
DCCP_MAX_HOST_CCIDS
#define DCCP_MAX_HOST_CCIDS
Functions and definitions to support IPPROTO_DCCP.
Definition: net.h:81
btr_merge
void btr_merge(struct btr_node *btrn, size_t dest_size)
Combine input queue buffers.
Definition: buffer_tree.c:1101
mmd_mutex
int mmd_mutex
The mutex protecting the shared memory area containing the mmd struct.
Definition: server.c:77
ENDIAN
#define ENDIAN
Determine byte sex.
Definition: oggdec_filter.c:20
shm_attach_mode
shm_attach_mode
possible values for shm_attach()
Definition: ipc.h:4
asf_header_info::sample_rate
uint16_t sample_rate
One of the 5 possible sample rates.
Definition: wma.h:16
btr_get_input_queue_size
size_t btr_get_input_queue_size(struct btr_node *btrn)
Return the amount of available input bytes of a buffer tree node.
Definition: buffer_tree.c:819
get_random_bytes_or_die
void get_random_bytes_or_die(unsigned char *buf, int num)
Fill a buffer with random content.
Definition: openssl.c:27
taginfo
The tags used by all audio format handlers.
Definition: afh.h:11
OPT_RESULT
#define OPT_RESULT(_name, _lpr)
Definition: write.c:27
AFSI_CHANGE
@ AFSI_CHANGE
The afs info struct of an audio file changed.
Definition: afs.h:39
AFSI_AUDIO_FORMAT_ID_OFFSET
@ AFSI_AUDIO_FORMAT_ID_OFFSET
Storage position of the .audio_format_id field.
Definition: aft.c:142
AFSI_NUM_PLAYED_OFFSET
@ AFSI_NUM_PLAYED_OFFSET
Storage position of the .num_played field.
Definition: aft.c:136
ms2tv
void ms2tv(long unsigned n, struct timeval *tv)
Convert milliseconds to a struct timeval.
Definition: time.c:24
get_afhi_of_row
int get_afhi_of_row(const struct osl_row *row, struct afh_info *afhi)
Get the audio format handler info, given a row of the audio file table.
Definition: aft.c:590
mp_re_pattern
Parsed regex pattern.
Definition: mp.h:27
print_receiver_helps
void print_receiver_helps(bool detailed)
Print out the help texts to all receivers.
Definition: recv_common.c:80
shutdown_clients
void shutdown_clients(struct sender_status *ss)
Shut down all clients connected to a paraslash sender.
Definition: send_common.c:68
writer_node::task
struct task * task
The task of this writer node.
Definition: write.h:18
afs_error
__printf_2_3 void afs_error(const struct afs_callback_arg *aca, const char *fmt,...)
Format and send an error message to the command handler.
Definition: afs.c:739
IS_LLS_ERROR
#define IS_LLS_ERROR(num)
Check whether the lopsub error bit is set.
Definition: error.h:271
grab_client_new
int grab_client_new(int fd, struct lls_parse_result *lpr, struct sched *s)
Create and activate a grab client.
Definition: grab_client.c:261
WRITE_CMD_OPT_STRING_VAL
#define WRITE_CMD_OPT_STRING_VAL(_cmd, _opt, _lpr)
Definition: write.h:63
hash2_function
void hash2_function(const char *data, unsigned long len, unsigned char *hash)
Compute the hash2 of the given input data.
Definition: gcrypt.c:49
score_clear
void score_clear(void)
Remove all entries from the score table, but keep the table open.
Definition: score.c:319
SBD_CHALLENGE_RESPONSE
@ SBD_CHALLENGE_RESPONSE
Definition: sideband.h:66
CAB_PATH_OFFSET
@ CAB_PATH_OFFSET
Start of the path of the audio file.
Definition: aft.c:1573
tv_convex_combination
int tv_convex_combination(const long a, const struct timeval *tv1, const long b, const struct timeval *tv2, struct timeval *result)
Compute a convex combination of two time values.
Definition: time.c:130
opus_header::preskip
uint16_t preskip
Number of bytes to skip from the beginning.
Definition: opus_common.h:15
clear_and_dump_items
void clear_and_dump_items(void)
Flush and send all status items.
Definition: audiod_command.c:496
para_log
__printf_2_3 void(* para_log)(int, const char *,...)
The log function of para_gui, always set to curses_log().
Definition: mixer.c:64
afs_table_operations
Methods for table startup/shutdown and event handling.
Definition: afs.h:77
SB_DESIGNATORS
#define SB_DESIGNATORS
The valid sideband designators.
Definition: sideband.h:24
OPT_RESULT
#define OPT_RESULT(_name)
Definition: audiod.c:43
mp4_get_meta
struct mp4_metadata * mp4_get_meta(struct mp4 *f)
Return the metadata of an mp4 file.
Definition: mp4.c:865
generic_recv_pre_monitor
int generic_recv_pre_monitor(struct sched *s, struct receiver_node *rn)
Request a minimal timeout in case of buffer tree errors.
Definition: recv_common.c:113
audiod_cmd_handler_t
int(* audiod_cmd_handler_t)(int, struct lls_parse_result *)
Pointer to a command handler function.
Definition: audiod_command.c:39
mp4_set_sample_position
int mp4_set_sample_position(struct mp4 *f, uint32_t sample)
Reposition the read/write file offset.
Definition: mp4.c:731
AFSI_AMP_OFFSET
@ AFSI_AMP_OFFSET
Storage position of the amplification field.
Definition: aft.c:144
ATOM_DATE
@ ATOM_DATE
Definition: mp4.c:161
OPT_UINT32_VAL
#define OPT_UINT32_VAL(_name)
Definition: gui.c:35
stdin_task::fd_flags
int fd_flags
The descriptor flags of STDIN at startup.
Definition: stdin.h:14
PARA_NOTICE_LOG
#define PARA_NOTICE_LOG(f,...)
Definition: para.h:219
score_close
void score_close(struct osl_table *t)
Free all volatile objects, then close the table.
Definition: score.c:284
btr_add_output_dont_free
void btr_add_output_dont_free(const char *buf, size_t size, struct btr_node *btrn)
Insert a buffer into the buffer tree, non-freeing variant.
Definition: buffer_tree.c:411
i9e_complete_commands
char ** i9e_complete_commands(const char *word, struct i9e_completer *completers)
Return the list of partially matching words.
Definition: interactive.c:669
FEC_STATE_READY_TO_RUN
@ FEC_STATE_READY_TO_RUN
initialized and enabled
Definition: vss.c:126
UDP_MAX_UNREACHABLE_TIME
#define UDP_MAX_UNREACHABLE_TIME
Time window during which ICMP Destination/Port Unreachable messages are ignored, covering transient r...
Definition: udp_send.c:36
SBD_ANY
@ SBD_ANY
Definition: sideband.h:66
mp4_callback::seek
off_t(* seek)(void *user_data, off_t offset, int whence)
This method is assumed to succeed.
Definition: mp4.h:30
lsg_filter_cmd_com_flacdec_user_data
const struct filter lsg_filter_cmd_com_flacdec_user_data
Definition: flacdec_filter.c:294
sched_monitor_writefd
void sched_monitor_writefd(int fd, struct sched *s)
Instruct the scheduler to monitor an fd for readiness for writing.
Definition: sched.c:512
i9e_print_status_bar
void i9e_print_status_bar(char *buf, unsigned len)
Print the current status to stderr.
Definition: interactive.c:550
FELF_READ_ONLY
@ FELF_READ_ONLY
Activate read-only mode.
Definition: string.h:40
vss_next
unsigned int vss_next(void)
Check if the N (next) status flag is set.
Definition: vss.c:759
sender_command_data::host
char host[MAX_HOSTLEN]
Used for the allow/deny/add/remove subcommands.
Definition: server.h:15
PKT_PEM
#define PKT_PEM
Legacy PEM keys (openssh-7.7 and earlier, paraslash.0.6.2 and earlier)
Definition: crypt_backend.h:15
send_afs_status
int send_afs_status(struct command_context *cc, int parser_friendly)
Get the current afs status items from the afs process and send it.
Definition: aft.c:2473
DF_LOG_TIMING
@ DF_LOG_TIMING
Include milliseconds in log output.
Definition: daemon.h:36
audiod_status
int audiod_status
The current mode of operation (AUDIOD_OFF, AUDIOD_ON or AUDIOD_STANDBY).
Definition: audiod.c:166
CHUNKS_TOTAL_OFFSET
@ CHUNKS_TOTAL_OFFSET
The total number of chunks (4 bytes).
Definition: aft.c:307
fec_decode
int fec_decode(struct fec_parms *parms, unsigned char **data, int *idx, int sz)
Decode one slice from the group of received slices.
Definition: fec.c:597
afs_socket_status
afs_socket_status
The possible states of the afs socket.
Definition: vss.c:43
para_open
int para_open(const char *path, int flags, mode_t mode)
Wrapper for the open(2) system call.
Definition: fd.c:380
mood_load
int mood_load(const char *mood_name, struct mood_instance **result, char **msg)
Populate a score table with admissible files for the given mood.
Definition: mood.c:623
shm_new
int shm_new(size_t size)
Create a new shared memory area of given size.
Definition: ipc.c:116
ATOM_STCO
@ ATOM_STCO
Definition: mp4.c:161
client_task::features
char ** features
List of features supported by the server.
Definition: client.h:46
HIGH_BAND_MAX_SIZE
#define HIGH_BAND_MAX_SIZE
Definition: wmadec_filter.c:42
decode_private_key
int decode_private_key(const char *key_file, unsigned char **result, size_t *blob_size)
Decode an openssh-v1 (aka RFC4716) or PEM (aka ASN.1) private key.
Definition: crypt_common.c:280
MAD_TO_SHORT
#define MAD_TO_SHORT(f)
Convert a sample value from libmad to a signed short.
Definition: mp3dec_filter.c:19
color.h
Exported functions from color.c.
sb_buffer::iov
struct iovec iov
Data and length.
Definition: sideband.h:83
recv_sb
int recv_sb(struct stream_cipher_context *scc, enum sb_designator expected_band, size_t max_size, struct iovec *result)
Receive a sideband packet from a blocking file descriptor.
Definition: command.c:292
btr_pushdown_one
void btr_pushdown_one(struct btr_node *btrn)
Feed the next buffer of the input queue through the output channel.
Definition: buffer_tree.c:520
afs_table_operations::event_handler
int(* event_handler)(enum afs_events event, struct para_buffer *pb, void *data)
Handle events generated by other tables.
Definition: afs.h:85
para_mmap
int para_mmap(size_t length, int prot, int flags, int fd, void *map)
Paraslash's wrapper for mmap.
Definition: fd.c:351
U32_OPTVAL
#define U32_OPTVAL(_opt, _lpr)
Definition: compress_filter.c:21
AFTCOL_HASH
@ AFTCOL_HASH
The hash on the content of the audio file.
Definition: upgrade_db.c:116
taginfo::comment
char * comment
COMM/COMMENT/cmt.
Definition: afh.h:21
FOR_EACH_SLOT
#define FOR_EACH_SLOT(_slot)
Iterate over all slots.
Definition: audiod.c:101
gui_theme::err_msg
struct gui_color_spec err_msg
Color for severe log messages.
Definition: gui.h:54
sb_get_send_buffers
int sb_get_send_buffers(struct sb_context *c, struct iovec iov[2])
Obtain pointer(s) to the sideband send buffer(s).
Definition: sideband.c:127
parse_quoted_string
unsigned parse_quoted_string(const char *src, const char quote_chars[2], char **result)
Parse a (generalized) string literal.
Definition: mp.c:84
clock_get_realtime
struct timeval * clock_get_realtime(struct timeval *tv)
Retrieve the time of the realtime clock.
Definition: time.c:194
accept_sender_client
struct sender_client * accept_sender_client(struct sender_status *ss)
Accept a connection on the socket(s) this server is listening on.
Definition: send_common.c:369
NUM_LOGLEVELS
@ NUM_LOGLEVELS
Definition: para.h:215
udp_sender
const struct sender udp_sender
The UDP sender.
Definition: udp_send.c:448
stat_item_data::len
unsigned len
Item width, including prefix and postfix.
Definition: gui.h:20
btr_pool_get_buffers
int btr_pool_get_buffers(struct btr_pool *btrp, struct iovec iov[2])
Get references to buffers pointing to free space of the buffer pool area.
Definition: buffer_tree.c:177
mmd_mutex
int mmd_mutex
The mutex protecting the shared memory area containing the mmd struct.
Definition: server.c:77
btr_add_output
void btr_add_output(char *buf, size_t size, struct btr_node *btrn)
Insert a malloced buffer into the buffer tree.
Definition: buffer_tree.c:381
GM_PEDANTIC
@ GM_PEDANTIC
Close fd if write would block.
Definition: grab_client.c:30
VSS_STATUS_FLAG_PLAYING
@ VSS_STATUS_FLAG_PLAYING
The 'P' flag is set.
Definition: audiod.c:115
audio_track_state
audio_track_state
The three states of the mp4 parser.
Definition: mp4.c:29
WMA_OUTPUT_BUFFER_SIZE
#define WMA_OUTPUT_BUFFER_SIZE
Definition: wmadec_filter.c:1159
lsg_filter_cmd_com_aacdec_user_data
const struct filter lsg_filter_cmd_com_aacdec_user_data
Definition: aacdec_filter.c:158
sender_client::private_data
void * private_data
Data specific to the particular sender.
Definition: send.h:130
for_each_line
int for_each_line(unsigned flags, char *buf, size_t size, line_handler_t *line_handler, void *private_data)
Call a custom function for each complete line.
Definition: string.c:382
uudecode
int uudecode(char const *src, size_t encoded_size, char **result, size_t *decoded_size)
Decode a buffer using the uuencode Base64 algorithm.
Definition: base64.c:191
wma_log2
__a_const int wma_log2(unsigned int v)
Compute the base-2 logarithm.
Definition: wma_common.c:166
NUM_INTERNALLY_MAPPED_KEYS
#define NUM_INTERNALLY_MAPPED_KEYS
Definition: play.c:534
clear_afhi
void clear_afhi(struct afh_info *afhi)
Deallocate the contents of an afh_info structure.
Definition: afh_common.c:209
i9e_get_error
int i9e_get_error(void)
Return the error state of the i9e task.
Definition: interactive.c:50
stdin_task::must_set_nonblock_flag
bool must_set_nonblock_flag
Whether we have to set STDIN to nonblocking mode.
Definition: stdin.h:16
sb_received
int sb_received(struct sb_context *c, size_t nbytes, struct sb_buffer *result)
Update the sideband context after data has been received.
Definition: sideband.c:213
cq_peek
struct queued_chunk * cq_peek(struct chunk_queue *cq)
Lookup the next chunk in the queue.
Definition: chunk_queue.c:71
xpoll
int xpoll(struct pollfd *fds, nfds_t nfds, int timeout)
Simple wrapper for poll(2).
Definition: fd.c:519
asf_header_info
Information contained in an asf audio file header.
Definition: wma.h:8
SBB_INIT
#define SBB_INIT(_band, _buf, _numbytes)
Initialize a sideband buffer.
Definition: sideband.h:115
afs_table_operations::create
int(* create)(const char *)
Called from the init command.
Definition: afs.h:83
writer_node::private_data
void * private_data
Writer-specific data.
Definition: write.h:12
para_next_signal
int para_next_signal(void)
Return the number of the next pending signal.
Definition: signal.c:212
gui.h
symbols used by gui and gui_theme
LOGLEVELS
@ LOGLEVELS
Definition: para.h:215
CMUL
#define CMUL(pre, pim, are, aim, bre, bim)
Definition: imdct.c:248
misc_meta_data::offset
long offset
The milliseconds that have been skipped of the current audio file.
Definition: server.h:54
afs_max_size_handler_data::fd
int fd
Local socket connecting the command handler and the AFS process.
Definition: afs.h:199
score_open
void score_open(struct osl_table **result)
Allocate a score table instance.
Definition: score.c:308
asf_header_info::block_align
uint16_t block_align
Size of one data block.
Definition: wma.h:18
cq_dequeue
void cq_dequeue(struct chunk_queue *cq)
Remove the current chunk from the queue.
Definition: chunk_queue.c:83
get_random_bytes_or_die
void get_random_bytes_or_die(unsigned char *buf, int num)
Fill a buffer with random content.
Definition: gcrypt.c:65
ATOM_MDHD
@ ATOM_MDHD
Definition: mp4.c:161
mp4_get_meta
struct mp4_metadata * mp4_get_meta(struct mp4 *f)
Return the metadata of an mp4 file.
Definition: mp4.c:865
format_url
__malloc char * format_url(const char *url, int default_port)
Pretty-print a host/port pair.
Definition: net.c:193
mutex_lock
void mutex_lock(int id)
Lock the given mutex.
Definition: ipc.c:68
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.
Definition: vss.c:656
afh_info::chunk_tv
struct timeval chunk_tv
Period of time between sending data chunks.
Definition: afh.h:42
audio_format_handler::suffixes
const char *const * suffixes
Typical file endings for files that can be handled by this afh.
Definition: afh.h:82
ringbuffer_new
struct ringbuffer * ringbuffer_new(unsigned size)
Initialize a new ringbuffer.
Definition: ringbuffer.c:42
create_local_socket
int create_local_socket(const char *name)
Create a socket for local communication and listen on it.
Definition: net.c:938
wav_params::sample_format_given
int sample_format_given
Whether the sample format was given.
Definition: check_wav.h:25
para_buffer::buf
char * buf
The buffer.
Definition: string.h:14
task_notify_all
void task_notify_all(struct sched *s, int err)
Set the notification value of all tasks of a scheduler instance.
Definition: sched.c:344
list_for_each_entry_safe
#define list_for_each_entry_safe(pos, n, head, member)
Iterate over list, safe against removal of list entry.
Definition: list.h:147
stat_item_data
How to display one status item.
Definition: gui.h:15
stat_item_data::align
int align
How to align this item.
Definition: gui.h:22
PARA_ERROR_LOG
#define PARA_ERROR_LOG(f,...)
Definition: para.h:221
free_argv
void free_argv(char **argv)
Free an array of words created by create_argv() or create_shifted_argv().
Definition: string.c:745
user_list.h
exported functions from user_list.c
mutex_new
int mutex_new(void)
Define a new mutex.
Definition: ipc.c:23
LS_MODE_MBOX
@ LS_MODE_MBOX
-l=v
Definition: aft.c:73
vlc::table_size
int table_size
The size of the table.
Definition: bitstream.h:28
btr_node_description::handler
btr_command_handler handler
Used for inter node communication.
Definition: buffer_tree.h:164
cq_destroy
void cq_destroy(struct chunk_queue *cq)
Deallocate all resources of this queue.
Definition: chunk_queue.c:145
client_task::user
char * user
Paraslash user name.
Definition: client.h:42
AFTCOL_PATH
@ AFTCOL_PATH
The full path in the filesystem.
Definition: upgrade_db.c:118
afs_event
__must_check int afs_event(enum afs_events event, struct para_buffer *pb, void *data)
The afs event dispatcher.
Definition: afs.c:1133
PARA_EMERG_LOG
#define PARA_EMERG_LOG(f,...)
Definition: para.h:223
arr_realloc
__must_check void * arr_realloc(void *ptr, size_t nmemb, size_t size)
Reallocate an array, abort on failure or bugs.
Definition: string.c:33
user_list_deplete
void user_list_deplete(void)
Remove all entries from the user list.
Definition: user_list.c:48
asn1_types
asn1_types
ASN Types and their code.
Definition: gcrypt.c:125
spx_header_info::bitrate
int bitrate
Current bitrate used by the decoder.
Definition: spx.h:21
btr_log_tree
void btr_log_tree(struct btr_node *btrn, int ll)
Write the current buffer (sub-)tree to the log.
Definition: buffer_tree.c:1142
asf_header_info::channels
uint8_t channels
Number of channels.
Definition: wma.h:14
para_printf
__printf_2_3 int para_printf(struct para_buffer *b, const char *fmt,...)
Safely print into a buffer at a given offset.
Definition: string.c:505
pattern_match_data::lpr
struct lls_parse_result * lpr
Obtained by deserializing the query buffer in the callback.
Definition: afs.h:141
client_task::status
int status
The state of the connection.
Definition: client.h:28
write_va_buffer
__printf_2_3 int write_va_buffer(int fd, const char *fmt,...)
A fprintf-like function for raw file descriptors.
Definition: fd.c:169
alloc
__must_check __malloc void * alloc(size_t size)
Paraslash's version of malloc().
Definition: string.c:133
filter_node
Describes one running instance of a filter.
Definition: filter.h:8
ATOM_STTS
@ ATOM_STTS
Definition: mp4.c:161
check_private_key_file
int check_private_key_file(const char *file)
Check existence and permissions of a private key file.
Definition: crypt_common.c:127
mp_semantic_value::boolval
bool boolval
Comparators, =~ and =|.
Definition: mp.h:51
get_attribute_bitmap
void get_attribute_bitmap(const uint64_t *atts, char *buf)
Return a binary representation of the given attribute value.
Definition: attribute.c:365
sender_client::header_sent
int header_sent
Non-zero if audio file header has been sent.
Definition: send.h:126
LS_SORT_BY_PATH
@ LS_SORT_BY_PATH
-s=p (default)
Definition: aft.c:54
acl_deny
void acl_deny(char *addr, int mask, struct list_head *acl, int default_deny)
Deny access for a range of IP addresses.
Definition: acl.c:187
daemon_set_start_time
void daemon_set_start_time(void)
Set the startup time.
Definition: daemon.c:397
gui_theme::msg
struct gui_color_spec msg
Color for log messages of moderate severity.
Definition: gui.h:52
daemon_set_logfile
void daemon_set_logfile(const char *logfile_name)
Init or change the name of the log file.
Definition: daemon.c:129
OGGDEC_OUTPUT_CHUNK_SIZE
#define OGGDEC_OUTPUT_CHUNK_SIZE
Allocate chunks of this size and produce at most one chunk of output per ->post_monitor() invocation.
Definition: oggdec_filter.c:185
MIN_STAT_ITEM_LEN
#define MIN_STAT_ITEM_LEN
The minimal length of a status item buffer.
Definition: stat.c:16
stat_item_data::x
unsigned x
Horizontal start coordinate for this item.
Definition: gui.h:18
RIGHT
#define RIGHT
Status item text should be right-aligned.
Definition: gui.h:66
audio_format_handler
Structure for audio format handling.
Definition: afh.h:80
HTTP_GOT_GET_REQUEST
@ HTTP_GOT_GET_REQUEST
Successfully received the get request.
Definition: http_send.c:38
get_attribute_bitnum_by_name
int get_attribute_bitnum_by_name(const char *att_name, unsigned char *bitnum)
Retrieve the identifier (number) of an attribute.
Definition: attribute.c:91
daemon_set_flag
void daemon_set_flag(unsigned flag)
Set one of the daemon config flags.
Definition: daemon.c:197
mp4_tag
Specifies one metadata tag.
Definition: mp4.h:46
i9e_ll_completer
void i9e_ll_completer(struct i9e_completion_info *ci, struct i9e_completion_result *cr)
Complete on severity strings.
Definition: interactive.c:808
check_wav_init
struct check_wav_context * check_wav_init(struct btr_node *parent, struct btr_node *child, struct wav_params *params, struct btr_node **cw_btrn)
Allocate and set up a new check_wav instance.
Definition: check_wav.c:206
i9e_completion_info::buffer
char * buffer
The full line.
Definition: interactive.h:9
read_asf_header
int read_asf_header(const char *buf, int loaded, struct asf_header_info *ahi)
Read an asf audio file header.
Definition: wma_common.c:87
check_wav_shutdown
void check_wav_shutdown(struct check_wav_context *cwc)
Dellocate all ressources of a check_wav instance.
Definition: check_wav.c:231
FILTER_CMD_OPT_UINT32_VAL
#define FILTER_CMD_OPT_UINT32_VAL(_cmd, _opt, _lpr)
Definition: filter.h:110
list.h
Doubly linked list implementation.
task_info
Information that must be supplied by callers of task_register().
Definition: sched.h:41
theme_next
void theme_next(struct gui_theme *t)
Activate the next available theme.
Definition: gui_theme.c:432
uudecode
int uudecode(char const *src, size_t encoded_size, char **result, size_t *decoded_size)
Decode a buffer using the uuencode Base64 algorithm.
Definition: base64.c:191
sender::post_monitor
void(* post_monitor)(struct sched *s)
Perform I/O on the file descriptors which are ready.
Definition: send.h:83
stat_item_data::postfix
const char * postfix
Text to print after item content.
Definition: gui.h:17
ATTCOL_NAME
@ ATTCOL_NAME
The name of the attribute.
Definition: attribute.c:28
imdct_init
int imdct_init(int nbits, struct mdct_context **result)
Initialize the inverse modified cosine transform.
Definition: imdct.c:363
create_argv
int create_argv(const char *buf, const char *delim, char ***result)
Split a buffer into words.
Definition: string.c:800
state_change_request_type
state_change_request_type
Describes a request to change the state of para_play.
Definition: play.c:48
process_is_command_handler
bool process_is_command_handler(void)
Tell whether the executing process is a command handler.
Definition: server.c:99
SENDER_delete
@ SENDER_delete
Delete a target (udp only).
Definition: send.h:27
mp4_callback::write
ssize_t(* write)(void *user_data, void *buffer, size_t count)
Like the write() system call, this should return the number of bytes written.
Definition: mp4.h:36
read_and_compare
int read_and_compare(int fd, const char *expectation)
Read a buffer and compare its contents to a string, ignoring case.
Definition: fd.c:278
sched::pfd
struct pollfd * pfd
Passed to poll(2).
Definition: sched.h:23
CAB_AFHI_OFFSET_POS
@ CAB_AFHI_OFFSET_POS
Definition: aft.c:1563
mp_semantic_value::strval
char * strval
String literals, tags, path.
Definition: mp.h:52
get_task_list
char * get_task_list(struct sched *s)
Get the list of all registered tasks.
Definition: sched.c:255
afs_callback_arg::query
struct osl_object query
Callback-specific data.
Definition: afs.h:157
HTTP_CONNECTED
@ HTTP_CONNECTED
Definition: http_recv.c:31
taginfo::title
char * title
TIT2/TITLE/nam.
Definition: afh.h:15
lsg_filter_cmd_com_oggdec_user_data
const struct filter lsg_filter_cmd_com_oggdec_user_data
Definition: oggdec_filter.c:262
BLOBCOL_ID
@ BLOBCOL_ID
The identifier, a positive integer that never repeats.
Definition: afs.h:312
hash2_compare
int hash2_compare(const unsigned char *h1, const unsigned char *h2)
Compare two version 2 hashes.
Definition: crypt_common.c:175
client_open
int client_open(int argc, char *argv[], struct client_task **ct_ptr, int *loglevel, struct btr_node *parent, struct btr_node *child, struct sched *sched)
Parse the client configuration and open a connection to para_server.
Definition: client_common.c:631
user::pubkey
struct asymmetric_key * pubkey
The public key.
Definition: user_list.h:30
server.h
Common server data structures.
CL_SENDING
@ CL_SENDING
Server is expecting data (addblob commands only).
Definition: client.h:22
mp_wc_pattern
Parsed wildcard pattern.
Definition: mp.h:33
wav_params::sample_rate_arg
int sample_rate_arg
Same semantics as channels_count.
Definition: check_wav.h:19
receiver_node::fd
int fd
The file descriptor to receive the stream.
Definition: recv.h:33
btr_search_node
struct btr_node * btr_search_node(const char *name, struct btr_node *root)
Find the node with the given name in the buffer tree.
Definition: buffer_tree.c:1157
CL_SENT_CH_RESPONSE
@ CL_SENT_CH_RESPONSE
Client solves the challenge and sends the result.
Definition: client.h:16
net.h
exported symbols from net.c
ATOM_META
@ ATOM_META
Definition: mp4.c:161
LLS_COPY_WAV_PARMS
#define LLS_COPY_WAV_PARMS(_dst, _pfx, _lpr)
Definition: check_wav.h:28
afs_socket_cookie
uint32_t afs_socket_cookie
A random number used to "authenticate" the afs connection.
Definition: server.c:74
sender::help
char *(* help)(void)
Return the help text of this sender.
Definition: send.h:60
PARA_MIN
#define PARA_MIN(x, y)
Compute the minimum of x and y.
Definition: para.h:31
shm_destroy
int shm_destroy(int id)
Destroy the given shared memory area.
Definition: ipc.c:132
generic_filter_pre_monitor
void generic_filter_pre_monitor(struct sched *s, void *context)
Request a minimal timeout if not idle.
Definition: filter_common.c:181
create_local_socket
int create_local_socket(const char *name)
Create a socket for local communication and listen on it.
Definition: net.c:938
tv_divide
void tv_divide(const unsigned long divisor, const struct timeval *tv, struct timeval *result)
Compute a fraction of given struct timeval.
Definition: time.c:107
MP_AFHI
#define MP_AFHI(_name)
Define a function which returns a field of the afh_info structure.
Definition: mp.c:378
row_belongs_to_score_table
bool row_belongs_to_score_table(const struct osl_row *aft_row)
Find out whether an audio file is contained in the score table.
Definition: score.c:266
safe_strdup
char * safe_strdup(const char *src, size_t len)
strdup() for not necessarily zero-terminated strings.
Definition: string.c:865
hash2_compare
int hash2_compare(const unsigned char *h1, const unsigned char *h2)
Compare two version 2 hashes.
Definition: crypt_common.c:175
CMD_PTR
#define CMD_PTR
Definition: write.c:26
COLOR_OUTPUT
@ COLOR_OUTPUT
Definition: gui.c:76
mp4_get_tag_value
__malloc char * mp4_get_tag_value(const struct mp4 *f, const char *item)
Return the value of the given tag item.
Definition: mp4.c:1047
version_text
const char * version_text(const char *pfx)
Get the full version text.
Definition: version.c:37
BASE64_MAX_DECODED_SIZE
#define BASE64_MAX_DECODED_SIZE(_encoded_size)
Maximal possible size of the decoded data.
Definition: base64.c:52
sender_status::listen_fds
int * listen_fds
The socket fd(s) this sender is listening on.
Definition: send.h:177
xrename
int xrename(const char *oldpath, const char *newpath)
Change the name or location of a file.
Definition: fd.c:28
score_add
int score_add(const struct osl_row *aft_row, long score, struct osl_table *t)
Add a (row, score) pair to the score table.
Definition: score.c:99
btr_parent
struct btr_node * btr_parent(struct btr_node *btrn)
Get the parent node of a buffer tree node.
Definition: buffer_tree.c:1248
play_cmd_handler_t
int(* play_cmd_handler_t)(struct lls_parse_result *lpr)
Definition: play.c:99
flowopt_add
void flowopt_add(struct flowopts *fo, int lev, int opt, const char *name, const void *val, int len)
Append new socket option to flowopt queue.
Definition: net.c:318
filter_name
const char * filter_name(int filter_num)
Return the name of a filter, given its number.
Definition: filter_common.c:52
score_ops
const struct afs_table_operations score_ops
The score table stores (aft row, score) pairs in memory.
Definition: score.c:326
mix.h
Mixer API for para_mixer.
http_client_status
http_client_status
The possible states of a client from the server's POV.
Definition: http_send.c:34
afh_info::chunks_total
uint32_t chunks_total
The number of chunks this audio file contains.
Definition: afh.h:27
daemon_get_uptime
time_t daemon_get_uptime(const struct timeval *current_time)
Get the uptime.
Definition: daemon.c:414
mp_year
int64_t mp_year(struct mp_context *ctx)
Parse and return the value of the year tag.
Definition: mp.c:447
btr_get_output_queue_size
size_t btr_get_output_queue_size(struct btr_node *btrn)
Return number of queued output bytes of a buffer tree node.
Definition: buffer_tree.c:878
OPUS_COMMENT_HEADER
#define OPUS_COMMENT_HEADER
Definition: opus_afh.c:18
daemon_log_welcome
void daemon_log_welcome(const char *whoami)
Log the startup message containing the paraslash version.
Definition: daemon.c:315
AFSI_LAST_PLAYED_OFFSET
@ AFSI_LAST_PLAYED_OFFSET
Where .last_played is stored.
Definition: aft.c:132
DF_LOG_PID
@ DF_LOG_PID
Whether the PID should be logged.
Definition: daemon.h:28
CENTER
#define CENTER
Status item text should be displayed centered.
Definition: gui.h:68
sanitize_str
__must_check int sanitize_str(const char *src, size_t max_width, char **result, size_t *width)
Truncate and sanitize a (wide character) string.
Definition: string.c:1055
AFTCOL_CHUNKS
@ AFTCOL_CHUNKS
The chunk table info and the chunk table of the audio file.
Definition: aft.c:211
attr_ops
const struct afs_table_operations attr_ops
The attribute table stores name/bitnum pairs.
Definition: attribute.c:494
readv_nonblock
int readv_nonblock(int fd, struct iovec *iov, int iovcnt, size_t *num_bytes)
Read from a non-blocking file descriptor into multiple buffers.
Definition: fd.c:207
para_log
__printf_2_3 void(* para_log)(int, const char *,...)
The log function of para_gui, always set to curses_log().
Definition: server.c:43
recv.h
Receiver-related structures and exported symbols of recv_common.c.
btr_node_description::parent
struct btr_node * parent
Parent of the new node.
Definition: buffer_tree.h:160
main
int main(int argc, char *argv[])
The main function of para_gui.
Definition: gui.c:1482
color_parse_or_die
void color_parse_or_die(const char *value, char *dst)
Create an escape sequence for colored output.
Definition: color.c:52
afsi_change_event_data::aft_row
struct osl_row * aft_row
Pointer to the row that has changed.
Definition: afs.h:71
stat_client_write_item
void stat_client_write_item(int item_num)
Write a message to all connected status clients.
Definition: audiod_command.c:145
RECV_CMD_OPT_INT32_VAL
#define RECV_CMD_OPT_INT32_VAL(_recv, _opt, _lpr)
Definition: recv.h:91
cq_get
int cq_get(struct queued_chunk *qc, const char **buf, size_t *len)
Get a pointer to the given queued chunk.
Definition: chunk_queue.c:117
dccp_available_ccids
int dccp_available_ccids(uint8_t **ccid_array)
Probe the list of DCCP CCIDs configured on this host.
Definition: net.c:851
SIDEBAND_HEADER_SIZE
#define SIDEBAND_HEADER_SIZE
Each sideband packet consists of a header and a data part.
Definition: sideband.c:14
hash_compare
int hash_compare(const unsigned char *h1, const unsigned char *h2)
Compare two hashes.
Definition: crypt_common.c:150
do_nothing
#define do_nothing
A nice cup of STFU for Mr gcc.
Definition: para.h:185
AFH_RECV
#define AFH_RECV
Definition: play.c:115
client_task::scc
struct stream_cipher_context scc
The file descriptor and the session keys.
Definition: client.h:30
wav_params::sample_rate_given
int sample_rate_given
Whether the sample rate was given.
Definition: check_wav.h:21
senders
const struct sender *const senders[]
NULL-terminated list, defined in vss.c.
Definition: vss.c:39
opus_parse_header
int opus_parse_header(const char *packet, int len, struct opus_header *h)
Get metadata of an opus stream.
Definition: opus_common.c:84
atom
atom
The enumeration of interesting atoms.
Definition: mp4.c:161
i9e_client_info
The i9e configuration settings of the client.
Definition: interactive.h:53
get_attribute_bitnum_by_name
int get_attribute_bitnum_by_name(const char *att_name, unsigned char *bitnum)
Retrieve the identifier (number) of an attribute.
Definition: attribute.c:91
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.
Definition: vss.c:671
client_open
int client_open(int argc, char *argv[], struct client_task **ct_ptr, int *loglevel, struct btr_node *parent, struct btr_node *child, struct sched *sched)
Parse the client configuration and open a connection to para_server.
Definition: client_common.c:631
mark_fd_nonblocking
__must_check int mark_fd_nonblocking(int fd)
Set a file descriptor to non-blocking mode.
Definition: fd.c:326
CRT_REPOS
@ CRT_REPOS
Stream must be repositioned (com_jmp(), com_ff()).
Definition: play.c:52
hash_function
void hash_function(const char *data, unsigned long len, unsigned char *hash)
Compute the hash of the given input data.
Definition: openssl.c:407
spx_header_info::sample_rate
spx_int32_t sample_rate
Current sample rate in Hz.
Definition: spx.h:19
OPT_RESULT
#define OPT_RESULT(_name)
Definition: gui.c:32
write.h
Writer-related structures.
mp_re_pattern::preg
regex_t preg
Pre-compiled regex.
Definition: mp.h:28
para_buffer::max_size
size_t max_size
The maximal size this buffer may grow.
Definition: string.h:18
fec_client_parms
Each paraslash sender may register arbitrary many clients to the virtual streaming system,...
Definition: send.h:145
lsg_filter_cmd_com_fecdec_user_data
const struct filter lsg_filter_cmd_com_fecdec_user_data
Definition: fecdec_filter.c:479
SCORECOL_AFT_ROW
@ SCORECOL_AFT_ROW
The row of the audio file.
Definition: score.c:48
mp4_set_sample_position
int mp4_set_sample_position(struct mp4 *f, uint32_t sample)
Reposition the read/write file offset.
Definition: mp4.c:731
user_list_lookup
const struct user * user_list_lookup(const char *name)
Lookup a user in the user list.
Definition: user_list.c:152
mp_ast_node::id
int id
Corresponds to a token type, for example LESS_OR_EQUAL.
Definition: mp.h:72
CMD_PTR
#define CMD_PTR(_cmd)
Definition: mixer.c:36
mp3_afh
const struct audio_format_handler mp3_afh
The mp3 audio format handler.
Definition: mp3_afh.c:684
freep
void freep(void *arg)
Free the content of a pointer and set it to NULL.
Definition: string.c:258
CL_CONNECTED
@ CL_CONNECTED
TCP connection is established.
Definition: client.h:8
getbit_context::buffer
const uint8_t * buffer
Start of the internal buffer.
Definition: bitstream.h:14
MAX_CODED_SUPERFRAME_SIZE
#define MAX_CODED_SUPERFRAME_SIZE
Definition: wmadec_filter.c:45
para_regcomp
int para_regcomp(regex_t *preg, const char *regex, int cflags)
Compile a regular expression.
Definition: string.c:835
for_each_matching_row
int for_each_matching_row(struct pattern_match_data *pmd)
Execute the given function for each matching row.
Definition: afs.c:327
gui_color_spec::bg
int bg
Background color.
Definition: gui.h:11
cq_update
void cq_update(struct chunk_queue *cq, size_t sent)
Change the number of bytes sent for the current queued chunk.
Definition: chunk_queue.c:99
spx_process_header
int spx_process_header(unsigned char *packet, long bytes, struct spx_header_info *shi)
Obtain information about a speex file from an ogg packet.
Definition: spx_common.c:83
fec_encode
void fec_encode(struct fec_parms *parms, const unsigned char *const *src, unsigned char *dst, int idx, int sz)
Compute one encoded slice of the given input.
Definition: fec.c:516
para_block_signal
void para_block_signal(int sig)
Block a signal for the caller.
Definition: signal.c:175
btr_splice_out_node
void btr_splice_out_node(struct btr_node **btrnp)
Remove a node from the buffer tree, reconnecting parent and children.
Definition: buffer_tree.c:847
get_score_and_aft_row
int get_score_and_aft_row(struct osl_row *score_row, long *score, struct osl_row **aft_row)
Given an admissible file, get the corresponding row in the aft and the score.
Definition: score.c:176
generic_com_allow
void generic_com_allow(struct sender_command_data *scd, struct sender_status *ss)
Allow connections from the given range of IP addresses.
Definition: send_common.c:235
stat_client_write_item
void stat_client_write_item(int item_num)
Write a message to all connected status clients.
Definition: audiod_command.c:145
imdct
void imdct(struct mdct_context *s, float *output, const float *input)
Compute the inverse MDCT.
Definition: imdct.c:315
writer_node::min_iqs
size_t min_iqs
The minimal input queue size (size of one audio sample).
Definition: write.h:20
GM_AGGRESSIVE
@ GM_AGGRESSIVE
Write anyway (default).
Definition: grab_client.c:28
i9e_completer
A completer is simply a function pointer and name of the command for which it performs completion.
Definition: interactive.h:40
safe_strdup
char * safe_strdup(const char *src, size_t len)
strdup() for not necessarily zero-terminated strings.
Definition: string.c:865
stdout_task_register
void stdout_task_register(struct stdout_task *sot, struct sched *s)
Register a stdout task structure.
Definition: stdout.c:78
AFS_READ
@ AFS_READ
None of the below.
Definition: user_list.h:15
FILTER_CMD_OPT_GIVEN
#define FILTER_CMD_OPT_GIVEN(_cmd, _opt, _lpr)
Definition: filter.h:108
free_status_items
void free_status_items(void)
Deallocate and invalidate the status item strings.
Definition: aft.c:980
acl_deny
void acl_deny(char *addr, int netmask, struct list_head *acl, int default_deny)
Deny access for a range of IP addresses.
Definition: acl.c:187
sender::shutdown_clients
void(* shutdown_clients)(void)
Terminate all connected clients.
Definition: send.h:90
vss_next
unsigned int vss_next(void)
Check if the N (next) status flag is set.
Definition: vss.c:759
print_filter_helps
void print_filter_helps(bool detailed)
Print help text of each filter to stdout.
Definition: filter_common.c:121
btr_no_parent
bool btr_no_parent(struct btr_node *btrn)
Find out whether a node is an orphan.
Definition: buffer_tree.c:554
i9e_completion_result::matches
char ** matches
NULL-terminated array of possible completions.
Definition: interactive.h:20
SYSTEM_ERROR_BIT
#define SYSTEM_ERROR_BIT
para_error
Definition: error.h:256
sched_write_ok
bool sched_write_ok(int fd, const struct sched *s)
Check whether writing is possible (i.e., does not block).
Definition: sched.c:560
CLIENT_OPT_STRING_VAL
#define CLIENT_OPT_STRING_VAL(_name, _lpr)
Definition: client.h:56
send_sb_va
__printf_3_4 int send_sb_va(struct stream_cipher_context *scc, int band, const char *fmt,...)
Create a variable sized buffer and send it as a sideband packet.
Definition: command.c:177
OPT_UINT32_VAL
#define OPT_UINT32_VAL(_name, _lpr)
Definition: upgrade_db.c:21
GF_ONE_SHOT
@ GF_ONE_SHOT
Stop grabbing if audio file changes.
Definition: grab_client.c:36
CAB_CHUNKS_OFFSET_POS
@ CAB_CHUNKS_OFFSET_POS
Start of the chunk table (if present).
Definition: aft.c:1565
mp4_close
void mp4_close(struct mp4 *f)
Deallocate all resources associated with an mp4 file handle.
Definition: mp4.c:590
HTTP_GET_MSG
#define HTTP_GET_MSG
sent by the connecting http client (http_recv, xmms, ...)
Definition: http.h:7
opus_header::stream_map
unsigned char stream_map[255]
Mapping from coded channels to output channels.
Definition: opus_common.h:25
http_recv_status
http_recv_status
the possible states of a http receiver node
Definition: http_recv.c:31
http.h
macros used by http_send and http_recv
client.h
Common client functions and exported symbols from client_common.c.
MAX_FRAME_SIZE
#define MAX_FRAME_SIZE
Size of the output buffer.
Definition: spxdec_filter.c:131
acl_get_contents
char * acl_get_contents(struct list_head *acl)
Compute a string containing the contents of an acl.
Definition: acl.c:130
MAP_POPULATE
#define MAP_POPULATE
As of 2018, neither FreeBSD-11.2 nor NetBSD-8.0 have MAP_POPULATE.
Definition: vss.c:950
mixer::open
int(* open)(const char *dev, struct mixer_handle **handle)
Return a handle that can be passed to other methods.
Definition: mix.h:24
oac_custom_header_init
void oac_custom_header_init(int serial, struct oac_custom_header *h)
Set the serial number of an allocated header structure.
Definition: ogg_afh_common.c:381
AFTCOL_AFHI
@ AFTCOL_AFHI
The audio format handler info.
Definition: aft.c:209
filter::execute
btr_command_handler execute
Answer a buffer tree query.
Definition: filter.h:96
audio_format_name
const char * audio_format_name(int i)
audio_format_handler
Definition: afh_common.c:56
stat_item_values
char * stat_item_values[NUM_STAT_ITEMS]
The array of status items sent by para_server.
Definition: audiod.c:160
send_callback_request
int send_callback_request(afs_callback *f, struct osl_object *query, callback_result_handler *result_handler, void *private_result_data)
Ask the afs process to call a given function.
Definition: afs.c:173
OPT_UINT32_VAL
#define OPT_UINT32_VAL(_cmd, _opt)
Definition: mixer.c:41
sb_buffer
The information contained in a sideband buffer.
Definition: sideband.h:81
server_cmd_handler_t
int(* server_cmd_handler_t)(struct command_context *, struct lls_parse_result *)
Prototype of a server command handler.
Definition: command.h:12
ATOM_DATA
@ ATOM_DATA
Definition: mp4.c:161
read_nonblock
int read_nonblock(int fd, void *buf, size_t sz, size_t *num_bytes)
Read from a non-blocking file descriptor into a single buffer.
Definition: fd.c:256
get_score_and_aft_row
int get_score_and_aft_row(struct osl_row *score_row, long *score, struct osl_row **aft_row)
Given an admissible file, get the corresponding row in the aft and the score.
Definition: score.c:176
DF_LOG_LL
@ DF_LOG_LL
Also print the loglevel for each message.
Definition: daemon.h:32
receiver_node::btrn
struct btr_node * btrn
The receiver node is always the root of the buffer tree.
Definition: recv.h:18
sched::task_list
struct list_head task_list
Tasks which have been registered to the scheduler.
Definition: sched.h:35
DECLARE_BLOB_SYMBOLS
#define DECLARE_BLOB_SYMBOLS(table_name, cmd_prefix)
Define exported functions and a table pointer for an osl blob table.
Definition: afs.h:291
PARA_WARNING_LOG
#define PARA_WARNING_LOG(f,...)
Definition: para.h:220
EXPORT_SERVER_CMD_HANDLER
#define EXPORT_SERVER_CMD_HANDLER(_cmd)
Define the user data structure for one command.
Definition: command.h:29
check_wav_pre_monitor
void check_wav_pre_monitor(struct sched *s, struct check_wav_context *cwc)
Request a minimal timeout if not idle.
Definition: check_wav.c:50
para_reap_child
int para_reap_child(pid_t *pid)
Reap one child.
Definition: signal.c:99
compute_word_num
int compute_word_num(const char *buf, const char *delim, int point)
Get the number of the word the cursor is on.
Definition: string.c:723
sender::init
void(* init)(void)
Parse the command line options and initialize this sender (e.g., initialize target or access control ...
Definition: send.h:54
client_connect
int client_connect(struct client_task *ct, struct sched *s, struct btr_node *parent, struct btr_node *child)
Connect to para_server and register the client task.
Definition: client_common.c:487
lookup_address
int lookup_address(unsigned l4type, bool passive, const char *host, int port_number, struct addrinfo **result)
Resolve an IPv4/IPv6 address.
Definition: net.c:396
SBD_PROCEED
@ SBD_PROCEED
Definition: sideband.h:66
wav_params::sample_format_arg
int sample_format_arg
Same semantics as sample_rate.
Definition: check_wav.h:23
signal_init_or_die
struct signal_task * signal_init_or_die(void)
Initialize the paraslash signal subsystem.
Definition: signal.c:35
parse_cidr
char * parse_cidr(const char *cidr, char *addr, ssize_t addrlen, int32_t *netmask)
Functions to parse and validate (parts of) URLs.
Definition: net.c:40
uid_is_whitelisted
bool uid_is_whitelisted(uid_t uid)
Lookup the given UID in the whitelist.
Definition: audiod.c:1409
task_reap
int task_reap(struct task **tptr)
Obtain the error status of a task and deallocate its resources.
Definition: sched.c:169
oac_custom_header_get
size_t oac_custom_header_get(char **buf, struct oac_custom_header *h)
Return the custom header buffer and deallocate resources.
Definition: ogg_afh_common.c:437
dump_buffer
#define dump_buffer(a, b, c)
Empty.
Definition: gcrypt.c:30
coef_vlc_table::n
int n
Total number of codes.
Definition: wmadata.h:27
lyrics_event_handler
__a_const int lyrics_event_handler(__a_unused enum afs_events event, __a_unused struct para_buffer *pb, __a_unused void *data)
Dummy event handler for the lyrics table.
Definition: afs.c:1178
DEFINE_PARA_ERRLIST
DEFINE_PARA_ERRLIST
Array of error strings.
Definition: write.c:24
DIV_ROUND_UP
#define DIV_ROUND_UP(x, y)
Divide and round up to next integer.
Definition: para.h:138
compute_chunk_time
void compute_chunk_time(long unsigned chunk_num, struct timeval *chunk_tv, struct timeval *stream_start, struct timeval *result)
Compute when to send a chunk of an audio file.
Definition: time.c:170
OPT_RESULT
#define OPT_RESULT(_name)
Definition: play.c:34
daemon.h
exported symbols from daemon.c
gui_theme::data
struct stat_item_data data[NUM_STAT_ITEMS]
Individual status item properties.
Definition: gui.h:44
sender_client::node
struct list_head node
The position of this client in the client list.
Definition: send.h:124
SBD_BLOB_DATA
@ SBD_BLOB_DATA
Definition: sideband.h:66
gui_theme::sb
struct gui_color_spec sb
Color of the status bar.
Definition: gui.h:46
daemon_open_log_or_die
void daemon_open_log_or_die(void)
Open the logfile in append mode.
Definition: daemon.c:289
mp_parse_regex_pattern
int mp_parse_regex_pattern(const char *src, struct mp_re_pattern *result)
Parse and compile an extended regular expression pattern, including flags.
Definition: mp.c:157
playlist_unload
void playlist_unload(struct playlist_instance *pi)
Free all resources of the given/current playlist.
Definition: playlist.c:117
shm_get_shmmax
size_t shm_get_shmmax(void)
Get the maximal size of a shared memory area.
Definition: ipc.c:211
AUDIO_FILE_ADD
@ AUDIO_FILE_ADD
An audio file was added.
Definition: afs.h:45
score_update
int score_update(const struct osl_row *aft_row, long new_score)
Replace a row of the score table.
Definition: score.c:136
afs_max_size_handler_data
Structure passed to the AFS max_size handler.
Definition: afs.h:197
exec_status
exec_status
Type of the process currently being executed.
Definition: gui.c:61
free_sender_status
void free_sender_status(const struct sender_status *ss)
Deallocate all resources allocated in init_sender_status().
Definition: send_common.c:166
sched_request_timeout
void sched_request_timeout(struct timeval *to, struct sched *s)
Impose an upper bound for the I/O timeout.
Definition: sched.c:375
LS_SORT_BY_BITRATE
@ LS_SORT_BY_BITRATE
-s=b
Definition: aft.c:62
LS_MODE_VERBOSE
@ LS_MODE_VERBOSE
Definition: aft.c:72
client_task::btrn
struct btr_node * btrn[2]
The buffer tree nodes for receiving/sending.
Definition: client.h:34
for_each_matching_row
int for_each_matching_row(struct pattern_match_data *pmd)
Execute the given function for each matching row.
Definition: afs.c:327
task_status
task_status
The possible states of a task.
Definition: sched.c:26
CHUNK_TV_TV_USEC_OFFSET
@ CHUNK_TV_TV_USEC_OFFSET
The microseconds part of the chunk time (4 bytes).
Definition: aft.c:315
xvasprintf
__printf_2_0 unsigned xvasprintf(char **result, const char *fmt, va_list ap)
Print a formatted message to a dynamically allocated string.
Definition: string.c:181
send_lls_callback_request
int send_lls_callback_request(afs_callback *f, const struct lls_command *const cmd, struct lls_parse_result *lpr, void *private_result_data)
Wrapper for send_callback_request() which passes a lopsub parse result.
Definition: afs.c:264
ATOM_TITLE
@ ATOM_TITLE
Definition: mp4.c:161
btr_node_description::name
const char * name
Name of the new node.
Definition: buffer_tree.h:158
ATOM_ARTIST
@ ATOM_ARTIST
Definition: mp4.c:161
ATOM_MP4A
@ ATOM_MP4A
Definition: mp4.c:161
make_message
__must_check __printf_1_2 __malloc char * make_message(const char *fmt,...)
Allocate a sufficiently large string and print into it.
Definition: string.c:237
afs_info::attributes
uint64_t attributes
Bit field of set attributes.
Definition: afs.h:10
i9e_extract_completions
int i9e_extract_completions(const char *word, char **string_list, char ***result)
Return the possible completions for a given word.
Definition: interactive.c:634
filter::close
void(* close)(struct filter_node *fn)
Close one instance of this filter.
Definition: filter.h:61
AFHI_UNUSED1_OFFSET
@ AFHI_UNUSED1_OFFSET
Was: Location of the audio file header.
Definition: aft.c:303
para_printf
__printf_2_3 int para_printf(struct para_buffer *b, const char *fmt,...)
Safely print into a buffer at a given offset.
Definition: string.c:505
sched::default_timeout
int default_timeout
Initial value (in milliseconds) before any pre_monitor call.
Definition: sched.h:19