X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;ds=sidebyside;f=write.h;h=66f21cfe6e8256f088a1c9246a9b72b13a49b134;hb=efc5ae3755deac971babf8aa7d3b80fd009c8f7b;hp=365c237bf2b41e92e7ae14129d460d95396576ca;hpb=318fbe90e08b6d9c5e781d9b517b670c5a1a04d7;p=paraslash.git diff --git a/write.h b/write.h index 365c237b..66f21cfe 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,8 @@ 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; }; /** Describes one supported writer. */ @@ -60,6 +62,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 +73,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. * @@ -107,6 +111,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. */