]> git.tue.mpg.de Git - paraslash.git/commitdiff
write: Get rid of wn->chunk_bytes and wng->max_chunk_bytes.
authorAndre Noll <maan@systemlinux.org>
Sun, 15 Mar 2009 16:14:50 +0000 (17:14 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 15 Mar 2009 16:14:50 +0000 (17:14 +0100)
These are not used anyway. Make all writers return 1 on success.

alsa_write.c
file_write.c
write.h
write_common.c

index d65cfb4d01523db3f7479e62d8900de0dc3a2b1f..dfd2421d3f6ddc51eefd6aa5db98098f11389f01 100644 (file)
@@ -134,7 +134,7 @@ static int alsa_open(struct writer_node *w)
        if (snd_pcm_nonblock(pad->handle, 1))
                PARA_ERROR_LOG("failed to set nonblock mode\n");
        tv_add(now, &(struct timeval ){0, 100 * 1000}, &pad->next_chunk);
-       return period_size * pad->bytes_per_frame;
+       return 1;
 }
 
 static int alsa_write_pre_select(struct sched *s, struct writer_node *wn)
index 016732ae3fd9379f8ed405cd52e7e3cee281d513..0950e303da07daab08429f425fe8a6548c70eb3f 100644 (file)
@@ -46,7 +46,7 @@ static int file_write_open(struct writer_node *wn)
        if (!conf->filename_given)
                free(filename);
        if (pfwd->fd >= 0)
-               return 8192;
+               return 1;
        free(pfwd);
        return -E_FW_OPEN;
 }
diff --git a/write.h b/write.h
index fc6ade3cb5f1e7694646085c443dc3a368aec04d..71938a9ca5d7d22957b099047d96d2f7e8dee95f 100644 (file)
--- a/write.h
+++ b/write.h
@@ -17,8 +17,6 @@ struct writer_node {
        struct writer *writer; /* FIXME: Should better be only the number. */
        /** Writer-specific data. */
        void *private_data;
-       /** Send that many bytes in one go. */
-       int chunk_bytes;
        /** Pointer to the group this node belongs to. */
        struct writer_node_group *wng;
        /** The writer-specific configuration of this node. */
@@ -95,8 +93,6 @@ struct writer_node_group {
        unsigned num_writers;
        /** Array of pointers to the corresponding writer nodes. */
        struct writer_node *writer_nodes;
-       /** The maximum of the chunk_bytes values of the writer nodes in this group. */
-       int max_chunk_bytes;
        /** Non-zero if an error or end of file was encountered by the feeding task. */
        int *input_error;
        /** Current output buffer. */
index 8133577b91fbfdf9665b4d3b1b54dd3ac6fb014f..4e81f62d68df57b04617a9e441f244c41cc3ed56 100644 (file)
@@ -86,8 +86,6 @@ int wng_open(struct writer_node_group *g)
                ret = wn->writer->open(wn);
                if (ret < 0)
                        goto err_out;
-               wn->chunk_bytes = ret;
-               g->max_chunk_bytes = PARA_MAX(g->max_chunk_bytes, ret);
        }
        sprintf(g->task.status, "%s", "writer node group");
        register_task(&g->task);