📄 payload.h
字号:
typedef enum{ rtpDtmfEvent_0, rtpDtmfEvent_1, rtpDtmfEvent_2, rtpDtmfEvent_3, rtpDtmfEvent_4, rtpDtmfEvent_5, rtpDtmfEvent_6, rtpDtmfEvent_7, rtpDtmfEvent_8, rtpDtmfEvent_9, rtpDtmfEvent_asterisk, rtpDtmfEvent_pound, rtpDtmfEvent_A, rtpDtmfEvent_B, rtpDtmfEvent_C, rtpDtmfEvent_D, rtpDtmfEvent_NoEvent} rtpDtmfEvent;/************************************************************************ * rtpDtmfEventParams * This struct holds all the information needed/received for RFC2833 * packet with event mode ***********************************************************************/typedef struct{ rtpDtmfEvent event; /* type of current event received or to-send */ RvBool end; /* the E (end bit) - indicating the last packet of this event */ RvUint8 volume; /* volume of current event received or to-send */ RvUint32 duration; /* duration of current event received or to-send */} rtpDtmfEventParams;/************************************************************************ * rtpDtmfEventPack * * purpose: set the payload format, for sending DTMF events inband, * as described in RFC2833, section 3.5. * * input : buf - buffer pointer that will be sent * len - length of the buffer. * p - RTP header default parameters. * param - a structure containing the required parameters for DTMF events. * output : none * return : Non-negative value on success * Negative value on failure ************************************************************************/RVAPIRvInt32 RVCALLCONV rtpDtmfEventPack( IN void * buf, IN RvInt32 len, IN rtpParam * p, IN void * param);/************************************************************************ * rtpDtmfEventUnpack * * purpose: evaluates the DTMF events from the received packed. * * input : len - length of the buffer. * output : buf - the received buffer. * p - RTP header parameters that were received. * param - the received parameters for DTMF events. * return : Non-negative value on success * Negative value on failure ************************************************************************/RVAPIRvInt32 RVCALLCONV rtpDtmfEventUnpack( OUT void * buf, IN RvInt32 len, OUT rtpParam * p, OUT void * param);/****************************************************************************** * rtpDtmfEventGetHeaderLength * ---------------------------------------------------------------------------- * General: Returns the length of a DTMF event payload. * This length should be placed as the len parameter to rtpWrite(). * * Return Value: Length of a DTMF event payload. * ---------------------------------------------------------------------------- * Arguments: * Input: none. * Output: none. *****************************************************************************/RVAPIRvInt32 RVCALLCONV rtpDtmfEventGetHeaderLength(void);/* == Telephony Tones according to RFC2833 == *//************************************************************************ * rtpDtmfTonesParams * This struct holds all the information needed/received for RFC2833 * packet with tone mode ***********************************************************************/typedef struct{ RvUint16 modulation; /* The modulation frequency, in Hz */ RvBool T; /* the 'T' bit. True means divide by 3 */ RvUint8 volume; /* volume of current tone received or to-send */ RvUint32 duration; /* duration of current tone received or to-send */ RvUint16 *freqList; /* the list of frequencies to send/received */ RvUint32 freqListLength; /* length of the frequencies list */} rtpDtmfTonesParams;/************************************************************************ * rtpDtmfTonesPack * * purpose: set the payload format, for sending telephony tones inband, * as described in RFC2833, section 4.4. * * input : buf - buffer pointer that will be sent * len - length of the buffer. * p - RTP header default parameters. * param - a structure containing the required parameters for telephony tones. * output : none * return : Non-negative value on success * Negative value on failure * * Important: one of the members of the 'rtpDtmfTonesParams' struct(param) is a pointer * notes to an integer array, that symbolizes the frequencies that form the tone. * the array is not limited in size, since a single tone can contain any * number of frequencies. this is the reason there is a member 'freqListLength' * in the struct as well. ************************************************************************/RVAPIRvInt32 RVCALLCONV rtpDtmfTonesPack( IN void * buf, IN RvInt32 len, IN rtpParam * p, IN void * param);/************************************************************************ * rtpDtmfTonesUnpack * * purpose: evaluates the telephony tones from the received packed. * * input : len - length of the buffer. * output : buf - the received buffer. * p - RTP header parameters that were received. * param - the received parameters for telephony tones. * return : Non-negative value on success * Negative value on failure ************************************************************************/RVAPIRvInt32 RVCALLCONV rtpDtmfTonesUnpack( OUT void * buf, IN RvInt32 len, OUT rtpParam * p, OUT void * param);/************************************************************************ * rtpDtmfTonesGetByIndex * * purpose: find the requested frequency in the received message. * * input : buf - the received buffer. * index - index of the frequency inside the frequency list. * p - RTP header parameters that were received. * param - the received parameters for telephony tones. * output : frequency - The requested frequency * return : Non-negative value on success * Negative value on failure ************************************************************************/RVAPIRvStatus RVCALLCONV rtpDtmfTonesGetByIndex( IN void * buf, IN RvUint32 index, IN rtpParam * p, IN void * param, OUT RvUint16 * frequency);/* ========================================================= *//* ==== Annex Q & H.281 - Far End Camera Control (FECC) ==== *//* ========================================================= *//* The FECC protocol is designed to function along with H.224, in order to allow a multi-point video conferencing to be individually controlled from any video terminal.*/typedef enum{ rtpAnnexQProceduresStartAction = 1, rtpAnnexQProceduresContinueAction = 2, rtpAnnexQProceduresStopAction = 3, rtpAnnexQProceduresSelectVideoSource = 4, rtpAnnexQProceduresVideoSourceSwitched = 5, rtpAnnexQProceduresStoreAsPreset = 6, rtpAnnexQProceduresActivatePreset = 7} rtpAnnexQProcedures;typedef enum{ rtpAnnexQMoveDisable = 0, /* = 00(binary) */ rtpAnnexQMoveLeftDownOut = 2, /* = 10(binary) */ rtpAnnexQMoveRightUpIn = 3 /* = 11(binary) */} rtpAnnexQMoveCamera;/************************************************************************ * rtpAnnexQActions * This struct holds the various possible positions for a camera. the user * can request to move the camera in several positions concurrently. ***********************************************************************/typedef struct{ rtpAnnexQMoveCamera pan; rtpAnnexQMoveCamera tilt; rtpAnnexQMoveCamera zoom; rtpAnnexQMoveCamera focus;} rtpAnnexQActions;/************************************************************************ * AnnexQCameraMode * This struct holds the user request for camera method of imaging. ***********************************************************************/typedef struct{ RvBool stillImage; RvBool doubleResolutionStillImage;} AnnexQCameraMode;/************************************************************************ * rtpAnnexQParam * This struct holds all the information needed/received for H.281 * packet with FECC capability request. ***********************************************************************/typedef struct{ rtpAnnexQProcedures procedure; rtpAnnexQActions action; RvUint8 timeOut; RvUint8 videoSource; AnnexQCameraMode mode; RvUint8 preset;} rtpAnnexQParam;/************************************************************************ * rtpAnnexQMessagePack * * purpose: set the payload format, for sending Far end camera commands inband, * as described in H.281. * Several AnnexQ commands can be sent in the same packet. Using * rtpAnnexQMessagePack on the same buffer for several such messages * places them in reverse order. * * input : buf - buffer pointer that will be sent * len - length of the buffer. * p - RTP header default parameters. * param - a structure containing the required parameters for FECC. * output : none * return : Non-negative value on success * Negative value on failure ************************************************************************/RVAPIRvInt32 RVCALLCONV rtpAnnexQMessagePack( IN void * buf, IN RvInt32 len, IN rtpParam * p, IN void * params);/************************************************************************ * rtpAnnexQMessageUnpack * * purpose: evaluates the FECC commands from the received packed. * * input : len - length of the buffer. * output : buf - the received buffer. * p - RTP header parameters that were received. * param - the received parameters for FECC. * return : Non-negative value on success * Negative value on failure ************************************************************************/RVAPIRvInt32 RVCALLCONV rtpAnnexQMessageUnpack( OUT void * buf, IN RvInt32 len, OUT rtpParam * p, OUT void * params);#ifdef __cplusplus}#endif#endif /* __PAYLOAD_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -