Reading an SDP message

Use mccReadSDP to read an SDP message. For input, this function uses a memory buffer that contains an SDP message. For output, it generates a tree of C structures in a user-provided output buffer.

mccReadSDP returns a pointer to an MCC_SDP structure that contains session level information for the SDP message. The MCC_SDP structure points directly or indirectly to all other SDP structures.

The following example reads an SDP message:

    MCC_SDP *   sdp;
    uint32_t    error;
    
    char sdpData[1024];     /* Buffer to write SDP to */
    char buffer[1024];      /* Buffer to create MCC_SDP structure in */

/* Read generated SDP into MCC_SDP */
    
    sdp = mccdReadSDP( sdpData, mccdSdpGetLength(pc), buffer, sizeof(buffer), &error ); 
    
    if ( sdp == 0 ) 
    {
        printf("ERROR: failed to process SDP: %d\n", error);
        return;
    }