From: Andre Noll Date: Sat, 29 Jan 2011 10:34:18 +0000 (+0100) Subject: Merge branch 't/color_cleanups' X-Git-Tag: v0.4.6~48 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=b62e2796b85c7d7f3138fe729f4637853e0fafe0;hp=ccf5026c5cbe90cf3b3a07531b0946aa19cdd611 Merge branch 't/color_cleanups' --- diff --git a/Makefile.in b/Makefile.in index 994aadd5..3fbbce21 100644 --- a/Makefile.in +++ b/Makefile.in @@ -14,7 +14,7 @@ build_date := $(shell date) uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS") uname_rs := $(shell uname -rs) cc_version := $(shell $(CC) --version | head -n 1) -codename := symmetric randomization +codename := deterministic entropy DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W DEBUG_CPPFLAGS += -Wredundant-decls diff --git a/NEWS b/NEWS index a8b6ae43..561929b1 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,15 @@ -------------------------------------------------- -0.4.5 (to be announced) "symmetric randomization" -------------------------------------------------- +----------------------------------------------- +0.4.6 (to be announced) "deterministic entropy" +----------------------------------------------- + + - For DCCP/OGG streams the audio file header is only sent once + at the beginning of the stream rather than periodically + every five seconds. This reduces network traffic and the + FEC group size. + +-------------------------------------------- +0.4.5 (2010-12-17) "symmetric randomization" +-------------------------------------------- Bug fixes, internal cleanups and variable-sized FEC slices. diff --git a/aac.h b/aac.h index 0a4db41f..0653d35a 100644 --- a/aac.h +++ b/aac.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/aac_afh.c b/aac_afh.c index 3e394337..94b0f8b3 100644 --- a/aac_afh.c +++ b/aac_afh.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/aac_common.c b/aac_common.c index 68c3c89b..14662fdd 100644 --- a/aac_common.c +++ b/aac_common.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/aacdec_filter.c b/aacdec_filter.c index 1127fc11..95c13305 100644 --- a/aacdec_filter.c +++ b/aacdec_filter.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -89,7 +89,7 @@ static void aacdec_post_select(__a_unused struct sched *s, struct task *t) int i, ret; unsigned char *p, *inbuf, *outbuffer; char *btr_buf; - size_t len, skip, consumed, loaded, iqs; + size_t len, skip, consumed, loaded; next_buffer: t->error = 0; @@ -102,7 +102,6 @@ next_buffer: len = btr_next_buffer(btrn, (char **)&inbuf); len = PARA_MIN(len, (size_t)8192); consumed = 0; - iqs = btr_get_input_queue_size(btrn); if (!padd->initialized) { unsigned long rate = 0; unsigned char channels = 0; @@ -168,12 +167,15 @@ next_buffer: ret = -E_AAC_DECODE; if (padd->error_count++ > MAX_ERRORS) goto err; - PARA_ERROR_LOG("frame_error: %d (%s), consumed: %zu + %zd + %lu\n", - err, NeAACDecGetErrorMessage(padd->frame_info.error), + /* Suppress non-fatal bitstream error message at BOF/EOF */ + if (len < fn->min_iqs || padd->consumed_total == 0) { + consumed = len; + goto success; + } + PARA_ERROR_LOG("%s\n", NeAACDecGetErrorMessage(err)); + PARA_ERROR_LOG("consumed: %zu + %zd + %lu\n", padd->consumed_total, consumed, padd->frame_info.bytesconsumed); - PARA_ERROR_LOG("%s\n", NeAACDecGetErrorMessage( - padd->frame_info.error)); if (consumed < len) consumed++; /* catch 21 */ goto success; diff --git a/acl.c b/acl.c index 02df1e48..132350dd 100644 --- a/acl.c +++ b/acl.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/acl.h b/acl.h index 65ccc748..14950b36 100644 --- a/acl.h +++ b/acl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2010 Andre Noll + * Copyright (C) 2008-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/afh.c b/afh.c index b66e260a..5ce6cfc5 100644 --- a/afh.c +++ b/afh.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2010 Andre Noll + * Copyright (C) 2008-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/afh.h b/afh.h index ccfed2fb..8f74e236 100644 --- a/afh.h +++ b/afh.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/afh_common.c b/afh_common.c index 952ef7ca..dd2ae650 100644 --- a/afh_common.c +++ b/afh_common.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2010 Andre Noll + * Copyright (C) 1997-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/afs.c b/afs.c index 97c3d569..2fb28b71 100644 --- a/afs.c +++ b/afs.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/afs.h b/afs.h index ba5e134c..699998b0 100644 --- a/afs.h +++ b/afs.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/aft.c b/aft.c index aa6ef08f..412318b2 100644 --- a/aft.c +++ b/aft.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/alsa_write.c b/alsa_write.c index 8676a451..d6493418 100644 --- a/alsa_write.c +++ b/alsa_write.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/amp_filter.c b/amp_filter.c index 29c62e3b..21fd9fd1 100644 --- a/amp_filter.c +++ b/amp_filter.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2010 Andre Noll + * Copyright (C) 2009-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/attribute.c b/attribute.c index a353f141..24536911 100644 --- a/attribute.c +++ b/attribute.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2010 Andre Noll + * Copyright (C) 1997-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/audioc.c b/audioc.c index b17be3dd..74fb824c 100644 --- a/audioc.c +++ b/audioc.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/audiod.c b/audiod.c index 039a6886..64ea8a51 100644 --- a/audiod.c +++ b/audiod.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/audiod.h b/audiod.h index 44b430c8..94399602 100644 --- a/audiod.h +++ b/audiod.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/audiod_command.c b/audiod_command.c index ce1aff68..eed9fc15 100644 --- a/audiod_command.c +++ b/audiod_command.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/blob.c b/blob.c index 44159a6f..cbf2af49 100644 --- a/blob.c +++ b/blob.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/buffer_tree.c b/buffer_tree.c index bdcbec8d..c5417c2b 100644 --- a/buffer_tree.c +++ b/buffer_tree.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2010 Andre Noll + * Copyright (C) 2009-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/buffer_tree.h b/buffer_tree.h index 8bc8e602..fcf9df62 100644 --- a/buffer_tree.h +++ b/buffer_tree.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2010 Andre Noll + * Copyright (C) 2009-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/chunk_queue.c b/chunk_queue.c index 468b1dc2..c0a8fb51 100644 --- a/chunk_queue.c +++ b/chunk_queue.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -93,34 +93,6 @@ void cq_dequeue(struct chunk_queue *cq) free(qc); } -/** - * Force to add a chunk to the given queue. - * - * \param cq See \ref cq_enqueue. - * \param buf See \ref cq_enqueue. - * \param num_bytes See \ref cq_enqueue. - * - * If queuing the given buffer would result in exceeding the maximal queue - * size, buffers are dropped from the beginning of the queue. Note that this - * function still might fail. - * - * \return Standard. - */ -int cq_force_enqueue(struct chunk_queue *cq, const char *buf, size_t num_bytes) -{ - int ret; - - if (num_bytes > cq->max_pending) - return -E_QUEUE; - for (;;) { - ret = cq_enqueue(cq, buf, num_bytes); - if (ret >= 0) - return ret; - cq_dequeue(cq); - } - /* never reached */ -} - /** * Change the number of bytes sent for the current queued chunk. * diff --git a/chunk_queue.h b/chunk_queue.h index 9e794ba8..bcd43f8e 100644 --- a/chunk_queue.h +++ b/chunk_queue.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -16,4 +16,3 @@ void cq_update(struct chunk_queue *cq, size_t sent); int cq_get(struct queued_chunk *qc, const char **buf, size_t *len); struct chunk_queue *cq_new(size_t max_pending); void cq_destroy(struct chunk_queue *cq); -int cq_force_enqueue(struct chunk_queue *cq, const char *buf, size_t num_bytes); diff --git a/client.c b/client.c index 0b4afbd3..ec32cd41 100644 --- a/client.c +++ b/client.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2010 Andre Noll + * Copyright (C) 1997-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/client.h b/client.h index d4eae31a..667607e2 100644 --- a/client.h +++ b/client.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2010 Andre Noll + * Copyright (C) 1997-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/client_common.c b/client_common.c index 593cb2c0..a7115fd7 100644 --- a/client_common.c +++ b/client_common.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2010 Andre Noll + * Copyright (C) 1997-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -170,7 +170,7 @@ static void client_post_select(struct sched *s, struct task *t) return; ret = send_buffer(ct->rc4c.fd, buf); if (ret < 0) - goto err; + goto out; ct->status = CL_SENT_AUTH; return; case CL_SENT_AUTH: @@ -191,7 +191,7 @@ static void client_post_select(struct sched *s, struct task *t) ret = para_decrypt_buffer(ct->key_file, crypt_buf, (unsigned char *)buf, n); if (ret < 0) - goto err; + goto out; sha1_hash((char *)crypt_buf, CHALLENGE_SIZE, challenge_sha1); RC4_set_key(&ct->rc4c.send_key, RC4_KEY_LEN, crypt_buf + CHALLENGE_SIZE); @@ -202,7 +202,7 @@ static void client_post_select(struct sched *s, struct task *t) ret = send_bin_buffer(ct->rc4c.fd, (char *)challenge_sha1, HASH_SIZE); if (ret < 0) - goto err; + goto out; ct->status = CL_SENT_CH_RESPONSE; return; } @@ -237,7 +237,7 @@ static void client_post_select(struct sched *s, struct task *t) ret = rc4_send_buffer(&ct->rc4c, command); free(command); if (ret < 0) - goto err; + goto out; ct->status = CL_SENT_COMMAND; return; } @@ -265,7 +265,7 @@ static void client_post_select(struct sched *s, struct task *t) size_t sz; ret = btr_node_status(btrn, 0, BTR_NT_LEAF); if (ret < 0) - goto err; + goto out; if (ret == 0) return; if (!FD_ISSET(ct->rc4c.fd, &s->wfds)) @@ -273,7 +273,7 @@ static void client_post_select(struct sched *s, struct task *t) sz = btr_next_buffer(btrn, &buf2); ret = rc4_send_bin_buffer(&ct->rc4c, buf2, sz); if (ret < 0) - goto err; + goto out; btr_consume(btrn, sz); return; } @@ -282,7 +282,7 @@ static void client_post_select(struct sched *s, struct task *t) char *buf2; ret = btr_node_status(btrn, 0, BTR_NT_ROOT); if (ret < 0) - goto err; + goto out; if (ret == 0) return; /* @@ -301,7 +301,6 @@ static void client_post_select(struct sched *s, struct task *t) goto out; } } -err: out: t->error = ret; if (ret < 0) { diff --git a/close_on_fork.c b/close_on_fork.c index ac204e37..92517134 100644 --- a/close_on_fork.c +++ b/close_on_fork.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/command.c b/command.c index 1ca5db3c..57e851f9 100644 --- a/command.c +++ b/command.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2010 Andre Noll + * Copyright (C) 1997-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -13,6 +13,7 @@ #include #include #include +#include #include "para.h" #include "error.h" diff --git a/compress_filter.c b/compress_filter.c index eee37518..d0816df4 100644 --- a/compress_filter.c +++ b/compress_filter.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/crypt.c b/crypt.c index b6a54604..917948c6 100644 --- a/crypt.c +++ b/crypt.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/crypt.h b/crypt.h index 8357b6d7..6bd8179b 100644 --- a/crypt.h +++ b/crypt.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/daemon.c b/daemon.c index 08231cb6..b7a0a326 100644 --- a/daemon.c +++ b/daemon.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2010 Andre Noll + * Copyright (C) 1997-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/dccp_recv.c b/dccp_recv.c index 2ab9fcab..41c2ee1a 100644 --- a/dccp_recv.c +++ b/dccp_recv.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/dccp_send.c b/dccp_send.c index a2ee0270..304a42e7 100644 --- a/dccp_send.c +++ b/dccp_send.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -145,6 +145,7 @@ static void dccp_post_select(fd_set *rfds, __a_unused fd_set *wfds) dfc->fcp.slices_per_group = conf.dccp_slices_per_group_arg; dfc->fcp.init_fec = dccp_init_fec; dfc->fcp.send_fec = dccp_send_fec; + dfc->fcp.need_periodic_header = false; dfc->fc = vss_add_fec_client(sc, &dfc->fcp); } diff --git a/error.h b/error.h index 9864b1d9..3dfee0dd 100644 --- a/error.h +++ b/error.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/exec.c b/exec.c index db05c022..b11b217b 100644 --- a/exec.c +++ b/exec.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2010 Andre Noll + * Copyright (C) 2003-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/fade.c b/fade.c index d9f93ccf..8eeb79e7 100644 --- a/fade.c +++ b/fade.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1998-2010 Andre Noll + * Copyright (C) 1998-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/fd.c b/fd.c index 54eddb3c..a0969e3e 100644 --- a/fd.c +++ b/fd.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/fd.h b/fd.h index 00b02bef..436622f0 100644 --- a/fd.h +++ b/fd.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/fecdec_filter.c b/fecdec_filter.c index d8b92976..4f3ba950 100644 --- a/fecdec_filter.c +++ b/fecdec_filter.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2010 Andre Noll + * Copyright (C) 2009-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/file_write.c b/file_write.c index 7762d794..8cafbb68 100644 --- a/file_write.c +++ b/file_write.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/filter.c b/filter.c index 7726e35f..1d938c45 100644 --- a/filter.c +++ b/filter.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/filter.h b/filter.h index 692020c4..0808059d 100644 --- a/filter.h +++ b/filter.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/filter_common.c b/filter_common.c index cdd9f398..269c4d6d 100644 --- a/filter_common.c +++ b/filter_common.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/ggo.c b/ggo.c index a25c0809..a9bc4c36 100644 --- a/ggo.c +++ b/ggo.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2010 Andre Noll + * Copyright (C) 2008-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/ggo.h b/ggo.h index cc0c96b3..88db8761 100644 --- a/ggo.h +++ b/ggo.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2010 Andre Noll + * Copyright (C) 2008-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/grab_client.c b/grab_client.c index b61981f2..8e671503 100644 --- a/grab_client.c +++ b/grab_client.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/grab_client.h b/grab_client.h index 75ba4c91..88b95483 100644 --- a/grab_client.h +++ b/grab_client.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/gui.c b/gui.c index 865ed658..8e70dd93 100644 --- a/gui.c +++ b/gui.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1998-2010 Andre Noll + * Copyright (C) 1998-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/gui.h b/gui.h index 65342a4d..f8c6712b 100644 --- a/gui.h +++ b/gui.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/gui_theme.c b/gui_theme.c index 647eb66f..ffb47d43 100644 --- a/gui_theme.c +++ b/gui_theme.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/hash.h b/hash.h index be18a92a..6dfddbed 100644 --- a/hash.h +++ b/hash.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/http_recv.c b/http_recv.c index 9ade8dfb..53ef8e60 100644 --- a/http_recv.c +++ b/http_recv.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -49,7 +49,7 @@ struct private_http_recv_data { * The file descriptor used for receiving the http stream. * * The pre_select function of the http receiver adds this file descriptor to - * the set of file decriptors which are checked for reading/writing (depending + * the set of file descriptors which are checked for reading/writing (depending * on the current status) by the select loop of the application (para_audiod or * para_recv). * diff --git a/http_send.c b/http_send.c index e376c464..086b600f 100644 --- a/http_send.c +++ b/http_send.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -10,6 +10,7 @@ #include #include #include +#include #include "para.h" #include "error.h" diff --git a/ipc.c b/ipc.c index 6a0f00b5..c1069ad9 100644 --- a/ipc.c +++ b/ipc.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/mm.c b/mm.c index 57121a1c..a9f4b9bd 100644 --- a/mm.c +++ b/mm.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/mm.h b/mm.h index 55af744f..ebc968d3 100644 --- a/mm.h +++ b/mm.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/mood.c b/mood.c index 89ad80d9..732df0a3 100644 --- a/mood.c +++ b/mood.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/mood.h b/mood.h index 5ef01489..e9f08111 100644 --- a/mood.h +++ b/mood.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/mp3_afh.c b/mp3_afh.c index 980649c8..b83343ed 100644 --- a/mp3_afh.c +++ b/mp3_afh.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2010 Andre Noll + * Copyright (C) 2003-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/mp3dec_filter.c b/mp3dec_filter.c index c2c15a3a..82f01418 100644 --- a/mp3dec_filter.c +++ b/mp3dec_filter.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/net.c b/net.c index fa48e54f..2369dc8c 100644 --- a/net.c +++ b/net.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/net.h b/net.h index 75389aec..a1af08ae 100644 --- a/net.h +++ b/net.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/ogg_afh.c b/ogg_afh.c index 744a1331..ef42c497 100644 --- a/ogg_afh.c +++ b/ogg_afh.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2010 Andre Noll + * Copyright (C) 2004-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/ogg_afh_common.c b/ogg_afh_common.c index 54e92956..1deb5cda 100644 --- a/ogg_afh_common.c +++ b/ogg_afh_common.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2010 Andre Noll + * Copyright (C) 2004-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -163,7 +163,7 @@ int ogg_get_file_info(char *map, size_t numbytes, struct afh_info *afhi, afhi->chunk_table[1] = afhi->header_len; oss.returned = afhi->header_len; oss.fill = numbytes; - for (i = 0, j = 1; ogg_sync_pageseek(&oss, &op) > 0; i++) { + for (j = 1; ogg_sync_pageseek(&oss, &op) > 0; /* nothing */) { int granule = ogg_page_granulepos(&op); while (granule > j * frames_per_chunk) { diff --git a/ogg_afh_common.h b/ogg_afh_common.h index c7eb167e..01f8d6c5 100644 --- a/ogg_afh_common.h +++ b/ogg_afh_common.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Andre Noll + * Copyright (C) 2010-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/oggdec_filter.c b/oggdec_filter.c index 68b4db16..1bc6d2f7 100644 --- a/oggdec_filter.c +++ b/oggdec_filter.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/oss_write.c b/oss_write.c index 090f9905..df9608a8 100644 --- a/oss_write.c +++ b/oss_write.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2010 Andre Noll + * Copyright (C) 2009-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/osx_write.c b/osx_write.c index ebfa4b3c..f27a49b0 100644 --- a/osx_write.c +++ b/osx_write.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/para.h b/para.h index 1dcbb6d3..c5e12fe6 100644 --- a/para.h +++ b/para.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2010 Andre Noll + * Copyright (C) 1997-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -70,7 +70,7 @@ /** Version text used by various commands if -V switch was given. */ #define VERSION_TEXT(prefix) "para_" prefix " " PACKAGE_VERSION \ " (" GIT_VERSION ": " CODENAME ")" "\n" \ - "Copyright (C) 2010 Andre Noll\n" \ + "Copyright (C) 2011 Andre Noll\n" \ "This is free software with ABSOLUTELY NO WARRANTY." \ " See COPYING for details.\n" \ "Written by Andre Noll.\n" \ diff --git a/playlist.c b/playlist.c index b04598b8..2d2f23b4 100644 --- a/playlist.c +++ b/playlist.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/portable_io.h b/portable_io.h index 2353c610..e766d7bc 100644 --- a/portable_io.h +++ b/portable_io.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/prebuffer_filter.c b/prebuffer_filter.c index 548a8177..e1b0390c 100644 --- a/prebuffer_filter.c +++ b/prebuffer_filter.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2010 Andre Noll + * Copyright (C) 2009-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/recv.c b/recv.c index 99efefb7..a737e4cb 100644 --- a/recv.c +++ b/recv.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/recv.h b/recv.h index 271932b1..05c5ed76 100644 --- a/recv.h +++ b/recv.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/recv_common.c b/recv_common.c index 6517948d..3fe2a139 100644 --- a/recv_common.c +++ b/recv_common.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/ringbuffer.c b/ringbuffer.c index 1f0b4e46..bf990b06 100644 --- a/ringbuffer.c +++ b/ringbuffer.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/ringbuffer.h b/ringbuffer.h index 7ddfb1c0..67f9f3a8 100644 --- a/ringbuffer.h +++ b/ringbuffer.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/sched.c b/sched.c index 6da5fa23..b0e9ce12 100644 --- a/sched.c +++ b/sched.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/sched.h b/sched.h index 1da5a220..7158a873 100644 --- a/sched.h +++ b/sched.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/score.c b/score.c index 6b9d05b5..27fec711 100644 --- a/score.c +++ b/score.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/send.h b/send.h index 2201bebf..836babd5 100644 --- a/send.h +++ b/send.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -131,6 +131,8 @@ struct fec_client_parms { uint8_t slices_per_group; /** Number of slices minus number of redundant slices. */ uint8_t data_slices_per_group; + /** Whether the header must be sent periodically. */ + bool need_periodic_header; /** * Transport-layer initialisation for FEC support. * diff --git a/send_common.c b/send_common.c index 33c56e7a..6a85644d 100644 --- a/send_common.c +++ b/send_common.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/server.c b/server.c index 47323359..849b707a 100644 --- a/server.c +++ b/server.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2010 Andre Noll + * Copyright (C) 1997-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -68,6 +68,7 @@ #include #include #include +#include #include "para.h" #include "error.h" diff --git a/server.h b/server.h index 43ba841d..3b2f381c 100644 --- a/server.h +++ b/server.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2010 Andre Noll + * Copyright (C) 1997-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/sha1.c b/sha1.c index 70731ec2..b0e955ec 100644 --- a/sha1.c +++ b/sha1.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/signal.c b/signal.c index 0b4b6f0b..4726571c 100644 --- a/signal.c +++ b/signal.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2010 Andre Noll + * Copyright (C) 2004-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/signal.h b/signal.h index 1dbfc981..799c317f 100644 --- a/signal.h +++ b/signal.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/spx.h b/spx.h index 6ffa80eb..124d6834 100644 --- a/spx.h +++ b/spx.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Andre Noll + * Copyright (C) 2010-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/spx_afh.c b/spx_afh.c index 472c2c80..6414f4c4 100644 --- a/spx_afh.c +++ b/spx_afh.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Andre Noll + * Copyright (C) 2010-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/spx_common.c b/spx_common.c index ce01e23a..f9f1eb7e 100644 --- a/spx_common.c +++ b/spx_common.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2002-2006 Jean-Marc Valin - * Copyright (C) 2010 Andre Noll + * Copyright (C) 2010-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/spxdec_filter.c b/spxdec_filter.c index da2d5da6..41b66c51 100644 --- a/spxdec_filter.c +++ b/spxdec_filter.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2002-2006 Jean-Marc Valin - * Copyright (C) 2010 Andre Noll + * Copyright (C) 2010-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/stat.c b/stat.c index b9d8e3b9..b125529a 100644 --- a/stat.c +++ b/stat.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/stdin.c b/stdin.c index ca5eb0e1..e625f372 100644 --- a/stdin.c +++ b/stdin.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/stdin.h b/stdin.h index a1983dd5..2d279a6e 100644 --- a/stdin.h +++ b/stdin.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/stdout.c b/stdout.c index 775f0649..5604fced 100644 --- a/stdout.c +++ b/stdout.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/stdout.h b/stdout.h index 3783796c..1e35d6ca 100644 --- a/stdout.h +++ b/stdout.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/string.c b/string.c index c228c24c..813999bb 100644 --- a/string.c +++ b/string.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2010 Andre Noll + * Copyright (C) 2004-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/string.h b/string.h index 7b5887e1..06f4d3e6 100644 --- a/string.h +++ b/string.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/time.c b/time.c index 8faefc05..19bf469c 100644 --- a/time.c +++ b/time.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/udp_recv.c b/udp_recv.c index f008f1ed..e276343e 100644 --- a/udp_recv.c +++ b/udp_recv.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/udp_send.c b/udp_send.c index 0343feb6..4fb10b44 100644 --- a/udp_send.c +++ b/udp_send.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -14,6 +14,7 @@ #include #include #include +#include #include "server.cmdline.h" #include "para.h" @@ -30,7 +31,6 @@ #include "fd.h" #include "sched.h" #include "close_on_fork.h" -#include "chunk_queue.h" /** * Time window during which ICMP Destination/Port Unreachable messages are @@ -43,8 +43,6 @@ struct udp_target { /** Track time (seconds) of last ICMP Port Unreachable error */ time_t last_unreachable; - /** Common sender client data */ - struct sender_client *sc; /** The opaque structure returned by vss_add_fec_client(). */ struct fec_client *fc; /** The FEC parameters for this target. */ @@ -56,11 +54,11 @@ static int sender_status; static void udp_close_target(struct sender_client *sc) { - if (sc->cq != NULL) { - del_close_on_fork_list(sc->fd); - cq_destroy(sc->cq); - sc->cq = NULL; - } + const char *buf; + size_t len = vss_get_fec_eof_packet(&buf); + + /* ignore return value, closing the target anyway. */ + (void)write(sc->fd, buf, len); } static void udp_delete_target(struct sender_client *sc, const char *msg) @@ -69,6 +67,8 @@ static void udp_delete_target(struct sender_client *sc, const char *msg) PARA_NOTICE_LOG("deleting %s (%s) from list\n", sc->name, msg); udp_close_target(sc); + close(sc->fd); + del_close_on_fork_list(sc->fd); vss_del_fec_client(ut->fc); list_del(&sc->node); free(sc->name); @@ -152,30 +152,16 @@ err: return -ERRNO_TO_PARA_ERROR(errno); } -/** The maximal size of the per-target chunk queue. */ -#define UDP_CQ_BYTES 40000 - static void udp_init_session(struct sender_client *sc) { - if (sc->cq == NULL) { - sc->cq = cq_new(UDP_CQ_BYTES); - add_close_on_fork_list(sc->fd); - PARA_NOTICE_LOG("sending to udp %s\n", sc->name); - } + PARA_NOTICE_LOG("sending to udp %s\n", sc->name); } static void udp_shutdown_targets(void) { struct sender_client *sc, *tmp; - const char *buf; - size_t len = vss_get_fec_eof_packet(&buf); - list_for_each_entry_safe(sc, tmp, &targets, node) - if (sc->cq != NULL) { - /* ignore return value, closing the target anyway. */ - (void)write(sc->fd, buf, len); - udp_close_target(sc); - } + udp_close_target(sc); } static int udp_resolve_target(const char *url, struct sender_command_data *scd) @@ -294,19 +280,11 @@ static int udp_send_fec(struct sender_client *sc, char *buf, size_t len) if (sender_status == SENDER_OFF) return 0; - if (len == 0 && !cq_peek(sc->cq)) + if (len == 0) return 0; ret = udp_check_socket_state(sc); if (ret < 0) goto fail; - ret = send_queued_chunks(sc->fd, sc->cq); - if (ret < 0) - goto fail; - if (!ret) { /* still data left in the queue */ - ret = cq_force_enqueue(sc->cq, buf, len); - assert(ret >= 0); - return 0; - } ret = write_nonblock(sc->fd, buf, len); if (ret == -ERRNO_TO_PARA_ERROR(ECONNREFUSED)) { /* @@ -317,10 +295,6 @@ static int udp_send_fec(struct sender_client *sc, char *buf, size_t len) } if (ret < 0) goto fail; - if (ret != len) { - ret = cq_force_enqueue(sc->cq, buf + ret, len - ret); - assert(ret >= 0); - } return 1; fail: udp_delete_target(sc, para_strerror(-ret)); @@ -339,11 +313,12 @@ static int udp_com_add(struct sender_command_data *scd) return -E_TARGET_EXISTS; } ut = para_calloc(sizeof(*ut)); - sc = ut->sc = para_calloc(sizeof(*sc)); + sc = para_calloc(sizeof(*sc)); ut->fcp.slices_per_group = scd->slices_per_group; ut->fcp.data_slices_per_group = scd->data_slices_per_group; ut->fcp.init_fec = udp_init_fec; ut->fcp.send_fec = udp_send_fec; + ut->fcp.need_periodic_header = true; sc->private_data = ut; sc->fd = -1; @@ -362,6 +337,7 @@ static int udp_com_add(struct sender_command_data *scd) PARA_INFO_LOG("adding to target list (%s)\n", sc->name); ut->fc = vss_add_fec_client(sc, &ut->fcp); para_list_add(&sc->node, &targets); + add_close_on_fork_list(sc->fd); return 1; err: if (sc->fd >= 0) diff --git a/user_list.c b/user_list.c index a1f1557c..fe1b946b 100644 --- a/user_list.c +++ b/user_list.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/user_list.h b/user_list.h index 5d3b27fb..cce577a6 100644 --- a/user_list.h +++ b/user_list.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/versions/paraslash-0.4.5.tar.bz2 b/versions/paraslash-0.4.5.tar.bz2 new file mode 100644 index 00000000..6299d0c5 Binary files /dev/null and b/versions/paraslash-0.4.5.tar.bz2 differ diff --git a/versions/paraslash-0.4.5.tar.bz2.asc b/versions/paraslash-0.4.5.tar.bz2.asc new file mode 100644 index 00000000..c56b9b36 --- /dev/null +++ b/versions/paraslash-0.4.5.tar.bz2.asc @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.10 (GNU/Linux) + +iEYEABECAAYFAk0LimcACgkQWto1QDEAkw9cigCfQfJi6KJMC7HHGO7zrvlrz7f/ +4DoAn2hSNGm08WWIgqLYOjUGbQSCnNMc +=/3KE +-----END PGP SIGNATURE----- diff --git a/vss.c b/vss.c index 96b2ba9e..916a71d5 100644 --- a/vss.c +++ b/vss.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2010 Andre Noll + * Copyright (C) 1997-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -227,12 +227,29 @@ static bool need_audio_header(struct fec_client *fc, struct vss_task *vsst) return false; if (vsst->header_len == 0) return false; - if (fc->group.num && tv_diff(&fc->next_header_time, now, NULL) > 0) - return false; + if (fc->group.num > 0) { + if (!fc->fcp->need_periodic_header) + return false; + if (tv_diff(&fc->next_header_time, now, NULL) > 0) + return false; + } tv_add(now, &vsst->header_interval, &fc->next_header_time); return true; } +static bool need_data_slices(struct fec_client *fc, struct vss_task *vsst) +{ + if (fc->group.num > 0) + return true; + if (!vsst->header_buf) + return true; + if (vsst->header_len == 0) + return true; + if (fc->fcp->need_periodic_header) + return true; + return false; +} + static int num_slices(long unsigned bytes, int max_payload, int rs) { int ret; @@ -246,11 +263,15 @@ static int num_slices(long unsigned bytes, int max_payload, int rs) } /* set group start and group duration */ -static void set_group_timing(struct fec_client *fc, struct fec_group *g) +static void set_group_timing(struct fec_client *fc, struct vss_task *vsst) { + struct fec_group *g = &fc->group; struct timeval *chunk_tv = vss_chunk_time(); - tv_scale(g->num_chunks, chunk_tv, &g->duration); + if (!need_data_slices(fc, vsst)) + ms2tv(200, &g->duration); + else + tv_scale(g->num_chunks, chunk_tv, &g->duration); tv_divide(fc->fcp->slices_per_group + fc->num_extra_slices, &g->duration, &g->slice_duration); PARA_DEBUG_LOG("durations (group/chunk/slice): %lu/%lu/%lu\n", @@ -288,7 +309,10 @@ static int initialize_fec_client(struct fec_client *fc, struct vss_task *vsst) if (ret < 0) return ret; ds = ret; - k = hs + ds; + if (fc->fcp->need_periodic_header) + k = hs + ds; + else + k = PARA_MAX(hs, ds); if (k < fc->fcp->data_slices_per_group) k = fc->fcp->data_slices_per_group; fc->num_extra_slices = k - fc->fcp->data_slices_per_group; @@ -407,6 +431,13 @@ static int compute_slice_size(struct fec_client *fc, struct vss_task *vsst) g->slice_bytes = 1; return 1; } + if (!need_data_slices(fc, vsst)) { + g->bytes = 0; + g->num_chunks = 0; + g->slice_bytes = DIV_ROUND_UP(vsst->header_len, k); + g->num_header_slices = k; + return 1; + } h = vsst->header_len; max_group_bytes = (k - num_slices(h, max_slice_bytes, n - k)) * max_slice_bytes; @@ -467,7 +498,7 @@ static int setup_next_fec_group(struct fec_client *fc, struct vss_task *vsst) */ tmp = g->start; tv_add(&tmp, &g->duration, &g->start); - set_group_timing(fc, g); + set_group_timing(fc, vsst); g->first_chunk += g->num_chunks; g->num++; } @@ -483,7 +514,7 @@ static int setup_next_fec_group(struct fec_client *fc, struct vss_task *vsst) assert(g->num_header_slices + data_slices <= k); fc->current_slice_num = 0; if (g->num == 0) - set_group_timing(fc, g); + set_group_timing(fc, vsst); /* setup header slices */ buf = vsst->header_buf; diff --git a/vss.h b/vss.h index c7e41b9d..bd798b0c 100644 --- a/vss.h +++ b/vss.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/wav_filter.c b/wav_filter.c index b28b1d3c..8408034d 100644 --- a/wav_filter.c +++ b/wav_filter.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/web/footer.html b/web/footer.html index d9c9f058..38572c94 100644 --- a/web/footer.html +++ b/web/footer.html @@ -1,13 +1,4 @@
- -

