Adds the beginning of the media description field (m) to the output buffer.
uint32_t mccdSdpAddMediaBegin ( MCC_SDP_CONTEXT_W * context, const char * media_s, uint32_t port, uint32_t count, const char * proto_s)
Argument |
Description |
context |
Pointer to the MCC_SDP_CONTEXT_W structure that stores an SDP message as you create its components. |
media_s |
Pointer to the media type, which is formatted as a string constant. Recognized values include:
|
port |
Media port. |
count |
Media port count. A value of 0 indicates no port count. |
proto_s |
Pointer to the media protocol, which is formatted as a string constant. Recognized values include:
|
mccSdpAddMediaBegin returns either MCCSDP_OK (function completed successfully) or MCCSDP_MEMORY_ERROR.
After calling mccdSdpAddMediaBegin, call mccdSdpAddMediaFormat one or more times to add media formats, and then mccdSdpAddMediaEnd to terminate the media field. For more information, see Creating an SDP message.
This example:
mccdSdpAddMediaBegin ( pc, MCCSDP_MEDIA_AUDIO, 8000, 0, "RTP/AVP" );
creates the following SDP output:
m=audio 8000 RTP/AVP