support for setting the URI of a session in SDP

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@512 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 18 years ago
parent 0063085c39
commit b5c6354ae8

@ -196,8 +196,11 @@ int AmSdp::genResponse(const string& localip, int localport,
out_buf =
"v=0\r\n"
"o=username 0 0 IN " + l_ip + "\r\n"
"s=session\r\n"
"o=- 0 0 IN " + l_ip + "\r\n"
"s=session\r\n";
if (!uri.empty())
out_buf+="u="+uri+"\r\n";
out_buf+=
"c=IN " + l_ip + "\r\n"
"t=0 0\r\n"
"m=audio " + int2str(localport) + " RTP/AVP";
@ -261,8 +264,11 @@ int AmSdp::genRequest(const string& localip,int localport, string& out_buf)
out_buf =
"v=0\r\n"
"o=username 0 0 IN " + l_ip + "\r\n"
"s=session\r\n"
"o=- 0 0 IN " + l_ip + "\r\n"
"s=session\r\n";
if (!uri.empty())
out_buf+="u="+uri+"\r\n";
out_buf+=
"c=IN " + l_ip + "\r\n"
"t=0 0\r\n"
"m=audio " + int2str(localport) + " RTP/AVP ";

@ -149,6 +149,7 @@ public:
unsigned int version; // v=
SdpOrigin origin; // o=
string sessionName; // s=
string uri; // u=
SdpConnection conn; // c=
vector<SdpMedia> media; // m= ... [a=rtpmap:...]+

@ -235,6 +235,12 @@ const string& AmSession::getLocalTag() const
return dlg.local_tag;
}
void AmSession::setUri(const string& uri)
{
DBG("AmSession::setUri(%s)\n",uri.c_str());
sdp.uri = uri;
}
void AmSession::setLocalTag(const string& tag)
{
DBG("AmSession::setLocalTag(%s)\n",tag.c_str());

@ -285,9 +285,13 @@ public:
/** Gets the Session's local tag */
const string& getLocalTag() const;
/** Sets the Session's local tag */
void setLocalTag(const string& tag);
/** Sets the URI for the session */
void setUri(const string& uri);
/** Gets the current RTP payload */
const vector<SdpPayload*>& getPayloads();

@ -1,5 +1,7 @@
Changelog for SEMS
- support for setting the URI of a session in SDP
- early media receiving example
- support for posting events into conferences

Loading…
Cancel
Save