return 1;
}
+/* TODO: support more than one filter, actually parse options */
+static int main_btr(void)
+{
+ return 42;
+}
+
/**
* The main function of para_filter.
*
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;
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 */
include(header.m4)
include(loglevel.m4)
+include(buffer_tree.m4)
<qu>
option "filter" f
#~~~~~~~~~~~~~~~~
+++ /dev/null
-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.
-"
--- /dev/null
+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>