Merge branch 't/decoder_latency'
authorAndre Noll <maan@systemlinux.org>
Mon, 28 Jun 2010 11:13:43 +0000 (13:13 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 28 Jun 2010 11:13:43 +0000 (13:13 +0200)
1  2 
oggdec_filter.c

diff --combined oggdec_filter.c
index b07d39130bb2dcc8026ffe93cd9e0d5e2ccbf2d0,1a56b750a94507c67ef9e49de635b453ac313d8e..0130afd04989043430e5c1d70fc11800a6d1f311
@@@ -11,6 -11,7 +11,6 @@@
  #include <stdbool.h>
  
  #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:
        }
  }
  
 -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.
   *
   */
  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
 -      };
  }