rtspstack
Class RtspSdp


class RtspSdp


Constructor Summary
RtspSdp()
          The default C'tor.
RtspSdp(const Data & contentData)
          get the contentData (msgBody) from a RtspMsg RtspSdp constructor will decode it and check it if valid RtspSdp provides get functons for application to read the sdp info This can be used to decode the SDP in ANNOUNCE

Method Summary
 voidaddAttribute(const char * attribute, const char * value)
          for the session level attribute
 voidaddMediaAttribute(const char * attribute, const char * value)
          for the media level attribute
 voidaddMediaFormat(const int payloadType)
           
 voidaddRtpmap(const int payloadType, const Data & encodeName, const int cloackRate)
          add one rtpmap and add associate Format in the SdpMedia
 voiddecode(const Data & contentData)
           
 Dataencode()
           
 DatagetAttributeValue(const char * attribute)
          get session level attribute
 DatagetConnAddress()
          The c= addr for unicast TODO multicast
 DatagetMediaAttributeValue(const char * attribute)
          get media level attribute
 DatagetMediaConnAddress()
           
 vector < int > *getMediaFormatList()
          get format list
 intgetMediaPort()
          Following get functions are getting the info for *first* SdpMedia If you want to get more than one SdpMedeia, you need to use getSdpSession to get the list of SdpMedia
 DatagetOwnerAddress()
          The o= addr
 vector < SdpRtpMapAttribute* > *getRtpmapList()
          get rtpmap list
 Sptr< SdpSession >getSdpSession()
           
 DatagetSessionName()
           
 DatagetUserName()
           
 boolisValid()
           
 voidsetConnAddress(const Data & connAddr)
          The c= addr for unicast TODO for multicast
 voidsetMediaConnAddress(const Data & connAddr)
           
 voidsetMediaPort(int port)
          Following set functions are setting data for the *first* SdpMedia it creates a SdpMedia if there is none If you want to add more than one SdpMedeia, you need to create SdpMedia by yourself and use getSdpSession to add onto it
 voidsetOwnerAddress(const Data & ownerAddr)
          The o= addr
 voidsetSessionName(const Data & sessionName)
           
 voidsetUserName(const Data & userName)
           

Constructor Detail

RtspSdp

public RtspSdp()
The default C'tor. Need to use set functions to fill info RtspSdp provides encode() to form a SDP Data. This can be used to creating SDP on the fly, for DESCRIBE response

RtspSdp

public RtspSdp(const Data & contentData)
get the contentData (msgBody) from a RtspMsg RtspSdp constructor will decode it and check it if valid RtspSdp provides get functons for application to read the sdp info This can be used to decode the SDP in ANNOUNCE
Method Detail

addAttribute

public void addAttribute(const char * attribute, const char * value)
for the session level attribute

addMediaAttribute

public void addMediaAttribute(const char * attribute, const char * value)
for the media level attribute

addMediaFormat

public void addMediaFormat(const int payloadType)

addRtpmap

public void addRtpmap(const int payloadType, const Data & encodeName, const int cloackRate)
add one rtpmap and add associate Format in the SdpMedia

decode

public void decode(const Data & contentData)

encode

public Data encode()

getAttributeValue

public Data getAttributeValue(const char * attribute)
get session level attribute

getConnAddress

public Data getConnAddress()
The c= addr for unicast TODO multicast

getMediaAttributeValue

public Data getMediaAttributeValue(const char * attribute)
get media level attribute

getMediaConnAddress

public Data getMediaConnAddress()

getMediaFormatList

public vector < int > * getMediaFormatList()
get format list

getMediaPort

public int getMediaPort()
Following get functions are getting the info for *first* SdpMedia If you want to get more than one SdpMedeia, you need to use getSdpSession to get the list of SdpMedia

getOwnerAddress

public Data getOwnerAddress()
The o= addr

getRtpmapList

public vector < SdpRtpMapAttribute* > * getRtpmapList()
get rtpmap list

getSdpSession

public Sptr< SdpSession > getSdpSession()

getSessionName

public Data getSessionName()

getUserName

public Data getUserName()

isValid

public bool isValid()

setConnAddress

public void setConnAddress(const Data & connAddr)
The c= addr for unicast TODO for multicast

setMediaConnAddress

public void setMediaConnAddress(const Data & connAddr)

setMediaPort

public void setMediaPort(int port)
Following set functions are setting data for the *first* SdpMedia it creates a SdpMedia if there is none If you want to add more than one SdpMedeia, you need to create SdpMedia by yourself and use getSdpSession to add onto it

setOwnerAddress

public void setOwnerAddress(const Data & ownerAddr)
The o= addr

setSessionName

public void setSessionName(const Data & sessionName)

setUserName

public void setUserName(const Data & userName)