]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
First preparations for btr support in para_filter.
authorAndre Noll <maan@systemlinux.org>
Wed, 30 Dec 2009 00:38:26 +0000 (01:38 +0100)
committerAndre Noll <maan@systemlinux.org>
Wed, 30 Dec 2009 00:38:26 +0000 (01:38 +0100)
filter.c
filter.h
ggo/filter.m4
ggo/mp3dec_filter.ggo [deleted file]
ggo/mp3dec_filter.m4 [new file with mode: 0644]

index a1cc648d30a3e911f686a010595475f4bc9757ec..20ea1333b758b4302774a1c075980072d6ebf208 100644 (file)
--- a/filter.c
+++ b/filter.c
@@ -153,6 +153,12 @@ static int parse_config(int argc, char *argv[])
        return 1;
 }
 
+/* TODO: support more than one filter, actually parse options */
+static int main_btr(void)
+{
+       return 42;
+}
+
 /**
  * The main function of para_filter.
  *
@@ -170,13 +176,17 @@ int main(int argc, char *argv[])
        int ret;
        static struct sched s;
 
-       stdin_set_defaults(sit);
-       sit->buf = para_malloc(sit->bufsize),
-
        filter_init();
        ret = parse_config(argc, argv);
        if (ret < 0)
                goto out;
+       if (conf.buffer_tree_given) {
+               ret = main_btr();
+               goto out;
+       }
+       stdin_set_defaults(sit);
+       sit->buf = para_malloc(sit->bufsize),
+
        ret = init_filter_chain();
        if (ret < 0)
                goto out;
index 15bfaf8cdb0c2533c463fe8272d21e5528b80dbd..9f3ddd69696902964e9c644a3e221328c10a1097 100644 (file)
--- a/filter.h
+++ b/filter.h
@@ -32,6 +32,8 @@ struct filter_node {
        struct list_head callbacks;
        /** A pointer to the configuration of this instance. */
        void *conf;
+       struct btr_node *btrn;
+       struct task task;
 };
 
 /** Describes one running instance of a chain of filters */
index 4e991764f3c764339eddb0aa4e9fa68c732bcaf3..8199f408b089c997cf51080cad20d962e578d90d 100644 (file)
@@ -1,5 +1,6 @@
 include(header.m4)
 include(loglevel.m4)
+include(buffer_tree.m4)
 <qu>
 option "filter" f
 #~~~~~~~~~~~~~~~~
diff --git a/ggo/mp3dec_filter.ggo b/ggo/mp3dec_filter.ggo
deleted file mode 100644 (file)
index a34c30a..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-option "bufsize" b
-#~~~~~~~~~~~~~~~~~
-"size of output buffer"
-int typestr="kilobyte"
-default="128"
-optional
-details="
-       Increase this if you encounter output buffer overrun
-       errors. Smaller values make the mp3dec filter use less
-       memory. The minimal size is 32K.
-"
-
-option "ignore-crc" i
-#~~~~~~~~~~~~~~~~~~~~
-"ignore CRC information in the audio stream."
-flag off
-details="
-       This causes frames with CRC errors to be decoded and played
-       anyway. This option is not recommended, but since some encoders
-       have been known to generate bad CRC information, this option
-       is a work-around to play streams from such encoders.
-"
diff --git a/ggo/mp3dec_filter.m4 b/ggo/mp3dec_filter.m4
new file mode 100644 (file)
index 0000000..0a31d7e
--- /dev/null
@@ -0,0 +1,27 @@
+include(header.m4)
+include(buffer_tree.m4)
+
+<qu>
+option "bufsize" b
+#~~~~~~~~~~~~~~~~~
+"size of output buffer"
+int typestr="kilobyte"
+default="128"
+optional
+details="
+       Increase this if you encounter output buffer overrun
+       errors. Smaller values make the mp3dec filter use less
+       memory. The minimal size is 32K.
+"
+
+option "ignore-crc" i
+#~~~~~~~~~~~~~~~~~~~~
+"ignore CRC information in the audio stream."
+flag off
+details="
+       This causes frames with CRC errors to be decoded and played
+       anyway. This option is not recommended, but since some encoders
+       have been known to generate bad CRC information, this option
+       is a work-around to play streams from such encoders.
+"
+</qu>