Development & SDP header

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Development & SDP header

Ghaith ALKAYYEM

Hello,

I'm trying to investigate the media type inside the SDP header, when I  
had a look at the structure of SDP inside sdp.h, I found that:
sdp_info contains a list of sessions and each session is constituted  
of more than one stream which contains the media header field.
So, how can I reach the real type of media?
Thank you very much.

Regards.


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Development & SDP header

Andrei Dragus
Hi,

Well an SDP header can contain multiple sessions and each session can contain multiple streams ( video,voice, etc).

Example of an SDP containing a single session called "SDP Seminar" and containing 3 media streams ( # are comments, they are not in the RFC ).

        v=0
        o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4
        s=SDP Seminar  # session name
        i=A Seminar on the session description protocol
        u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps
        e=[hidden email] (Mark Handley)
        c=IN IP4 224.2.17.12/127

        t=2873397496 2873404696
        a=recvonly
        m=audio 49170 RTP/AVP 0    #first media called audio
        m=video 51372 RTP/AVP 31   #second media called video
        m=application 32416 udp wb #third media called application
        a=orient:portrait

If you know which session you want to look at you can use the session name,
and each stream has a name but in general it is quite difficult to distinguish amongst them.


From sdp_stream_cell in sdp.h:

        str media; //represents media name
        str port;
        str transport;
        str payloads; //represents the list of codecs
        int payloads_num;    

        struct sdp_payload_attr *payload_attr; //represents the lists of a= lines

When I wrote code to modify the SDP header I simply modified all streams in all sessions because it was to difficult to distinguish amongst them.

The code is in modules/textops/codecs.c if you find it useful.


Andrei.


>
> Hello,
>
> I'm trying to investigate the media type inside the SDP
> header, when IĀ 
> had a look at the structure of SDP inside sdp.h, I found
> that:
> sdp_info contains a list of sessions and each session is
> constitutedĀ 
> of more than one stream which contains the media header
> field.
> So, how can I reach the real type of media?
> Thank you very much.
>
> Regards.
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


     

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users