]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - ortp_recv.c
new function: set_stream_fds()
[paraslash.git] / ortp_recv.c
index 582450901d9cf0c3cc8e762daeaff518e384cce7..1e440420a2e78b49a81b7d387dc8eaf3a1fd2d36 100644 (file)
@@ -234,7 +234,7 @@ static void *ortp_recv_parse_config(int argc, char **argv)
 {
        int ret;
 
-       struct gengetopt_args_info *tmp = para_calloc(sizeof(struct gengetopt_args_info));
+       struct ortp_recv_args_info *tmp = para_calloc(sizeof(struct ortp_recv_args_info));
 
        ret = ortp_recv_cmdline_parser(argc, argv, tmp)? -E_ORTP_SYNTAX : 1;
        if (ret > 0)
@@ -246,7 +246,7 @@ 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 gengetopt_args_info *conf = rn->conf;
+       struct ortp_recv_args_info *conf = rn->conf;
 
        rn->buf = para_calloc(CHUNK_SIZE);
 
@@ -256,8 +256,11 @@ static int ortp_recv_open(struct receiver_node *rn)
        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);
        rtp_session_set_payload_type(pord->session, PAYLOAD_AUDIO_CONTINUOUS);
-       rtp_session_enable_adaptive_jitter_compensation(pord->session, TRUE);
-       rtp_session_set_jitter_compensation(pord->session, 40);
+       if (conf->jitter_compensation_arg) {
+               rtp_session_enable_adaptive_jitter_compensation(pord->session, TRUE);
+               rtp_session_set_jitter_compensation(pord->session,
+                       conf->jitter_compensation_arg);
+       }
        return 1;
 }