ioctl(ixj, PHONE_QUERY_CODEC, struct phone_codec_data *pCodecInfo)
Return Value
Returns 0 if the driver supports the codec passed to it. Otherwise, return an error code.
Parameters
A pointer to a phone_codec_data structure.
struct phone_codec_data { phone_codec type; unsigned short buf_min, buf_opt, buf_max };
Remarks
This function can be used to determine the size of buffers needed for a particular codec. Note that the type element of the structure must be initialised before the ioctl is called to indicate the required codec, and the codec identifiers are the same as use for PHONE_PLAY_CODEC and PHONE_REC_CODEC.
Note that the values of buf_min, buf_opt and buf_max values are not returned in bytes, but as words (16 bit values). Hence, the buf_opt size for G723_63 is 12 words.
See Also:
PHONE_CAPABILITIES, PHONE_CAPABILITIES_CHECK, PHONE_CAPABILITIES_LIST
Example:
struct phone_capability capreq; capreq.captype = codec; capreq.cap = TS85; printf("TS85 = %d\n", ioctl(ixj, PHONE_CAPABILITIES_CHECK, &capreq)); capreq.cap = G723_63; printf("g.723.1 6.3 = %d\n", ioctl(ixj, PHONE_CAPABILITIES_CHECK,&capreq));
©1996-2001 Quicknet Technologies, Inc.