< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

RE: [reSIProcate] SDP Contents not getting created.....


Also, I see my mail client has eliminated the newlines in my original
snippet. Here it is again hopefully with newlines.

UInt64 sessionId = time (0); // note that this really should be an NTP 

time value SdpContents::Session::Origin sdpOrigin ("-", sessionId,
sessionId, SdpContents::IP4, <ip-address>);

SdpContents::Session sdpSession(0, sdpOrigin , "-");

sdpSession.connection () = SdpContents::Session::Connection
(SdpContents::IP4, <ip-address>);

sdpSession.addTime (SdpContents::Session::Time (0, 0));

SdpContents::Session::Medium sdpMedium ("audio", 10000, 0, "RTP/AVP");

sdpMedium.addCodec (SdpContents::Session::Codec::ULaw_8000);

sdpSession.addMedium (sdpMedium);

SdpContents sdpOffer;

sdpOffer.session () = sdpSession;

-----Original Message-----
From: John Draper [mailto:jdcrunchman@xxxxxxxxxxxxxxxx] 
Sent: Saturday, December 10, 2005 2:57 PM
To: Leon Thrane
Subject: Re: [reSIProcate] SDP Contents not getting created.....

Leon Thrane wrote:

>Instead of creating your SDP contents through ASCII manipulation use 
>the classes and methods defined in SdpContents.hxx.
>For example to prepare a minimal SDP offer:
>
>UInt64 sessionId = time (0); // note that this really should be an NTP 
>time value SdpContents::Session::Origin sdpOrigin ("-", sessionId, 
>sessionId, SdpContents::IP4, <ip-address>); SdpContents::Session 
>sdpSession(0, sdpOrigin , "-"); sdpSession.connection () = 
>SdpContents::Session::Connection (SdpContents::IP4, <ip-address>); 
>sdpSession.addTime (SdpContents::Session::Time (0, 0)); 
>SdpContents::Session::Medium sdpMedium ("audio", 10000, 0, "RTP/AVP"); 
>sdpMedium.addCodec (SdpContents::Session::Codec::ULaw_8000);
>sdpSession.addMedium (sdpMedium);
>SdpContents sdpOffer;
>sdpOffer.session () = sdpSession;
>  
>
Hmmm!  Where can I find documentation that describes this.  It's NOT in the
WIKI unless it's been added just recently.

>DISCLAIMER: Note that this is written "freehand" and may/may not 
>compile (or even do the right thing) and really is to serve as an 
>example of manipulating SDP using the classes/methods defined in 
>SdpContents.hxx rather than working code. If you don't understand the 
>parameters that go into the various functions and constructors above 
>you _have_ to read RFC2327 - I can not act as a tutor for SDP in 
>general. In other words, I have no inclination to "support" the above.
>  
>
OK,  but do you know of any example code that actually works?  I can't find
any
in the "test" directories.   Do you happen to have a bit of code 
snippits laying around
in some test project somewhere that shows this?

Some of these appear to be class methods,  others are instances of classes.
How do I tell which is which?

John