From: Andre Noll Date: Mon, 28 Jun 2010 11:13:43 +0000 (+0200) Subject: Merge branch 't/decoder_latency' X-Git-Tag: v0.4.3~10 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=645175864a613fc539f46ffa4028742aad3b1b30;hp=-c Merge branch 't/decoder_latency' --- 645175864a613fc539f46ffa4028742aad3b1b30 diff --combined oggdec_filter.c index b07d3913,1a56b750..0130afd0 --- a/oggdec_filter.c +++ b/oggdec_filter.c @@@ -11,6 -11,7 +11,6 @@@ #include #include "para.h" -#include "oggdec_filter.cmdline.h" #include "list.h" #include "sched.h" #include "ggo.h" @@@ -226,7 -227,7 +226,7 @@@ static void ogg_post_select(__a_unused if (read_ret < 0) goto out; btr_add_output(out, read_ret, btrn); - if (btr_get_output_queue_size(btrn) > 640 * 1024) + if (btr_get_output_queue_size(btrn) > 128 * 1024) return; /* enough data for the moment */ } out: @@@ -236,6 -237,36 +236,6 @@@ } } -static int oggdec_parse_config(int argc, char **argv, void **config) -{ - int ret; - struct oggdec_filter_args_info *ogg_conf; - - ogg_conf = para_calloc(sizeof(*ogg_conf)); - ret = -E_OGGDEC_SYNTAX; - if (oggdec_cmdline_parser(argc, argv, ogg_conf)) - goto err; - ret = -ERRNO_TO_PARA_ERROR(EINVAL); - if (ogg_conf->bufsize_arg < 0) - goto err; - if (ogg_conf->bufsize_arg >= INT_MAX / 1024) - goto err; - if (ogg_conf->initial_buffer_arg < 0) - goto err; - if (ogg_conf->initial_buffer_arg >= INT_MAX / 1024) - goto err; - *config = ogg_conf; - return 1; -err: - free(ogg_conf); - return ret; -} - -static void oggdec_free_config(void *conf) -{ - oggdec_cmdline_parser_free(conf); -} - /** * The init function of the ogg vorbis decoder. * @@@ -243,9 -274,18 +243,9 @@@ */ void oggdec_filter_init(struct filter *f) { - struct oggdec_filter_args_info dummy; - - oggdec_cmdline_parser_init(&dummy); f->open = ogg_open; f->close = ogg_close; f->pre_select = generic_filter_pre_select; f->post_select = ogg_post_select; - f->parse_config = oggdec_parse_config; - f->free_config = oggdec_free_config; f->execute = oggdec_execute; - f->help = (struct ggo_help) { - .short_help = oggdec_filter_args_info_help, - .detailed_help = oggdec_filter_args_info_detailed_help - }; }