|
From: | Iban Lopetegi Zinkunegi |
Subject: | RE: [Linphone-users] ortp issues |
Date: | Wed, 17 Feb 2010 17:16:03 +0000 |
Answering myself, just in case somebody comes up with the same question... ortp_init() should only be called once in your program, independently of how many threads you have. Simply put it in the main thread and it will do. ortp_scheduling() is independent of each session. If you have a receiveonly session and a sendonly session you need to set per each independently. if you have receivesend session the scheduling will be apply for both. I am still not sure how to deal with the sequence number. All i have so far is the next function, but still i get repeatitive sequence numbers. int my_rtp_session_recv_with_ts_v2 (int * cseq_tmp,RtpSession * session, uint8_t * buffer, int len, uint32_t ts, int * have_more){ mblk_t *mp=NULL; int plen,blen=0; *have_more=0; rtp_header_t *hdr; while(1){ if (session->pending){ mp=session->pending; session->pending=NULL; }else { mp=rtp_session_recvm_with_ts(session,ts); if (mp!=NULL) { hdr=(rtp_header_t*)mp->b_rptr; rtp_get_payload(mp,&mp->b_rptr); } } if (mp){ //hdr=(rtp_header_t*)mp->b_rptr; *cseq_tmp=hdr->seq_number; if (DEBUG)printf("csq%d",*cseq_tmp); plen=mp->b_wptr-mp->b_rptr; if (plen<=len){ memcpy(buffer,mp->b_rptr,plen); buffer+=plen; blen+=plen; len-=plen; freemsg(mp); mp=NULL; }else{ memcpy(buffer,mp->b_rptr,len); mp->b_rptr+=len; buffer+=len; blen+=len; len=0; session->pending=mp; *have_more=1; break; } }else break; } return blen; } As said this has outputs where seq number is repeated. So i still not sure how to deal with that. Any ideas? Thanks From: address@hidden To: address@hidden Subject: RE: [Linphone-users] ortp issues Date: Mon, 15 Feb 2010 19:15:20 +0000In Hi all, I am using rtp_session_recv_with_ts () and rtp_session_send_with_ts(). I would like to know which cseq has been sent and which cseq value has been received. I have used rtp_session_get_seq_number() , however, it either gives repetitive numbers or 0. I am using ortp 0.16.1 Thanks Lopetaz From: address@hidden To: address@hidden Date: Mon, 15 Feb 2010 15:45:28 +0000 Subject: [Linphone-users] ortp issues Hi all, Firstly I am not sure if posting an oRtp based question is right to be asked here. I am trying to user oRtp libraries for a gateway to a mobile network. For several reasons this is not working. Here is my main questions: If I have one thread for a ortp sendonly and another for ortp receiveonly, should i have ortp_init(), and ortp_schedulling() for each of this threads or one general one? thanks lopetaz Elige un juego de Messenger. Reta a un amigo. ¡Pruébalo ya! Navega con el navegador más seguro de todos. ¡Descárgatelo ya! Elige un juego de Messenger. Reta a un amigo. ¡Pruébalo ya! |
[Prev in Thread] | Current Thread | [Next in Thread] |