Adds a media format to the media description field (m) in the output buffer.
uint32_t mccdSdpAddMediaFormat ( MCC_SDP_CONTEXT_W * context, const char * format)
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 a string constant. For audio and video media, use the media payload type as defined in the RTP Audio/Video profile (RFC 1890). |
Call mccdSdpAddMediaFormat once for each media format you want to add. A list of formats implies that all of these formats may be used in the session. The first format in the list is the default format for the session.
mccdSdpAddMediaFormat returns either MCCSDP_OK (function completed successfully) or MCCSDP_MEMORY_ERROR.
This example:
mccdSdpAddMediaFormat ( pc, "0" );
mccdSdpAddMediaFormat ( pc, "8" );
adds media formats 0 and 8 to the SDP m field started by mccdSdpAddMediaBegin.
m=audio 8000 RTP/AVP 0 8