X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=recv.h;h=3f13f108a98696e8b50ef53988bcb7f69d5d82c8;hp=f8b1529236b143f95dfa4882acbb2c29e7eeb88f;hb=c282c836791cedf57c128555af90af37c7c01c05;hpb=5ba8f6dff01904907d1dcfaa1555c8ceb5a72c90 diff --git a/recv.h b/recv.h index f8b15292..3f13f108 100644 --- a/recv.h +++ b/recv.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2008 Andre Noll + * Copyright (C) 2005-2009 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -24,12 +24,14 @@ struct receiver_node { void *conf; /** The task associated with this instance. */ struct task task; + /** The receiver node is always the root of the buffer tree. */ + struct btr_node *btrn; }; /** * Describes one supported paraslash receiver. * - * \sa http_recv.c, ortp_recv.c + * \sa http_recv.c, udp_recv.c */ struct receiver { /** @@ -41,7 +43,7 @@ struct receiver { * * It must fill in all other function pointers and is assumed to succeed. * - * \sa http_recv_init ortp_recv_init. + * \sa http_recv_init udp_recv_init. */ void (*init)(struct receiver *r); /** @@ -54,6 +56,7 @@ struct receiver { * \a argc and \a argv. */ void *(*parse_config)(int argc, char **argv); + void (*free_config)(void *conf); /** * Open one instance of the receiver. * @@ -105,6 +108,7 @@ struct receiver { */ void (*post_select)(struct sched *s, struct task *t); + /** The two help texts of this receiver. */ struct ggo_help help; }; @@ -114,13 +118,8 @@ extern void http_recv_init(struct receiver *r); #define HTTP_RECEIVER {.name = "http", .init = http_recv_init}, extern void dccp_recv_init(struct receiver *r); #define DCCP_RECEIVER {.name = "dccp", .init = dccp_recv_init}, - -#ifdef HAVE_ORTP -extern void ortp_recv_init(struct receiver *r); -#define ORTP_RECEIVER {.name = "ortp", .init = ortp_recv_init}, -#else -#define ORTP_RECEIVER -#endif +extern void udp_recv_init(struct receiver *r); +#define UDP_RECEIVER {.name = "udp", .init = udp_recv_init}, extern struct receiver receivers[]; /** \endcond */ @@ -129,9 +128,13 @@ extern struct receiver receivers[]; #define DEFINE_RECEIVER_ARRAY struct receiver receivers[] = { \ HTTP_RECEIVER \ DCCP_RECEIVER \ - ORTP_RECEIVER \ + UDP_RECEIVER \ {.name = NULL}}; +/** Iterate over all available receivers. */ #define FOR_EACH_RECEIVER(i) for (i = 0; receivers[i].name; i++) +void recv_init(void); void *check_receiver_arg(char *ra, int *receiver_num); +void print_receiver_helps(int detailed); +int generic_recv_pre_select(struct sched *s, struct task *t);