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

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


Everything I know about SdpContents and subsidiary classes I have learned by
examining the SdpContents.hxx and SdpContents.cxx files. In fact that is the
only source of information that I rely on for all of Resiprocate and DUM
functionality; I suggest you do to.

What I included in my original posting _was_ "snippit" code from various
parts of one of my projects.

As for distinguishing between classes and methods ... If you don't have a
solid grasp of basic C++ constructs Resiprocate is not the project for you
to use. Let me iterate that, you will not be successful if you don't: While
Resiprocate does not set out to use every quirk and corner of the language,
it is not a garden variety usage of the constructs available either.

As somebody else has mentioned, do not make direct email requests rather
send it to the listserver so the question/answer can benefit all.

Leon 

-----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