man_dir := man/man1
m4_ggos := afh audioc audiod client filter gui recv server write
-all_ggos := $(m4_ggos) dccp_recv oggdec_filter alsa_write oss_write fade http_recv \
+all_ggos := $(m4_ggos) dccp_recv alsa_write oss_write fade http_recv \
osx_write udp_recv amp_filter compress_filter file_write \
mp3dec_filter prebuffer_filter
ggo_generated := $(addsuffix .ggo, $(addprefix $(ggo_dir)/,$(m4_ggos)))
-NEWS
-====
-
---------------------------------------------
0.4.3 (to be announced) "imaginary radiation"
---------------------------------------------
- Fix an end-of-file detection bug in the oggdec filter.
- New user manual
- The new nonblock API
+ - FEC support for the DCCP transport (Gerrit Renker).
+ - Both options of the oggdec filter have been removed.
------------------------------------------
0.4.2 (2010-04-23) "associative expansion"
return;
btr_merge(btrn, fn->min_iqs);
len = btr_next_buffer(btrn, (char **)&inbuf);
+ len = PARA_MAX(len, (size_t)8192);
consumed = 0;
iqs = btr_get_input_queue_size(btrn);
if (!padd->initialized) {
}
/** 640K ought to be enough for everybody ;) */
-#define BTRN_MAX_PENDING (640 * 1024)
+#define BTRN_MAX_PENDING (96 * 1024)
/**
* Return the current state of a buffer tree node.
audiod_ldflags="$audiod_ldflags $oggvorbis_libs -lvorbis -lvorbisfile"
afh_ldflags="$afh_ldflags $oggvorbis_libs -logg -lvorbis -lvorbisfile"
- filter_cmdline_objs="$filter_cmdline_objs add_cmdline(oggdec_filter)"
- audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(oggdec_filter)"
-
server_errlist_objs="$server_errlist_objs ogg_afh"
filter_errlist_objs="$filter_errlist_objs oggdec_filter"
audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
+++ /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 oggdec filter use less memory.
-"
-
-option "initial_buffer" i
-#~~~~~~~~~~~~~~~~~~~~~~~~
-"size of initial input buffer"
-int typestr="kilobyte"
-default="16"
-optional
-details="
- On startup, defer decoding until that many kilobytes are
- available in the input buffer.
-"
return;
btr_merge(btrn, fn->min_iqs);
len = btr_next_buffer(btrn, &inbuffer);
+ /*
+ * Decode at most 8K in one go to give the post_select() functions of
+ * other buffer tree nodes a chance to run. This is necessary to avoid
+ * buffer underruns on slow machines.
+ */
+ len = PARA_MIN(len, (size_t)8192);
mad_stream_buffer(&pmd->stream, (unsigned char *)inbuffer, len);
next_frame:
ret = mad_header_decode(&pmd->frame.header, &pmd->stream);
#include <stdbool.h>
#include "para.h"
-#include "oggdec_filter.cmdline.h"
#include "list.h"
#include "sched.h"
#include "ggo.h"
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
- };
}
goto out;
return;
}
+ btr_merge(btrn, wn->min_iqs);
bytes = btr_next_buffer(btrn, &data);
frames = bytes / powd->bytes_per_frame;
if (!frames) { /* eof and less than a single frame available */
#include "list.h"
#include "sched.h"
#include "string.h"
+#include "time.h"
#include "error.h"
static struct list_head pre_select_list, post_select_list;
}
}
+#define SCHED_DEBUG 0
+static inline void call_post_select(struct sched *s, struct task *t)
+{
+#ifndef SCHED_DEBUG
+ t->post_select(s, t);
+#else
+ struct timeval t1, t2, diff;
+ unsigned long pst;
+
+ gettimeofday(&t1, NULL);
+ t->post_select(s, t);
+ gettimeofday(&t2, NULL);
+ tv_diff(&t1, &t2, &diff);
+ pst = tv2ms(&diff);
+ if (pst > 50)
+ PARA_WARNING_LOG("%s: post_select time: %lums\n",
+ t->status, pst);
+#endif
+}
+
static void sched_post_select(struct sched *s)
{
struct task *t, *tmp;
list_for_each_entry_safe(t, tmp, &post_select_list, post_select_node) {
if (t->error >= 0)
- t->post_select(s, t);
+ call_post_select(s, t);
// PARA_INFO_LOG("%s: %d\n", t->status, t->ret);
if (t->error >= 0)
continue;
int num = mmd->sender_cmd_data.cmd_num,
sender_num = mmd->sender_cmd_data.sender_num;
- if (senders[sender_num].client_cmds[num])
- senders[sender_num].client_cmds[num](&mmd->sender_cmd_data);
+ if (senders[sender_num].client_cmds[num]) {
+ ret = senders[sender_num].client_cmds[num]
+ (&mmd->sender_cmd_data);
+ if (ret < 0)
+ PARA_ERROR_LOG("%s\n", para_strerror(-ret));
+ }
mmd->sender_cmd_data.cmd_num = -1;
}
if (vsst->afsss != AFS_SOCKET_CHECK_FOR_WRITE)
<h1>Events</h1>
<hr>
<ul>
+ <li>2010-06-23: <a href="cooking.html">What's cooking page</a> online</li>
<li>2010-04-23: <a href="versions/paraslash-0.4.2.tar.bz2">paraslash-0.4.2</a>
<a href="versions/paraslash-0.4.2.tar.bz2.asc">(sig)</a>
"associative expansion"
}
success:
btr_consume(btrn, converted);
- goto next_buffer;
+ return;
err:
assert(ret < 0);
t->error = ret;