From: Andre Noll Date: Sun, 24 Jun 2012 18:53:23 +0000 (+0200) Subject: Merge branch 't/sb' X-Git-Tag: v0.4.11~14 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=1745a87654ce08b57c46ce0870d8571eacbe27c9;hp=fd864cc2fb78f1fac3af849743909aa23b2cb633 Merge branch 't/sb' Was cooking in next for several weeks with no problems so far. fd864c Fix documentation of pass_buffer_as_shm(). 32ffc0 Pass command exit status via sideband to client. 7dc1b5 Send command output via sideband. 0229d7 Introduce send_strerror(). d5a9e8 Simplify pass_buffer_as_shm(). 3667d7 command.c: Improve get_status(). aa3fe7 Pass command via sideband. 9c2a26 Use sideband also for "proceed" handshake. 4744d9 Use sideband also for challenge response. fa9e0e Send and receive challenge via sideband. 2830b9 Add sideband implementation. e151db Implement client-server feature negotiation. e31d5d afs: Rename sc_send_result() to afs_cb_result_handler(). 68cb0a Introduce afs_max_size_handler_data and afs_max_size_handler(). d04b83 client: Improve error diagnostics. --- diff --git a/Makefile.in b/Makefile.in index 5760cad4..30a5c015 100644 --- a/Makefile.in +++ b/Makefile.in @@ -45,6 +45,8 @@ ifeq ($(uname_s),Linux) LDFLAGS += -Wl,--gc-sections CPPFLAGS += -Wstrict-prototypes CPPFLAGS += -Wshadow + # causes warnings on *BSD for the feature test macros + CPPFLAGS += -Wunused-macros endif CPPFLAGS += -Os CPPFLAGS += -Wuninitialized @@ -56,7 +58,6 @@ CPPFLAGS += -DCODENAME='"$(codename)"' CPPFLAGS += -DCC_VERSION='"$(cc_version)"' CPPFLAGS += -Werror-implicit-function-declaration CPPFLAGS += -Wmissing-noreturn -CPPFLAGS += -Wunused-macros CPPFLAGS += -Wbad-function-cast CPPFLAGS += -fno-strict-aliasing CPPFLAGS += -DMAIN_INPUT_FILE_IS_$(*F) diff --git a/NEWS b/NEWS index 0ac2240e..fa8e0249 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ 0.4.11 (to be announced) "mutual diversity" ------------------------------------------- + - Sideband connections: If both para_server and para_client + support this feature, data is sent as a multiplexed stream. - The --no_default_filters option of para_filter has been removed. - Documentation improvements. diff --git a/audiod.c b/audiod.c index aefac612..40603c4e 100644 --- a/audiod.c +++ b/audiod.c @@ -250,7 +250,7 @@ char *get_time_string(int slot_num) */ length = stat_task->length_seconds; tmp = &stat_task->server_stream_start; - if (s && s->wns) { /* writer active in this slot */ + if (s && s->wns && s->wns[0].btrn) { /* writer active in this slot */ btr_get_node_start(s->wns[0].btrn, &wstime); if (wstime.tv_sec != 0) { /* writer wrote something */ if (s->server_stream_start.tv_sec == 0) { @@ -267,7 +267,7 @@ char *get_time_string(int slot_num) tv_diff(tmp, &stat_task->sa_time_diff, &sss); else tv_add(tmp, &stat_task->sa_time_diff, &sss); - if (!s || !s->wns) { + if (!s || !s->wns || !s->wns[0].btrn) { struct timeval diff; tv_diff(now, &sss, &diff); seconds = diff.tv_sec + stat_task->offset_seconds; @@ -276,11 +276,14 @@ char *get_time_string(int slot_num) tv_diff(now, &wstime, &wtime); //PARA_CRIT_LOG("offset %d\n", s->offset_seconds); seconds = s->offset_seconds; - btr_get_node_start(s->receiver_node->btrn, &rstime); - ret = tv_diff(&rstime, &sss, &rskip); - if (ret > 0) { /* audiod was started in the middle of the stream */ - tv_add(&wtime, &rskip, &sum); - seconds += sum.tv_sec; + if (s->receiver_node->btrn) { + btr_get_node_start(s->receiver_node->btrn, &rstime); + ret = tv_diff(&rstime, &sss, &rskip); + if (ret > 0) { /* audiod was started in the middle of the stream */ + tv_add(&wtime, &rskip, &sum); + seconds += sum.tv_sec; + } else + seconds += wtime.tv_sec; } else seconds += wtime.tv_sec; out: diff --git a/bitstream.h b/bitstream.h index 5d6be3be..a3393380 100644 --- a/bitstream.h +++ b/bitstream.h @@ -11,9 +11,9 @@ /** Structure for bistream I/O. */ struct getbit_context { - /* Start of the internal buffer. */ + /** Start of the internal buffer. */ const uint8_t *buffer; - /* End of the internal buffer. */ + /** End of the internal buffer. */ const uint8_t *buffer_end; /** Bit counter. */ int index; diff --git a/oss_write.c b/oss_write.c index f075ce50..f1e90199 100644 --- a/oss_write.c +++ b/oss_write.c @@ -152,6 +152,8 @@ err: close(powd->fd); err_free: free(powd); + PARA_ERROR_LOG("failed to init %s: %s\n", conf->device_arg, + para_strerror(-ret)); return ret; } diff --git a/wmadata.h b/wmadata.h index b5dad0f5..185ec1fc 100644 --- a/wmadata.h +++ b/wmadata.h @@ -29,7 +29,7 @@ struct coef_vlc_table { const uint32_t *huffcodes; /** VLC bit size. */ const uint8_t *huffbits; - /* Table to build run/level tables. */ + /** Table to build run/level tables. */ const uint16_t *levels; }; diff --git a/wmadec_filter.c b/wmadec_filter.c index 7d89d112..be726108 100644 --- a/wmadec_filter.c +++ b/wmadec_filter.c @@ -71,7 +71,9 @@ struct private_wmadec_data { int use_exp_vlc; /** Whether perceptual noise is added. */ int use_noise_coding; + /** Depends on number of the bits per second and the frame length. */ int byte_offset_bits; + /** Only used if use_exp_vlc is true. */ struct vlc exp_vlc; int exponent_sizes[BLOCK_NB_SIZES]; uint16_t exponent_bands[BLOCK_NB_SIZES][25]; @@ -502,9 +504,8 @@ static int wma_decode_init(char *initial_buf, int len, struct private_wmadec_dat if (pwd->use_exp_vlc) { PARA_INFO_LOG("using exp_vlc\n"); - init_vlc(&pwd->exp_vlc, EXPVLCBITS, - sizeof(wma_scale_huffbits), wma_scale_huffbits, - wma_scale_huffcodes, 4); + init_vlc(&pwd->exp_vlc, EXPVLCBITS, sizeof(wma_scale_huffbits), + wma_scale_huffbits, wma_scale_huffcodes, 4); } else { PARA_INFO_LOG("using curve\n"); wma_lsp_to_curve_init(pwd, pwd->frame_len);