sipxtacklib
Version 3.3
|
Container for MIME type application/sdp. More...
#include <SdpBody.h>
Public Types | |
enum | SessionDirection { Unknown, Inactive, SendOnly, RecvOnly, SendRecv } |
Public Types inherited from HttpBody | |
enum | BodyClassTypes { UNKNOWN_BODY_CLASS = 0, HTTP_BODY_CLASS, SMIME_BODY_CLASS, SDP_BODY_CLASS, PIDF_BODY_CLASS, DIALOG_EVENT_BODY_CLASS } |
Public Member Functions | |
====================== Constructors and Destructors | |
SdpBody (const char *bytes=NULL, int byteCount=-1) | |
Construct from an existing SDP message value, or create an empty body. More... | |
SdpBody (const SdpBody &rSdpBody) | |
Copy constructor. More... | |
virtual | ~SdpBody () |
Destructor. More... | |
====================== Message Serialization Interfaces | |
virtual int | getLength () const |
Get the string length this body would be if serialized. More... | |
virtual void | getBytes (const char **bytes, int *length) const |
Get the serialized string representation of this SDP message. More... | |
virtual void | getBytes (UtlString *bytes, int *length) const |
Get the serialized string representation of this SDP message. More... | |
====================== Header Setting Interfaces | |
These methods set the standard header fields (the ones not in a media set) | |
void | setStandardHeaderFields (const char *sessionName, const char *emailAddress, const char *phoneNumber, const char *originatorAddress) |
void | setSessionNameField (const char *sessionName) |
void | setOriginator (const char *userId, int sessionId, int sessionVersion, const char *address) |
void | setEmailAddressField (const char *emailAddress) |
void | setPhoneNumberField (const char *phoneNumber) |
void | addEpochTime (unsigned long epochStartTime, unsigned long epochEndTime=0) |
void | addNtpTime (unsigned long ntpStartTime, unsigned long ntpEndTime=0) |
UtlBoolean | getMediaStreamDirection (int mediaIndex, SessionDirection &direction) const |
void | setRtpTcpRole (RtpTcpRoles role) |
UtlString | getRtpTcpRole () const |
====================== Field Reading Interfaces | |
Use these interfaces to get field values rather than the generic interfaces below. | |
int | getMediaSetCount () const |
Get the number of media description sets. More... | |
int | findMediaType (const char *mediaType, int startMediaIndex=0) const |
Get the index to the next media set of the given type. More... | |
UtlBoolean | getMediaData (int mediaIndex, UtlString *mediaType, int *mediaPort, int *mediaPortPairs, UtlString *mediaTransportType, int maxPayloadTypes, int *numPayloadTypes, int payloadTypes[]) const |
Read a full media line. More... | |
const bool | isTransportAvailable (const OsSocket::IpProtocolSocketType protocol, const SIPX_MEDIA_TYPE mediaType) const |
Inspects whether the given transport type and media type combination is specified as an m-line in the sdp. More... | |
UtlBoolean | getMediaNetworkType (int mediaIndex, UtlString *networkType) const |
Read whether the media network type is IP4 or IP6. More... | |
UtlBoolean | getMediaAddress (int mediaIndex, UtlString *address) const |
Get IP address for the indicated media stream. More... | |
UtlBoolean | getMediaType (int mediaIndex, UtlString *mediaType) const |
Get the media type for the indicated media stream. More... | |
UtlBoolean | getMediaPort (int mediaIndex, int *port) const |
Get the port number for the indicated media stream. More... | |
UtlBoolean | getMediaRtcpPort (int mediaIndex, int *port) const |
UtlBoolean | getMediaPortCount (int mediaIndex, int *numPorts) const |
Get the number of port pairs in media stream. More... | |
UtlBoolean | getMediaProtocol (int mediaIndex, UtlString *transportProtocol) const |
Get the transport protocol for the indicated media stream. More... | |
UtlBoolean | getMediaPayloadType (int mediaIndex, int maxTypes, int *numTypes, int payloadTypes[]) const |
Get the payload types for the indicated media stream. More... | |
UtlBoolean | getPtime (int mediaIndex, int &ptime) const |
Get the ptime field for the given media set. More... | |
UtlBoolean | getMediaSubfield (int mediaIndex, int subfieldIndex, UtlString *subField) const |
Media field accessor utility. More... | |
UtlBoolean | getPayloadRtpMap (int mediaIndex, int payloadType, UtlString &mimeSubtype, int &sampleRate, int &numChannels) const |
Get the subfields of the rtpmap field. More... | |
UtlBoolean | getPayloadFormat (int mediaIndex, int payloadType, UtlString &fmtp) const |
UtlBoolean | getSrtpCryptoField (int mediaIndex, int index, SdpSrtpParameters ¶ms) const |
See SdpCodec for utilities to parse the fmtp field (e.g. More... | |
UtlBoolean | getControlTrackId (int mediaLineIndex, UtlString &trackId) const |
UtlBoolean | getFramerateField (int mediaIndex, int &videoFramerate) const |
UtlBoolean | getBandwidthField (int &bandwidth) const |
Find the "a" record containing an rtpmap for the given payload type id, parse it and return the parameters for it. More... | |
void | getBestAudioCodecs (SdpCodecList &localRtpCodecs, int &numCodecsInCommon, SdpCodec **&commonCodecsForEncoder, UtlString &rtpAddress, int &rtpPort, int &rtcpPort, int &videoRtpPort, int &videoRtcpPort, SdpSrtpParameters &localSrtpParams, SdpSrtpParameters &matchingSrtpParams, int localBandwidth, int &matchingBandwidth, int localVideoFramerate, int &matchingVideoFramerate) const |
Find the send and receive codecs from the rtpCodecs array which are compatible with this SdpBody. More... | |
void | getCodecsInCommon (int audioMediaSetIndex, int videoMediaSetIndex, int audioPayloadIdCount, int videoPayloadIdCount, int audioPayloadTypes[], int videoPayloadTypes[], int videoRtpPort, SdpCodecList &localRtpCodecs, int &numCodecsInCommon, SdpCodec *commonCodecsForEncoder[], SdpCodec *commonCodecsForDecoder[]) const |
For local capabilities, get remote media line and supported local codecs. More... | |
int | getCodecsInCommon (const SdpMediaLine &localMediaLine, int remoteMediaLineIndex, SdpMediaLine &remoteMediaLine, SdpCodecList &localDecodeCodecs) const |
UtlBoolean | getMediaLine (int remoteMediaLineIndex, SdpMediaLine &mediaLine, const SdpCodecList *codecFactory) const |
Assumes this SDP is the SDP offer and the localMediaLine is the capabilities for the offer. More... | |
void | addMediaLine (const SdpMediaLine &mediaLine, SdpBody &sdpBody) |
void | getEncryptionInCommon (SdpSrtpParameters &audioParams, SdpSrtpParameters &remoteParams, SdpSrtpParameters &commonAudioParms) const |
void | getBandwidthInCommon (int localBandwidth, int remoteBandwidth, int &commonBandwidth) const |
void | getVideoFramerateInCommon (int localVideoFramerate, int remoteVideoFramerate, int &commonVideoFramerate) const |
UtlBoolean | getCandidateAttribute (int mediaIndex, int candidateIndex, int &rCandidateId, UtlString &rTransportId, UtlString &rTransportType, uint64_t &rQvalue, UtlString &rCandidateIp, int &rCandidatePort) const |
Get the candidate attribute per draft-ietf-mmusic-ice-05. More... | |
UtlBoolean | getCandidateAttributes (const char *szMimeType, int nMaxAddresses, int candidateIds[], UtlString transportIds[], UtlString transportTypes[], uint64_t qvalues[], UtlString candidateIps[], int candidatePorts[], int &nActualAddresses) const |
UtlBoolean | getCandidateAttributes (int mediaIndex, int nMaxAddresses, int candidateIds[], UtlString transportIds[], UtlString transportTypes[], uint64_t qvalues[], UtlString candidateIps[], int candidatePorts[], int &nActualAddresses) const |
UtlBoolean | findValueInField (const char *pField, const char *pvalue) const |
Locates a specific value for an attribute field Used to locate sendonly and recvonly in case if hold and unhold INVITE messages. More... | |
Public Member Functions inherited from HttpBody | |
HttpBody (const char *bytes=NULL, int length=-1, const char *contentType=NULL) | |
HttpBody (const char *contentType) | |
HttpBody (const HttpBody &rHttpBody) | |
virtual | ~HttpBody () |
HttpBody & | operator= (const HttpBody &rhs) |
void | appendBodyPart (const HttpBody &body, const UtlDList ¶meters) |
Append a multipart body part to an existing multiparty body. More... | |
virtual const char * | getBytes () const |
UtlBoolean | getMultipartBytes (int partIndex, const char **bytes, int *length, int *start) const |
const MimeBodyPart * | getMultipart (int partIndex) const |
int | getMultipartCount () const |
BodyClassTypes | getClassType () const |
const char * | getMultipartBoundary () const |
Get the multipart boundary string. More... | |
const char * | getContentType () const |
Get the content type string. More... | |
UtlBoolean | isMultipart () const |
Protected Member Functions | |
void | parseBody (const char *bytes=NULL, int byteCount=-1) |
Parse an existing string into the internal representation. More... | |
====================== Generic SDP field accessors | |
It is better to use the more specific accessor methods above for the field type you need than to use these generic interfaces. These may be deprecated in the future. | |
int | getFieldCount () const |
Return the number of fields in the body. More... | |
UtlBoolean | getValue (int fieldIndex, UtlString *name, UtlString *value) const |
Return the name and value of the nth field in the body. More... | |
void | setValue (const char *name, const char *value) |
Set a specific field. More... | |
Friends | |
class | SdpBodyTest |
====================== Media Setting Interfaces | |
void | addCodecsOffer (int iNumAddresses, const UtlString mediaAddresses[], int rtpAudioPorts[], int rtcpAudioPorts[], int rtpVideoPorts[], int rtcpVideoPorts[], RTP_TRANSPORT transportTypes[], int numRtpCodecs, SdpCodec *rtpCodecs[], SdpSrtpParameters &srtpParams, int videoBandwidth, int videoFramerate, RTP_TRANSPORT transportOffering) |
Create a set of media codec and address entries. More... | |
void | addCodecsAnswer (int iNumAddresses, UtlString mediaAddresses[], int rtpAudioPorts[], int rtcpAudioPorts[], int rtpVideoPorts[], int rtcpVideoPorts[], RTP_TRANSPORT transportTypes[], int numRtpCodecs, SdpCodec *rtpCodecs[], SdpSrtpParameters &srtpParams, int videoBandwidth, int videoFramerate, const SdpBody *sdpRequest) |
Create a response to a set of media codec and address entries. More... | |
void | addMediaLinesAnswer (int numMediaLines, const SdpMediaLine *mediaLines[], const SdpBody &offer) |
void | addMediaData (const char *mediaType, int portNumber, int portPairCount, const char *mediaTransportType, int numPayloadTypes, int payloadType[]) |
Create a new media set for SDP message. More... | |
void | addCodecParameters (int numRtpCodecs, SdpCodec *rtpCodecs[], const char *szMimeType="audio") |
void | addConnectionAddress (const char *ipAddress) |
Set address. More... | |
void | addConnectionAddress (const char *networkType, const char *addressType, const char *ipAddress) |
void | setConnectionAddress (const char *ipAddress) |
Set address. More... | |
void | setConnectionAddress (const char *networkType, const char *addressType, const char *ipAddress) |
void | addRtpmap (int payloadType, const char *mimeSubtype, int sampleRate, int numChannels) |
void | addSrtpCryptoField (SdpSrtpParameters ¶ms) |
void | addFormatParameters (int payloadType, const char *formatParameters) |
void | addPtime (int pTime) |
Add a "a" field for the given ptime value in milliseconds. More... | |
void | addCandidateAttribute (int candidateId, const char *transportId, const char *transportType, uint64_t qValue, const char *candidateIp, int candidatePort) |
Set the candidate attribute per draft-ietf-mmusic-ice-05. More... | |
static void | buildMediaLine (SdpMediaLine::SdpMediaType mediaType, int totalBandwidth, int iNumAddresses, UtlString hostAddresses[], int rtpPorts[], int rtcpPorts[], int numRtpCodecs, SdpCodec *rtpCodecs[], SdpMediaLine &mediaLine) |
Additional Inherited Members | |
Static Public Member Functions inherited from HttpBody | |
static HttpBody * | copyBody (const HttpBody &sourceBody) |
Copy the source HttpBody using the correct derived class constructor. More... | |
static HttpBody * | createBody (const char *bodyBytes, int bodyBytesLength, const char *contentType, const char *contentEncoding) |
Pseudo body factory. More... | |
Protected Attributes inherited from HttpBody | |
int | bodyLength |
UtlString | mBody |
UtlString | mMultipartBoundary |
int | mBodyPartCount |
MimeBodyPart * | mpBodyParts [MAX_HTTP_BODY_PARTS] |
BodyClassTypes | mClassType |
Container for MIME type application/sdp.
This body type gets constructed when a HttpBody is a single part MIME or multipart MIME which has a part of type application/sdp. This object has methods to manipulate, iterate and construct SDP fields and media stream definitions
In the descriptions below:
enum SessionDirection |
SdpBody | ( | const char * | bytes = NULL , |
int | byteCount = -1 |
||
) |
Construct from an existing SDP message value, or create an empty body.
bytes | NULL creates an empty body |
byteCount | -1 means treat bytes as null terminated |
|
virtual |
Destructor.
|
virtual |
Get the string length this body would be if serialized.
Reimplemented from HttpBody.
|
virtual |
Get the serialized string representation of this SDP message.
bytes | buffer space where SDP is written, null terminated |
length | number of bytes written (not including the null terminator) |
Reimplemented from HttpBody.
|
virtual |
Get the serialized string representation of this SDP message.
bytes | message output |
length | number of bytes in message |
Reimplemented from HttpBody.
void setStandardHeaderFields | ( | const char * | sessionName, |
const char * | emailAddress, | ||
const char * | phoneNumber, | ||
const char * | originatorAddress | ||
) |
sessionName | any valid field string |
emailAddress | email address per rfc 2327 |
phoneNumber | phone number address per rfc 2327 |
originatorAddress | IP address |
void setSessionNameField | ( | const char * | sessionName | ) |
void setOriginator | ( | const char * | userId, |
int | sessionId, | ||
int | sessionVersion, | ||
const char * | address | ||
) |
userId | user id of caller or "-" if host does not support the idea of user logon |
sessionId | unique id for this call session |
sessionVersion | number to get incremented each time the SDP data gets modified for this call session |
address | IP address |
void setEmailAddressField | ( | const char * | emailAddress | ) |
void setPhoneNumberField | ( | const char * | phoneNumber | ) |
void addEpochTime | ( | unsigned long | epochStartTime, |
unsigned long | epochEndTime = 0 |
||
) |
void addNtpTime | ( | unsigned long | ntpStartTime, |
unsigned long | ntpEndTime = 0 |
||
) |
UtlBoolean getMediaStreamDirection | ( | int | mediaIndex, |
SessionDirection & | direction | ||
) | const |
mediaIndex | which media description set to read |
void setRtpTcpRole | ( | RtpTcpRoles | role | ) |
UtlString getRtpTcpRole | ( | ) | const |
void addCodecsOffer | ( | int | iNumAddresses, |
const UtlString | mediaAddresses[], | ||
int | rtpAudioPorts[], | ||
int | rtcpAudioPorts[], | ||
int | rtpVideoPorts[], | ||
int | rtcpVideoPorts[], | ||
RTP_TRANSPORT | transportTypes[], | ||
int | numRtpCodecs, | ||
SdpCodec * | rtpCodecs[], | ||
SdpSrtpParameters & | srtpParams, | ||
int | videoBandwidth, | ||
int | videoFramerate, | ||
RTP_TRANSPORT | transportOffering | ||
) |
|
static |
void addCodecsAnswer | ( | int | iNumAddresses, |
UtlString | mediaAddresses[], | ||
int | rtpAudioPorts[], | ||
int | rtcpAudioPorts[], | ||
int | rtpVideoPorts[], | ||
int | rtcpVideoPorts[], | ||
RTP_TRANSPORT | transportTypes[], | ||
int | numRtpCodecs, | ||
SdpCodec * | rtpCodecs[], | ||
SdpSrtpParameters & | srtpParams, | ||
int | videoBandwidth, | ||
int | videoFramerate, | ||
const SdpBody * | sdpRequest | ||
) |
void addMediaLinesAnswer | ( | int | numMediaLines, |
const SdpMediaLine * | mediaLines[], | ||
const SdpBody & | offer | ||
) |
void addMediaData | ( | const char * | mediaType, |
int | portNumber, | ||
int | portPairCount, | ||
const char * | mediaTransportType, | ||
int | numPayloadTypes, | ||
int | payloadType[] | ||
) |
Create a new media set for SDP message.
mediaType | "audio", "video", "application", "data", "control" |
portNumber | TCP or UDP port number for the media stream |
portPairCount | the number of PAIRS of ports to be used for the media stream. |
mediaTransportType | i.e. "RTP/AVP" |
numPayloadTypes | entries in the payloadType parameter |
payloadType | format specifier specific to context of mediaTransportType. (i.e. for TRP/AVP u-law this is 0, a-law is 14). see RFC 1890 for the Payload Type numbers |
void addCodecParameters | ( | int | numRtpCodecs, |
SdpCodec * | rtpCodecs[], | ||
const char * | szMimeType = "audio" |
||
) |
void addConnectionAddress | ( | const char * | ipAddress | ) |
Set address.
Set address for SDP message header or specific media set if called after addAddressData.
ipAddress | for IP4 this is of the format: nnn.nnn.nnn.nnn where nnn is 0 to 255 |
void addConnectionAddress | ( | const char * | networkType, |
const char * | addressType, | ||
const char * | ipAddress | ||
) |
networkType | network type - should be "IN" |
addressType | address type - should be "IP4" |
ipAddress | IP address |
void setConnectionAddress | ( | const char * | ipAddress | ) |
Set address.
Set address for SDP message header or specific media set if called after addAddressData.
ipAddress | for IP4 this is of the format: nnn.nnn.nnn.nnn where nnn is 0 to 255 |
void setConnectionAddress | ( | const char * | networkType, |
const char * | addressType, | ||
const char * | ipAddress | ||
) |
networkType | network type - should be "IN" |
addressType | address type - should be "IP4" |
ipAddress | IP address |
void addRtpmap | ( | int | payloadType, |
const char * | mimeSubtype, | ||
int | sampleRate, | ||
int | numChannels | ||
) |
void addSrtpCryptoField | ( | SdpSrtpParameters & | params | ) |
void addFormatParameters | ( | int | payloadType, |
const char * | formatParameters | ||
) |
void addPtime | ( | int | pTime | ) |
Add a "a" field for the given ptime value in milliseconds.
void addCandidateAttribute | ( | int | candidateId, |
const char * | transportId, | ||
const char * | transportType, | ||
uint64_t | qValue, | ||
const char * | candidateIp, | ||
int | candidatePort | ||
) |
Set the candidate attribute per draft-ietf-mmusic-ice-05.
int getMediaSetCount | ( | ) | const |
Get the number of media description sets.
int findMediaType | ( | const char * | mediaType, |
int | startMediaIndex = 0 |
||
) | const |
Get the index to the next media set of the given type.
The default is to start from the begining. The resulting index may be the start index if it is of the given type.
mediaType | the media type to search for |
startMediaIndex | start searching from here |
UtlBoolean getMediaData | ( | int | mediaIndex, |
UtlString * | mediaType, | ||
int * | mediaPort, | ||
int * | mediaPortPairs, | ||
UtlString * | mediaTransportType, | ||
int | maxPayloadTypes, | ||
int * | numPayloadTypes, | ||
int | payloadTypes[] | ||
) | const |
Read a full media line.
mediaIndex | the index of the media to read (the nth m line) |
const bool isTransportAvailable | ( | const OsSocket::IpProtocolSocketType | protocol, |
const SIPX_MEDIA_TYPE | mediaType | ||
) | const |
Inspects whether the given transport type and media type combination is specified as an m-line in the sdp.
UtlBoolean getMediaNetworkType | ( | int | mediaIndex, |
UtlString * | networkType | ||
) | const |
Read whether the media network type is IP4 or IP6.
mediaIndex | which media description set to read |
UtlBoolean getMediaAddress | ( | int | mediaIndex, |
UtlString * | address | ||
) | const |
Get IP address for the indicated media stream.
mediaIndex | which media description set to read |
UtlBoolean getMediaType | ( | int | mediaIndex, |
UtlString * | mediaType | ||
) | const |
Get the media type for the indicated media stream.
mediaIndex | which media description set to read |
mediaType | audio, video, application, etc. |
UtlBoolean getMediaPort | ( | int | mediaIndex, |
int * | port | ||
) | const |
Get the port number for the indicated media stream.
mediaIndex | which media description set to read |
UtlBoolean getMediaRtcpPort | ( | int | mediaIndex, |
int * | port | ||
) | const |
mediaIndex | which media description set to read |
UtlBoolean getMediaPortCount | ( | int | mediaIndex, |
int * | numPorts | ||
) | const |
Get the number of port pairs in media stream.
Stream pairs start with the port number given by getMediaPort and are incremented from there to derive the additional port numbers
mediaIndex | which media description set to read |
UtlBoolean getMediaProtocol | ( | int | mediaIndex, |
UtlString * | transportProtocol | ||
) | const |
Get the transport protocol for the indicated media stream.
mediaIndex | which media description set to read |
UtlBoolean getMediaPayloadType | ( | int | mediaIndex, |
int | maxTypes, | ||
int * | numTypes, | ||
int | payloadTypes[] | ||
) | const |
Get the payload types for the indicated media stream.
mediaIndex | which media description set to read |
maxTypes | size of the payloadTypes array |
numTypes | number of entries returned in payloadTypes |
payloadTypes | array of integer payload types |
UtlBoolean getPtime | ( | int | mediaIndex, |
int & | ptime | ||
) | const |
Get the ptime field for the given media set.
UtlBoolean getMediaSubfield | ( | int | mediaIndex, |
int | subfieldIndex, | ||
UtlString * | subField | ||
) | const |
Media field accessor utility.
UtlBoolean getPayloadRtpMap | ( | int | mediaIndex, |
int | payloadType, | ||
UtlString & | mimeSubtype, | ||
int & | sampleRate, | ||
int & | numChannels | ||
) | const |
Get the subfields of the rtpmap field.
mediaIndex | index to which m line contains rtpmap |
payloadType | which rtp map to read |
mimeSubtype | the codec name (mime subtype) |
sampleRate | the number of samples/sec. (-1 if not set) |
numChannels | the number of channels (-1 if not set) |
UtlBoolean getPayloadFormat | ( | int | mediaIndex, |
int | payloadType, | ||
UtlString & | fmtp | ||
) | const |
mediaIndex | index to which m line contains rtpmap |
UtlBoolean getSrtpCryptoField | ( | int | mediaIndex, |
int | index, | ||
SdpSrtpParameters & | params | ||
) | const |
See SdpCodec for utilities to parse the fmtp field (e.g.
getFmtpParameter and getVideoSizes)
mediaIndex | mediaIndex of crypto field |
index | Index inside of media type |
UtlBoolean getControlTrackId | ( | int | mediaLineIndex, |
UtlString & | trackId | ||
) | const |
UtlBoolean getFramerateField | ( | int | mediaIndex, |
int & | videoFramerate | ||
) | const |
UtlBoolean getBandwidthField | ( | int & | bandwidth | ) | const |
Find the "a" record containing an rtpmap for the given payload type id, parse it and return the parameters for it.
void getBestAudioCodecs | ( | SdpCodecList & | localRtpCodecs, |
int & | numCodecsInCommon, | ||
SdpCodec **& | commonCodecsForEncoder, | ||
UtlString & | rtpAddress, | ||
int & | rtpPort, | ||
int & | rtcpPort, | ||
int & | videoRtpPort, | ||
int & | videoRtcpPort, | ||
SdpSrtpParameters & | localSrtpParams, | ||
SdpSrtpParameters & | matchingSrtpParams, | ||
int | localBandwidth, | ||
int & | matchingBandwidth, | ||
int | localVideoFramerate, | ||
int & | matchingVideoFramerate | ||
) | const |
Find the send and receive codecs from the rtpCodecs array which are compatible with this SdpBody.
It is assumed that the best are matches are first in the body.
void getCodecsInCommon | ( | int | audioMediaSetIndex, |
int | videoMediaSetIndex, | ||
int | audioPayloadIdCount, | ||
int | videoPayloadIdCount, | ||
int | audioPayloadTypes[], | ||
int | videoPayloadTypes[], | ||
int | videoRtpPort, | ||
SdpCodecList & | localRtpCodecs, | ||
int & | numCodecsInCommon, | ||
SdpCodec * | commonCodecsForEncoder[], | ||
SdpCodec * | commonCodecsForDecoder[] | ||
) | const |
For local capabilities, get remote media line and supported local codecs.
int getCodecsInCommon | ( | const SdpMediaLine & | localMediaLine, |
int | remoteMediaLineIndex, | ||
SdpMediaLine & | remoteMediaLine, | ||
SdpCodecList & | localDecodeCodecs | ||
) | const |
UtlBoolean getMediaLine | ( | int | remoteMediaLineIndex, |
SdpMediaLine & | mediaLine, | ||
const SdpCodecList * | codecFactory | ||
) | const |
Assumes this SDP is the SDP offer and the localMediaLine is the capabilities for the offer.
localMediaLine | - local capabilities (codecs, ports, addresses, etc.) |
remoteMediaLineIndex | - index to m line in this SDP offer to which the local capabilities are to be matched. |
remoteMediaLine | - gets filled in with remote capabilities per indexed m line |
localDecodeCodecs | - codecs that this side should offer with payload IDs matched where possible. |
void addMediaLine | ( | const SdpMediaLine & | mediaLine, |
SdpBody & | sdpBody | ||
) |
void getEncryptionInCommon | ( | SdpSrtpParameters & | audioParams, |
SdpSrtpParameters & | remoteParams, | ||
SdpSrtpParameters & | commonAudioParms | ||
) | const |
void getBandwidthInCommon | ( | int | localBandwidth, |
int | remoteBandwidth, | ||
int & | commonBandwidth | ||
) | const |
void getVideoFramerateInCommon | ( | int | localVideoFramerate, |
int | remoteVideoFramerate, | ||
int & | commonVideoFramerate | ||
) | const |
UtlBoolean getCandidateAttribute | ( | int | mediaIndex, |
int | candidateIndex, | ||
int & | rCandidateId, | ||
UtlString & | rTransportId, | ||
UtlString & | rTransportType, | ||
uint64_t & | rQvalue, | ||
UtlString & | rCandidateIp, | ||
int & | rCandidatePort | ||
) | const |
Get the candidate attribute per draft-ietf-mmusic-ice-05.
UtlBoolean getCandidateAttributes | ( | const char * | szMimeType, |
int | nMaxAddresses, | ||
int | candidateIds[], | ||
UtlString | transportIds[], | ||
UtlString | transportTypes[], | ||
uint64_t | qvalues[], | ||
UtlString | candidateIps[], | ||
int | candidatePorts[], | ||
int & | nActualAddresses | ||
) | const |
UtlBoolean getCandidateAttributes | ( | int | mediaIndex, |
int | nMaxAddresses, | ||
int | candidateIds[], | ||
UtlString | transportIds[], | ||
UtlString | transportTypes[], | ||
uint64_t | qvalues[], | ||
UtlString | candidateIps[], | ||
int | candidatePorts[], | ||
int & | nActualAddresses | ||
) | const |
UtlBoolean findValueInField | ( | const char * | pField, |
const char * | pvalue | ||
) | const |
Locates a specific value for an attribute field Used to locate sendonly and recvonly in case if hold and unhold INVITE messages.
|
protected |
Return the number of fields in the body.
|
protected |
Return the name and value of the nth field in the body.
It is better to use a more specific accessor method for the field type you need than to iterate over all fields using this interface.
|
protected |
Set a specific field.
name | field name to set |
value | value for the named field |
|
protected |
Parse an existing string into the internal representation.
bytes | NULL creates an empty body |
byteCount | -1 means treat bytes as null terminated |
|
friend |