# mccdSdpAddMediaBegin

Adds the beginning of the media description field (m) to the output buffer.

#### Prototype

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: MCCSDP_MEDIA_APP MCCSDP_MEDIA_AUDIO MCCSDP_MEDIA_CONTROL MCCSDP_MEDIA_DATA, MCCSDP_MEDIA_IMAGE MCCSDP_MEDIA_VIDEO
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: MCCSDP_PROT_RTPAVP MCCSDP_PROT_UDP MCCSDP_PROT_TCP MCCSDP_PROT_UDPTL

#### Return values

mccSdpAddMediaBegin returns either MCCSDP_OK (function completed successfully) or MCCSDP_MEMORY_ERROR.

#### Details

After calling mccdSdpAddMediaBegin, call mccdSdpAddMediaF ormat one or more times to add media formats, and then mccdSdpAddMediaEnd to terminate the media field. For more information, see Creating an SDP message.

#### Example

This example:

mccdSdpAddMediaBegin ( pc, MCCSDP_MEDIA_AUDIO, 8000, 0, "RTP/AVP" );

creates the following SDP output:

m=audio 8000 RTP/AVP