linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] oRTP MPEG4 video streaming


From: Simon Morlat
Subject: Re: [Linphone-developers] oRTP MPEG4 video streaming
Date: Fri, 17 Nov 2006 16:21:06 +0100
User-agent: KMail/1.9.5

First a few a questions:
- what is your linux distribution, machine, processor
- how did you get oRTP: from source, from rpm, what compiler was used ?
- which version of oRTP ?

Simon



Le mercredi 15 novembre 2006 11:45, Francesco Andrisani a écrit :
> I see the warning for each packets.
> With ethereal i see [Payload :Unknown (96)].
> You suggest to recompile oRTP with another otions?
>
> Regards
>
>
>
> -----Original Message-----
> From: Simon Morlat [mailto:address@hidden
> Sent: Wed 11/15/2006 11:42 AM
> To: address@hidden
> Cc: Francesco Andrisani; address@hidden
> Subject: Re: [Linphone-developers] oRTP MPEG4 video streaming
>
> Hello,
>
> Your code seems correct. Can you modify the code in rtpsession.c so that we
> can see what is the payload type of the incoming stream :
> in rtp_session_recv_with_ts:
>
> if (payload==NULL){
>               ortp_warning("rtp_session_recv_with_ts: unable to recv an 
> unsupported
> payload (%i)",session->recv_pt);
>               if (mp!=NULL) freemsg(mp);
>               return -1;
>       }
>
> Does the warning happens only once, or for every packet ?
> I see two problems:
> - the camera actually sends a RTP packet with a payload type different from
> 96 - oRTP has been compiled with bad endianness option (it would be a bug),
> then decoding of RTP header is wrong.
>
> Simon
>
> Le lundi 13 novembre 2006 17:37, Francesco Andrisani a écrit :
> > I've added a new profile to my application, but i've only a warning now.
> >
> > RTP: Succesfully setup remote peer to 192.168.198.15 port 50208
> > ortp-warning-rtp_session_recv_with_ts: unable to recv an unsupported
> > payload.
> >
> > My code (a piece) is:
> >
> > ortp_init();
> >    ortp_scheduler_init();
> >
> >    recvsession=rtp_session_new(RTP_SESSION_RECVONLY);
> >
> >    if (recvsession  == NULL)
> >    {
> >         printf("RTP FATAL: Unable to allocate new session.");
> >         return -1;
> >    }
> >    rtp_session_set_scheduling_mode (recvsession, 1);
> >
> >    rtp_session_set_blocking_mode (recvsession, 0);
> >
> >
> >     m_videoMpeg4 = rtp_profile_new("AV profile + MPEG4 Video");
> >     rtp_profile_set_payload(m_videoMpeg4,0,&payload_type_pcmu8000);
> >     rtp_profile_set_payload(m_videoMpeg4,1,&payload_type_lpc1016);
> >     rtp_profile_set_payload(m_videoMpeg4,3,&payload_type_gsm);
> >     rtp_profile_set_payload(m_videoMpeg4,4,&payload_type_g7231);
> >     rtp_profile_set_payload(m_videoMpeg4,8,&payload_type_pcma8000);
> >     rtp_profile_set_payload(m_videoMpeg4,18,&payload_type_g729);
> >     rtp_profile_set_payload(m_videoMpeg4,31,&payload_type_h261);
> >     rtp_profile_set_payload(m_videoMpeg4,32,&payload_type_mpv);
> >     rtp_profile_set_payload(m_videoMpeg4,96,&payload_type_mp4v);
> >
> >     rtp_session_set_profile(recvsession, m_videoMpeg4);
> >
> >
> >
> >    rtp_session_set_jitter_compensation (recvsession, 60);
> >
> >    ret = rtp_session_set_local_addr (
> >                         recvsession,
> >                         "192.168.195.16",
> >                         20000
> >                         );
> >    ret = rtp_session_set_remote_addr (
> >                         recvsession,
> >                         "192.168.198.13",
> >                         atoi(serverPort1)
> >                         );
> >    if (ret != 0)
> >    {
> >         printf("\nRTP: ERROR: Unable to set peer to 192.168.198.15 port
> > %d",atoi(serverPort1)); return -1;
> >    }
> >    else
> >         printf("\nRTP: Succesfully setup remote peer to 192.168.198.15
> > port %d",atoi(serverPort1)); data_from_rtp = (char *) malloc (1500);
> >    have_more = 1;
> >
> >    while (have_more)
> >    {
> >         printf("\nin while");
> >         recvd_bytes = rtp_session_recv_with_ts (
> >                                 recvsession,
> >                                 data_from_rtp,
> >                                 1500,
> >                                 timestamp,
> >                                 &have_more);
> >         printf("\nBytes letti: %d",recvd_bytes);
> >
> >                 if (have_more != 0)
> >                         printf("\nRTP Warning, have more !");
> >                  else
> >                         timestamp += recvd_bytes;
> >
> >                 if (recvd_bytes > 0)
> >                 {
> >                         printf("\nWriting to file!");
> >                         n =
> > fwrite(data_from_rtp,sizeof(data_from_rtp),n,outfile); printf("\nBytes
> > scritti: %d",n);
> >                 }
> >    }
> >
> >   fclose(outfile);
> >   free (data_from_rtp);
> >
> > Is my code wrong?
> >
> > Thanks
> >
> >
> >
> > -----Original Message-----
> > From: Emmanuel Buu [mailto:address@hidden
> > Sent: Mon 11/13/2006 5:23 PM
> > To: Francesco Andrisani; address@hidden
> > Subject: Re: [Linphone-developers] oRTP MPEG4 video streaming
> >
> > Ah, I ran into the same issue with another Cam. You have to create a new
> > profile:
> >
> >     m_videoMpeg4 = rtp_profile_new("AV profile + MPEG4 Video");
> >     rtp_profile_set_payload(m_videoMpeg4,0,&payload_type_pcmu8000);
> >     rtp_profile_set_payload(m_videoMpeg4,1,&payload_type_lpc1016);
> >     rtp_profile_set_payload(m_videoMpeg4,3,&payload_type_gsm);
> >     rtp_profile_set_payload(m_videoMpeg4,4,&payload_type_g7231);
> >     rtp_profile_set_payload(m_videoMpeg4,8,&payload_type_pcma8000);
> >     rtp_profile_set_payload(m_videoMpeg4,18,&payload_type_g729);
> >     rtp_profile_set_payload(m_videoMpeg4,31,&payload_type_h261);
> >     rtp_profile_set_payload(m_videoMpeg4,32,&payload_type_mpv);
> >     rtp_profile_set_payload(m_videoMpeg4,96,&payload_type_mp4v);
> >
> > Beware, the payload type you specify in the last line should match the
> > payload type actually sent by your cam (use a Etheral capture to check).
> >
> > Then assign this profile to your session :
> >
> >     rtp_session_set_profile(s, m_videoMpeg4);
> >
> >
> > On Mon, 13 Nov 2006 17:07:13 +0100, Francesco Andrisani wrote
> >
> > > Hi all,
> > >  i've a problem when i try to receive a rtp flow fron an AXIS camera.
> > >  I use oRTP and in output of my code i have the follow error:
> > >
> > >  RTP: Succesfully setup remote peer to 192.168.198.15 port 50196
> > >  RTP: Set payload type to 2
> > >
> > >  ortp-warning-rtp_session_ts_to_t: use of unsupported payload type .
> > >  ortp-warning-rtp_session_recv_with_ts: unable to recv an
> > > unsupported payload.
> > >
> > >  Read Bytes: -1
> > >
> > >  I don't know if i set wrong payload type.
> > >
> > >  Regards




reply via email to

[Prev in Thread] Current Thread [Next in Thread]