Here is the sample of the comment that is put before each API function in the code we sell
Code:
/************************************************************************
* RvRtpAMRUnpack
* description:
* This method unserializes the payload header from a data buffer.
* The mode and option settings should be set before calling this
* function. Also, the storage arrays for the frame types, frame
* quality indicators, and (optionally) the CRCs MUST be set before
* making this call.
* Receiving an AMR payload is a little more complicated than most. Here are the
* steps required to properly receive and parse an AMR payload:
* bulletlist:
* - Using the header sizes, worst case frame header/data size, allocate data buffer and RTP header.
* - Receive the RTP packet using RvRtpRead.
* - Init RvRtpPayloadAMR object using RvRtpAMRPayloadInit.
* - Set the RvRtpPayloadAMR mode and options (BEMode, InterleavedOption, CRCOption).
* - Use the RvRtpPayloadAMRCalcArraySizes to detrmine Table and Contents size and the number of frames in the packet.
* - Use the RvRtpPayloadAMRSetArrays to set arrays for storing frame types, frame quality indicators, and (optionally) CRCs.
* - Use RvRtpAMRUnpack to read the AMR header from the data buffer.
* - The Table of Contents data (and optionally, CRCs) will now be stored in the arrays that were set with RvRtpPayloadAMRSetArrays.
* - RvRtpParam must be filled after RvRtpRead with the payload type, Marker bit, timestamp.
* - Get the CMR.
* - Optionally, get the ILL and ILP.
* - If using Bandwidth Efficient mode, get the data bit offset.
* - If using Bandwidth Efficient mode, shift the frame data to the right by that offset.
* - If using Bandwidth Efficient mode, get the high order bits that are part of the first frame data byte .
* - Continue normal processing of the frame data.
* Parameters:
* output param - The RvRtpPayloadAMR object.
* input buf - The data buffer that the header is to be unserialized from.
* input len - data buf length
* input p - RvRtp header parameters that were received.
* returns: Non-negative value on success
* Negative value on failure
************************************************************************/RVAPI
RvStatus RVCALLCONV RvRtpAMRUnpack(
IN void * buf,
IN RvInt32 len,
IN RvRtpParam * p,
OUT void * param);