Merge branch 't/sb'
authorAndre Noll <maan@systemlinux.org>
Sun, 24 Jun 2012 18:53:23 +0000 (20:53 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 24 Jun 2012 19:24:16 +0000 (21:24 +0200)
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.

Makefile.in
NEWS
audiod.c
bitstream.h
oss_write.c
wmadata.h
wmadec_filter.c

index 5760cad42189fbade5920b4d24573fc5407bc603..30a5c015a6f982dd5703aa51498aa89eda347b4e 100644 (file)
@@ -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 0ac2240effe91e4294c8ec901fe18f9c143e42d3..fa8e0249be9945f08cd4bf9c36531854cf8000f5 100644 (file)
--- 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.
index aefac612b480af2d6f1c857b5225f3d042b68ff4..40603c4eff782b0f945ccab6f5193e99f78b7462 100644 (file)
--- 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:
index 5d6be3be2693a84f8107504f4a086dfa578c817b..a3393380e5e02801a4312c6f904c1ea25527aad9 100644 (file)
@@ -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;
index f075ce502900e03e3fb743229e9f6ca7c735725e..f1e901993120008eb67a221c438b1b3f5c3a3c10 100644 (file)
@@ -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;
 }
 
index b5dad0f5af40a15773dce43b4a77e65346ea5b66..185ec1fcecb738de2a322d4e81aa67f384026b1b 100644 (file)
--- 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;
 };
 
index 7d89d112a53d074cf3538cf890062b7afa87278c..be726108818b826ebc4a7f17ac773eb31a1786b8 100644 (file)
@@ -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);