[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Linphone-developers] oRTP test program
From: |
Simon MORLAT |
Subject: |
Re: [Linphone-developers] oRTP test program |
Date: |
Wed, 19 Nov 2003 09:07:34 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031105 Thunderbird/0.3 |
Hi,
When you want to use blocking mode, you need to call ortp_init_scheduler()
and call rtp_session_set_scheduled_mode(rtp_session,1); before.
See rtprecv.c for a little test program.
I agree that it is not very clear in the documentation.
Simon
Hi!
I have written a simple test program for oRTP but I can't make it work. When I
call the function tp_session_recv_with_ts() it does not read any data (rlen=0)
and nor does it block. What have I done wrong?
The program looks like this:
*********************************************************
RtpSession *rtp_session = NULL;
int have_more = 0;
int wlen = 0;
int rlen = 0;
char wbuffer[100];
char rbuffer[100];
strcpy(wbuffer, argv[1]); // a text message
rbuffer[0] = '\0';
ortp_init();
//ortp_set_debug_file(NULL, stdout);
rtp_session = rtp_session_new(RTP_SESSION_SENDRECV);
rtp_session_set_blocking_mode(rtp_session, 1);
rtp_session_set_local_addr(rtp_session, "127.0.0.1", 4000);
rtp_session_set_remote_addr(rtp_session, "127.0.0.1", 4000);
wlen = rtp_session_send_with_ts(rtp_session, wbuffer, strlen(wbuffer)+1, 0);
rlen = rtp_session_recv_with_ts(rtp_session, rbuffer, sizeof(rbuffer), 0,
&have_more);
ortp_exit();
*****************************************************************************
/Marcus
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
_______________________________________________
Linphone-developers mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/linphone-developers