[Top][All Lists]

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

Re: [Linphone-developers] Not knowing the received payload type

From: Simon Morlat
Subject: Re: [Linphone-developers] Not knowing the received payload type
Date: Wed, 23 May 2007 13:19:30 +0200
User-agent: KMail/1.9.5


Yes this is possible by registering the payload_type-changed callback. It will 
be called just before receiving the first packet. the callback should look 
like this:
static void payload_type_changed(RtpSession *session, unsigned long data){
        int pt=rtp_session_get_recv_payload_type(stream->session); //get the 
payload type
        //take actions to define timestamp increment
and must be registered with rtp_session_signal_connect() (see online 

The prequisite for oRTP (and RFC3550) to work is that at least the clock_rate 
of the payload type is know for each payload type that it is possible to 
receive during a session.
To be clear: you must have a RtpProfile table indexing the payload type 
numbers with the payload type definition (at least the clock_rate) in your 
Then the incoming packets may start, continue and change with any payload type 
number provided that they are definined in the RtpProfile used by the 


Le mercredi 16 mai 2007 21:28, Nicholas J Humfrey a écrit :
> Hi,
> I am trying to write a client that can receive without knowing the
> incoming payload type in advance. Is there a way that this can be
> achieved? Once I have received the first packet I can work out the
> future timestamps to request...   I'm not using SIP/SDP so don't have
> a description of the payload I am looking for.
> Does anyone have any example code using rtp_session_recvm_with_ts() ?
> I am slightly confused by it returning lots of NULLs, when
> scheduled&blocking modes are enabled...
> I have been thinking that perhaps a 'raw' interface would be useful -
> that just returnes the first RTP packet received. I might look at
> making a patch if people think it would be useful.
> nick.
> _______________________________________________
> Linphone-developers mailing list
> address@hidden

reply via email to

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