para_server: New command line option: --autoplay_delay
[paraslash.git] / ortp_recv.c
index 12a990c..287d706 100644 (file)
@@ -120,9 +120,9 @@ static void compute_next_chunk(unsigned chunk_time,
        tv_add(&chunk_tv, &pord->next_chunk, &tmp);
        pord->next_chunk = tmp;
        pord->timestamp += pord->chunk_ts;
-       PARA_DEBUG_LOG("next chunk (ts = %d) due at %lu:%lu\n",
-               pord->timestamp, pord->next_chunk.tv_sec,
-               pord->next_chunk.tv_usec);
+//     PARA_DEBUG_LOG("next chunk (ts = %d) due at %lu:%lu\n",
+//             pord->timestamp, pord->next_chunk.tv_sec,
+//             pord->next_chunk.tv_usec);
 }
 
 static void ortp_recv_post_select(__a_unused struct sched *s, struct task *t)
@@ -273,20 +273,21 @@ static void *ortp_recv_parse_config(int argc, char **argv)
 static int ortp_recv_open(struct receiver_node *rn)
 {
        struct private_ortp_recv_data *pord;
-       struct ortp_recv_args_info *conf = rn->conf;
+       struct ortp_recv_args_info *c = rn->conf;
 
        rn->buf = para_calloc(CHUNK_SIZE);
 
        rn->private_data = para_calloc(sizeof(struct private_ortp_recv_data));
        pord = rn->private_data;
        pord->session = rtp_session_new(RTP_SESSION_RECVONLY);
-       PARA_NOTICE_LOG("receiving from %s:%d\n", conf->host_arg, conf->port_arg);
-       rtp_session_set_local_addr(pord->session, conf->host_arg, conf->port_arg);
+       PARA_NOTICE_LOG("receiving from %s:%d\n", c->host_arg, c->port_arg);
+       rtp_session_set_local_addr(pord->session, c->host_arg, c->port_arg);
+       rtp_session_set_remote_addr(pord->session, c->host_arg, c->port_arg);
        rtp_session_set_payload_type(pord->session, PAYLOAD_AUDIO_CONTINUOUS);
-       if (conf->jitter_compensation_arg) {
+       if (c->jitter_compensation_arg) {
                rtp_session_enable_adaptive_jitter_compensation(pord->session, TRUE);
                rtp_session_set_jitter_compensation(pord->session,
-                       conf->jitter_compensation_arg);
+                       c->jitter_compensation_arg);
        }
        return 1;
 }