X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=recv.h;h=2976cad6fe0f97866bcabc715339a3b9b3f134f1;hb=7e0a0badba66c0cdcb0dcbc8cf3d0f5b71001ca3;hp=36b0f1db62e348c9ab7ccdfc3b32ba656d698c5f;hpb=fb3fd5b4ddaf52e19303126ea1bacacc5954d808;p=paraslash.git diff --git a/recv.h b/recv.h index 36b0f1db..2976cad6 100644 --- a/recv.h +++ b/recv.h @@ -34,9 +34,18 @@ struct receiver_node { }; /** - * Describes one supported paraslash receiver. + * Describes a possible data source for audio streams. * - * \sa \ref http_recv.c, \ref udp_recv.c. + * A paraslash receiver is a modular piece of software which is capable of + * receiving an audio data stream from a data source. Received audio data is + * fed to consumers through the buffer tree mechanism. + * + * This structure contains the methods which have to be implemented by each + * receiver. + * + * \sa \ref http_recv.c, \ref udp_recv.c, \ref dccp_recv.c, \ref afh_recv.c, + * struct \ref receiver_node, struct \ref filter, struct \ref writer, struct + * \ref sched. */ struct receiver { /** @@ -45,8 +54,6 @@ struct receiver { * This should allocate the output buffer of the given receiver node * and prepare it for retrieving the audio stream according to the * configuration stored in rn->lpr. - * - * \sa struct \ref receiver_node. */ int (*open)(struct receiver_node *rn); /** @@ -58,30 +65,9 @@ struct receiver { * \sa \ref receiver_node. */ void (*close)(struct receiver_node *rn); - /** - * Add file descriptors to fd_sets and compute timeout for select(2). - * - * If this is not NULL, the function is called in each iteration of the - * scheduler's select loop. The receiver may define it to add file - * descriptors to the file descriptor sets given by s. Those will be - * monitored in the subsequent call to select(2). The function may also - * lower the timeout value of s to make select(2) return earlier if no - * file descriptors are ready for I/O. - * - * \sa select(2), \ref time.c, struct \ref sched. - */ + /** Ask the scheduler to monitor receive fds. */ void (*pre_select)(struct sched *s, void *context); - /** - * Evaluate the result from select(2). - * - * This is called after the call to select(2). It should check all file - * descriptors which were added to any of the fd sets in the previous - * call to ->pre_select() and perform (non-blocking) I/O operations on - * those fds which are ready for I/O, for example in order to establish - * a connection or to receive a part of the audio stream. - * - * \sa select(2), struct \ref receiver. - */ + /** Receive data and make it available to consumers. */ int (*post_select)(struct sched *s, void *context); /** * Answer a buffer tree query.