|
From: | Kannaiyan Natesan |
Subject: | [Linphone-users] Session Problem with oRTP - |
Date: | Fri, 21 Jul 2006 11:59:35 +0800 |
I have written to read and write rtp. For every new
session I just create a new session and receive the rtp. It looks the receiving
rtp is having a problem and I could not hear the sound and sometimes
choppy.
Here is the code I use,
When application starts,
ortp_init();
ortp_scheduler_init(); For each new session:
rts = wts =
0;
audiosession=rtp_session_new(RTP_SESSION_SENDRECV); rtp_session_set_scheduling_mode(audiosession,1); rtp_session_set_blocking_mode(audiosession,1); rtp_session_set_local_addr(audiosession,"0.0.0.0",7078); rtp_session_enable_adaptive_jitter_compensation(audiosession,TRUE); rtp_session_set_jitter_compensation(audiosession,40); rtp_session_set_remote_addr(audiosession,"192.168.1.199",7078); rtp_session_set_payload_type(audiosession,0); (IP address, i'm just testing with a single machine)
During receiving and sending:
rts=0,wts=0; // intialistion
rts +=80;
rtp_session_recv_with_ts(audiosession,buf,80,rts,&have_more);
wrts+=80; rtp_session_send_with_ts(audiosession,buf,len,wts);
(Sending and receiving are independent threads)
When the session Ends:
rtp_session_destroy(audiosession);
In the end of application:
ortp_exit();
I need to kill the app and restart it again to proper correctly.
Can you please help me what is the problem with the above code.
Am I missing anything, why I need to restart everytime to get it to work
correctly?
Regards,
Kannaiyan
|
[Prev in Thread] | Current Thread | [Next in Thread] |