Dialogic 05-2548-006 Computer Accessories User Manual


 
Dialogic
®
Multimedia Software for ATCA Release 1.0 Release Update, Rev 06 — January 23, 2008 29
Dialogic Corporation
Example
In this example, the first ipm_GetCapabilities( ) call retrieves only the number of capabilities
available (count). That number is then used to allocate the right amount of memory and retrieve
details of all the capabilities.
#include <ipmlib.h>
// Code follows:
unsigned int count;
IPM_CODER_INFO *caps
int i;
unsigned int count=ipm_GetCapabilties(dev,CAPABILITY_CODERLIST,0,NULL,SYNC);
caps=(IPM_CAPABILITIES *malloc(sizeof(IPM_CAPABILITIES)*count);
// check for memory error here
count=ipm_GetCapabilties(dev,CAPABILITY_CODERLIST,count,caps,SYNC);
for (i=0;i<count;i++)
{
printf(“RFC 1890 Coder Type %ui supported\n”,caps[i].Coder.unCoderPayloadType);
}
// Free coder list here
free(caps);
See Also
None.