[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Linphone-users] ortp
From: |
Simon Morlat |
Subject: |
Re: [Linphone-users] ortp |
Date: |
Mon, 21 Aug 2006 14:30:29 +0200 |
User-agent: |
KMail/1.9.3 |
Hi,
How did you compile your application ?
Take care of using the flags reported by `pkg-config --cflags ortp`
Simon
Le mardi 15 août 2006 20:56, Levente a écrit :
> Hi all,
>
>
> I'd like to use ortp to get a stream from a Panasonic IP camera. I have
> small problem here. The library segfaults when I first call the
> rtp_session_recv_with_ts () function. I initialize the stack with this
> code...
>
> int rtp_init(char *ip_adr, int local_port, RtpSession *session)
> {
> bool_t adapt=TRUE;
> int ret;
>
> ortp_init();
> ortp_scheduler_init();
>
> session=rtp_session_new(RTP_SESSION_RECVONLY);
> rtp_session_set_scheduling_mode(session,1);
> rtp_session_set_blocking_mode(session,1);
> ret=rtp_session_set_local_addr(session,ip_adr,local_port);
> if(ret!=0)
> {
> printf("ERRROR!!\n");
> exit(1);
> }
> rtp_session_enable_adaptive_jitter_compensation(session,adapt);
> rtp_session_set_jitter_compensation(session,40);
> rtp_session_set_payload_type(session,0);
> ret=rtp_session_signal_connect(session, "ssrc_changed",
> (RtpCallback)ssrc_cb, 0); if(ret!=0)
> {
> printf("ERRROR!!\n");
> exit(1);
> }
> ret=rtp_session_signal_connect(session, "ssrc_changed",
> (RtpCallback)rtp_session_reset, 0); if(ret!=0)
> {
> printf("ERRROR!!\n");
> exit(1);
> }
> return 0;
> }
>
>
> Debugging my code with gdb, I get this.
>
> (gdb) run
> Starting program: /home/leva/xperts/SONY_MPEG_DRIVER/sony_mp4_drv -p 8000
> -s 192.168.7.113 -d 192.168.7.20 -o 8000 -i 1 [Thread debugging using
> libthread_db enabled]
> [New Thread -1211464000 (LWP 4928)]
> [New Thread -1211466832 (LWP 4931)]
> ortp-warning-Error receiving RTP packet: Socket operation on non-socket.
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1211464000 (LWP 4928)]
> getq (q=0xbfd09c98) at str_utils.c:167
> 167 q->_q_stopper.b_next=tmp->b_next;
> Current language: auto; currently c
> (gdb) where
> #0 getq (q=0xbfd09c98) at str_utils.c:167
> #1 0xb7eda466 in rtp_session_recvm_with_ts (session=0xbfd099f0, user_ts=0)
> at rtpsession.c:886 #2 0xb7eda831 in rtp_session_recv_with_ts
> (session=0xbfd099f0, buffer=0xbfd09950 "", len=160, time=0,
> have_more=0xbfd0994c) at rtpsession.c:1091 #3 0x08049843 in main
> (argc=-1076848144, argv=0xbfd0a854) at main.cpp:239 (gdb)
>
> Any thoughts where I go wrong?
>
>
>
> _______________________________________________
> Linphone-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/linphone-users