]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
ortp: make jitter compensation configurable.
authorAndre <maan@p133.(none)>
Tue, 14 Mar 2006 18:18:51 +0000 (19:18 +0100)
committerAndre <maan@p133.(none)>
Tue, 14 Mar 2006 18:18:51 +0000 (19:18 +0100)
Non-zero values turn on ortp's adaptive jitter compensation.

ortp_recv.c
ortp_recv.ggo
ortp_send.c
server.ggo

index 582450901d9cf0c3cc8e762daeaff518e384cce7..4df8e3a5af040521c8c8fd38fed97a22e042382b 100644 (file)
@@ -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;
 }
 
index 6902fedeeac501a8ba44ed7c771c27ca40904c51..68ff6e7a4b80a714e8377a93ec5a06896186b788 100644 (file)
@@ -1,3 +1,4 @@
 section "ortp options"
 option "host" i "ip or host to receive rtp packets from" string default="224.0.1.38" no
 option "port" p "udp port." int typestr="portnumber" default="1500" no
+option "jitter_compensation" j "non-zero values enable ortp's adaptive jitter compensation" int typestr="milliseconds" default="400" no
index fd9a9a1171a9d1c0dac5003964492ed9f4edc5b1..aabbb7da09abf953457dfb4915f593eb0f0a6612 100644 (file)
@@ -103,9 +103,11 @@ static void ortp_init_session(struct ortp_target *ot)
        if (!ot->session)
                return;
        s = ot->session;
-       rtp_session_enable_adaptive_jitter_compensation(ot->session, TRUE);
-       rtp_session_set_jitter_compensation(ot->session, 40);
-//     rtp_session_set_jitter_compensation(ot->session, 100);
+       if (conf.ortp_jitter_compensation_arg) {
+               rtp_session_enable_adaptive_jitter_compensation(ot->session, TRUE);
+               rtp_session_set_jitter_compensation(ot->session,
+                       conf.ortp_jitter_compensation_arg);
+       }
        /* always successful */
        rtp_session_set_send_payload_type(s, PAYLOAD_AUDIO_CONTINUOUS);
        ret = rtp_session_set_remote_addr(s, TARGET_ADDR(ot), ot->port);
@@ -161,8 +163,10 @@ static void ortp_send(struct audio_format *af, long unsigned current_chunk,
                                continue;
                }
                if (!ot->chunk_ts)
-                       ot->chunk_ts = rtp_session_time_to_ts(ot->session, tv2ms(&af->chunk_tv));
-               PARA_DEBUG_LOG("len: %d, ts: %lu, ts: %d\n", len, ot->chunk_ts * chunks_sent, ot->chunk_ts);
+                       ot->chunk_ts = rtp_session_time_to_ts(ot->session,
+                               tv2ms(&af->chunk_tv));
+//             PARA_DEBUG_LOG("len: %d, ts: %lu, ts: %d\n",
+//                     len, ot->chunk_ts * chunks_sent, ot->chunk_ts);
                ot->streaming = 1;
        }
        if (list_empty(&targets))
index 0cf4bb625bcf56b4bf53c19558044c4137252055..41f9ea4ede497bb9850e71a7d0bb11d2e6a33736 100644 (file)
@@ -34,10 +34,11 @@ option "http_no_autostart" - "do not open tcp port on server startup" flag off
 option "http_max_clients" - "maximal simultaneous connections, non-positive value means unlimited" int typestr="number" default="-1" no
 
 section "dccp sender"
-option "dccp_port" - "port for http streaming" int typestr="portnumber" default="5001" no
+option "dccp_port" - "port for dccp streaming" int typestr="portnumber" default="5001" no
 
 section "ortp sender"
 option "ortp_target" - "Add given host/port to the list of targets. This option can be given multiple times. Example: '224.0.1.38:1500' instructs the ortp sender to send to udp port 1500 on host 224.0.1.38 (unassigned ip in the Local Network Control Block 224.0.0/24). This is useful for LAN-streaming." string typestr="a.b.c.d:p" no multiple
 option "ortp_no_autostart" - "do not start to send automatically" flag off
 option "ortp_default_port" - "default udp port if not specified" int typestr="portnumber" default="1500" no
 option "ortp_header_interval" H "time between extra header sends" int typestr="milliseconds" default="2000" no
+option "ortp_jitter_compensation" j "non-zero values enable ortp's adaptive jitter compensation" int typestr="milliseconds" default="400" no