Adds the rtpmap attribute field (a=rtpmap) to the output buffer.
uint32_t mccdSdpAddRtpmap ( MCC_SDP_CONTEXT_W * context, const char * format, const char * encoding, uint32_t clockrate, const char * param)
Argument |
Description |
context |
Pointer to the MCC_SDP_CONTEXT_W structure that stores the SDP message as you create its components. |
format |
Pointer to the media format payload identifier, which is formatted as a string constant. For audio and video media, use the media payload type as defined in the RTP Audio/Video profile (RFC 1890). |
encoding |
Pointer to the RTP encoding. |
clockrate |
RTP clock rate. |
param |
Pointer to an optional parameter. A value of 0 indicates no optional parameter. |
Depending on when you call mccdSdpAddRtpmap, it adds either a session-level rtpmap attribute or a media-level rtpmap attribute to the SDP message. For more information, see Creating an SDP message.
mccdSdpAddRtpmap returns either MCCSDP_OK (function completed successfully) or MCCSDP_MEMORY_ERROR.
This example:
mccdSdpAddRtpmap ( pc, "0", "PCMU", 8000, 0 );
creates the following SDP output:
a=rtpmap:0 PCMU/8000