X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=write.h;h=8e244517c12f0203db5049ab5c09f8d8b82d84a4;hp=365c237bf2b41e92e7ae14129d460d95396576ca;hb=3bb5d9c5f7e30c5b4d2216171ee9aff1389d70ae;hpb=343f3c63fc3a7f9ca4ba4163c9e4cf06cde8d0c3 diff --git a/write.h b/write.h index 365c237b..8e244517 100644 --- a/write.h +++ b/write.h @@ -13,8 +13,8 @@ enum writer_enum {WRITER_ENUM}; * Describes one running instance of a writer. */ struct writer_node { - /** Points to the writer structure associated with this node. */ - struct writer *writer; /* FIXME: Should better be only the number. */ + /** The number of this writer. */ + int writer_num; /** Writer-specific data. */ void *private_data; /** Pointer to the group this node belongs to. */ @@ -23,6 +23,9 @@ struct writer_node { void *conf; /** How much of the wng's buffer is already written. */ size_t written; + struct btr_node *btrn; + struct task task; + size_t min_iqs; }; /** Describes one supported writer. */ @@ -43,6 +46,7 @@ struct writer { * more than once with different values of \a options. */ void *(*parse_config)(const char *options); + void (*free_config)(void *conf); /** * Open one instance of this writer. * @@ -60,6 +64,7 @@ struct writer { * on errors. */ int (*pre_select)(struct sched *s, struct writer_node *wn); + void (*pre_select_btr)(struct sched *s, struct task *t); /** * Write audio data. * @@ -70,6 +75,7 @@ struct writer { * negative on errors. */ int (*post_select)(struct sched *s, struct writer_node *wn); + void (*post_select_btr)(struct sched *s, struct task *t); /** * Close one instance of the writer. * @@ -83,6 +89,7 @@ struct writer { */ void (*shutdown)(struct writer_node *); struct ggo_help help; + btr_command_handler execute; }; /** @@ -107,6 +114,8 @@ struct writer_node_group { struct task task; /** Whether the group is open, i.e. wng_open() was called. */ int open; + /** Max number of bytes written in the previous post_select() call. */ + int last_written; }; /** Loop over each writer node in a writer group. */