paraslash Paraslash Audio Streaming
About   News   Download   Documentation   Development

Macros | Functions | Variables
filter.c File Reference

The stand-alone filter program. More...

#include <regex.h>
#include <lopsub.h>
#include "filter.lsg.h"
#include "filter_cmd.lsg.h"
#include "para.h"
#include "list.h"
#include "lsu.h"
#include "sched.h"
#include "buffer_tree.h"
#include "filter.h"
#include "string.h"
#include "stdin.h"
#include "stdout.h"
#include "error.h"
#include "fd.h"
#include "version.h"

Macros

#define CMD_PTR   (lls_cmd(0, filter_suite))
 
#define OPT_RESULT(_name)    (lls_opt_result(LSG_FILTER_PARA_FILTER_OPT_ ## _name, lpr))
 
#define OPT_GIVEN(_name)   (lls_opt_given(OPT_RESULT(_name)))
 
#define OPT_UINT32_VAL(_name)   (lls_uint32_val(0, OPT_RESULT(_name)))
 

Functions

int main (int argc, char *argv[])
 The main function of para_filter. More...
 

Variables

 DEFINE_PARA_ERRLIST
 Array of error strings. More...
 
const char * status_item_list [] = {STATUS_ITEMS}
 The list of all status items used by para_{server,audiod,gui}. More...
 
char * stat_item_values [NUM_STAT_ITEMS] = {NULL}
 Dummy version which only contains NULL pointers. More...
 
__printf_2_3 void(* para_log )(int, const char *,...) = stderr_log
 

Detailed Description

The stand-alone filter program.

Macro Definition Documentation

◆ CMD_PTR

#define CMD_PTR   (lls_cmd(0, filter_suite))

◆ OPT_RESULT

#define OPT_RESULT (   _name)     (lls_opt_result(LSG_FILTER_PARA_FILTER_OPT_ ## _name, lpr))

◆ OPT_GIVEN

#define OPT_GIVEN (   _name)    (lls_opt_given(OPT_RESULT(_name)))

◆ OPT_UINT32_VAL

#define OPT_UINT32_VAL (   _name)    (lls_uint32_val(0, OPT_RESULT(_name)))

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

The main function of para_filter.

Para_filter reads data from stdin, converts it by using a chain of filters (specified on the command line) and writes the resulting data to stdout.

Parameters
argcNumber of command line options.
argvVector of arguments.
Returns
EXIT_SUCCESS on success, EXIT_FAILURE on errors.

References CMD_PTR, and lls().

Variable Documentation

◆ DEFINE_PARA_ERRLIST

DEFINE_PARA_ERRLIST

Array of error strings.

◆ status_item_list

const char* status_item_list[] = {STATUS_ITEMS}

The list of all status items used by para_{server,audiod,gui}.

status items

◆ stat_item_values

char* stat_item_values[NUM_STAT_ITEMS] = {NULL}

Dummy version which only contains NULL pointers.

The array of status items sent by para_server.

This is used by the amp filter which first tries to obtain the amplification value from an element in this array.

◆ para_log

__printf_2_3 void(* para_log) (int, const char *,...) = stderr_log