📄 payload.h
字号:
0,1,2,3,4,5,6,7,8,9,#,*,A,B,C,D.
the events will be identified by an enumeration.
*/
/* DTMF event name. according to RFC2833
- the order is very important! do not change the order! */
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 containning the required parameters for DTMF events.
* output : none
* return : Non-negative value on success
* Negative value on failure
************************************************************************/
RVAPI
RvInt32 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
************************************************************************/
RVAPI
RvInt32 RVCALLCONV rtpDtmfEventUnpack(
OUT void * buf,
IN RvInt32 len,
OUT rtpParam * p,
OUT void * param);
/* == 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 rwquencies 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 containning 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.
************************************************************************/
RVAPI
RvInt32 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
************************************************************************/
RVAPI
RvInt32 RVCALLCONV rtpDtmfTonesUnpack(
OUT void * buf,
IN RvInt32 len,
OUT rtpParam * p,
OUT void * param);
/************************************************************************
* rtpDtmfTonesGetByIndex
*
* purpose: find the requested frquency in the received message.
*
* input : buf - the received buffer.
* index - index of the frequency indside the frequency list.
* p - RTP header parameters that were received.
* param - the received parameters for telephony tones.
* output : frequency - The requested frquency
* return : Non-negative value on success
* Negative value on failure
************************************************************************/
RVAPI
RvStatus 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 multipoint video conferending to be individually controlled from
any video terminal.
*/
typedef enum
{
rtpAnnexQProceduresStartAction,
rtpAnnexQProceduresContinueAction,
rtpAnnexQProceduresStopAction,
rtpAnnexQProceduresSelectVideoSource,
rtpAnnexQProceduresVideoSourceSwitched,
rtpAnnexQProceduresStoreAsPreset,
rtpAnnexQProceduresActivatePreset
} 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.
*
* input : buf - buffer pointer that will be sent
* len - length of the buffer.
* p - RTP header default parameters.
* param - a structure containning the required parameters for fecc.
* output : none
* return : Non-negative value on success
* Negative value on failure
************************************************************************/
RVAPI
RvInt32 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
************************************************************************/
RVAPI
RvInt32 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 + -