- Valid HTML 4.01! -

---> diff --git a/web/index.in.html b/web/index.in.html index 663dea31..48f5bb51 100644 --- a/web/index.in.html +++ b/web/index.in.html @@ -1,6 +1,10 @@

Events


    +
  • 2010-12-17: paraslash-0.4.5 + (sig) + "symmetric randomization" +
  • 2010-08-06: paraslash-0.4.4 (sig) "persistent regularity" diff --git a/wma_afh.c b/wma_afh.c index d9a83483..9b7d85b3 100644 --- a/wma_afh.c +++ b/wma_afh.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2010 Andre Noll + * Copyright (C) 2009-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/wma_common.c b/wma_common.c index 0cb881e5..781db5f4 100644 --- a/wma_common.c +++ b/wma_common.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2010 Andre Noll + * Copyright (C) 2009-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/write.c b/write.c index 424286b5..dda1b705 100644 --- a/write.c +++ b/write.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Andre Noll + * Copyright (C) 2005-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/write.h b/write.h index d5834b4c..0044ae4f 100644 --- a/write.h +++ b/write.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/write_common.c b/write_common.c index 04db8ff0..5988faf7 100644 --- a/write_common.c +++ b/write_common.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ diff --git a/write_common.h b/write_common.h index 331fa460..5f55120b 100644 --- a/write_common.h +++ b/write_common.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */