📄 rvrtp.h
字号:
IN rtpParam * p);
RVAPI
RvInt32 RVCALLCONV rtpUnpack(
IN HRTPSESSION hRTP,
IN void * buf,
IN RvInt32 len,
OUT rtpParam* p);
/************************************************************************************
* rtpRead
* description: This routine sets the header of the RTP message.
* input: hRTP - Handle of the RTP session.
* buf - Pointer to buffer containing the RTP packet with room before first
* payload byte for RTP header.
* len - Length in bytes of buf.
*
* output: p - A struct of RTP param,contain the fields of RTP header.
* return value: If no error occurs, the function returns the non-neagtive value.
* Otherwise, it returns a negative value.
***********************************************************************************/
RVAPI
RvInt32 RVCALLCONV rtpRead(
IN HRTPSESSION hRTP,
IN void * buf,
IN RvInt32 len,
OUT rtpParam * p);
/************************************************************************************
* rtpReadEx
* description: Receives an RTP packet and updates the corresponding RTCP session.
* input: hRTP - Handle of the RTP session.
* buf - Pointer to buffer containing the RTP packet with room before first
* payload byte for RTP header.
* len - Length in bytes of buf.
* timestamp -
* p - A struct of RTP param,contain the fields of RTP header.
* output: none.
* return value: If no error occurs, the function returns the non-neagtive value.
* Otherwise, it returns a negative value.
***********************************************************************************/
RVAPI
RvInt32 RVCALLCONV rtpReadEx(
IN HRTPSESSION hRTP,
IN void * buf,
IN RvInt32 len,
IN RvUint32 timestamp,
OUT rtpParam * p);
/************************************************************************************
* rtpGetPort
* description: Returns the current port of the RTP session.
* input: hRTP - Handle of the RTP session.
* output: none.
* return value: If no error occurs, the function returns the current port value.
* Otherwise, it returns a negative value.
***********************************************************************************/
RVAPI
RvUint16 RVCALLCONV rtpGetPort(
IN HRTPSESSION hRTP);
/************************************************************************************
* rtpGetVersion
* description: Returns the RTP version of the installed RTP Stack.
* input: none.
* output: none.
* return value: If no error occurs, the function returns the current version value.
* Otherwise, it returns a negative value.
***********************************************************************************/
RVAPI
char * RVCALLCONV rtpGetVersion(void);
/************************************************************************************
* rtpGetVersionNum
* description: Returns the RTP version of the installed RTP Stack.
* input: none.
* output: none.
* return value: If no error occurs, the function returns the current version value.
* Otherwise, it returns a negative value.
***********************************************************************************/
RVAPI
RvUint32 RVCALLCONV rtpGetVersionNum(void);
/* == ENDS: Basic RTP Functions == */
/* == Accessory RTP Functions == */
/************************************************************************************
* rtpGetRTCPSession
* description: Returns the RTCP session.
* input: hRTP - Handle of RTP session.
* output: none.
* return value: hRTCP - Handle of RTCP session.
***********************************************************************************/
RVAPI
HRTCPSESSION RVCALLCONV rtpGetRTCPSession(
IN HRTPSESSION hRTP);
/************************************************************************************
* rtpSetRTCPSession
* description: set the RTCP session.
* input: hRTP - Handle of RTP session.
* hRTCP - Handle of RTCP session.
* output: none.
* return value:return 0.
***********************************************************************************/
RVAPI
RvInt32 RVCALLCONV rtpSetRTCPSession(
IN HRTPSESSION hRTP,
IN HRTCPSESSION hRTCP);
/************************************************************************************
* rtpGetHeaderLength
* description: return the header of RTP message.
* input: none.
* output: none.
* return value:The return value is twelve.
***********************************************************************************/
RVAPI
RvInt32 RVCALLCONV rtpGetHeaderLength(void);
/************************************************************************************
* rtpRegenSSRC
* description: Generates a new synchronization source value for the RTP session.
* This function, in conjunction with rtpGetSSRC() may be used to
* change the SSRC value when an SSRC collision is detected.
* input: hRTP - Handle of RTP session.
* output: none.
* return value: ssrc - If an error occurs, the function returns a negative value.
* If no error occurs, the function returns a non-negative value.
***********************************************************************************/
RVAPI
RvUint32 RVCALLCONV rtpRegenSSRC(
IN HRTPSESSION hRTP);
/************************************************************************************
* rtpSetGroupAddress
* description: Defines a multicast IP for the RTP session.
* input: hRTP - Handle of RTP session.
* ip - Multicast IP address for the RTP session.
* output: none.
* return value: return 0.
***********************************************************************************/
RVAPI
RvInt32 RVCALLCONV rtpSetGroupAddress(
IN HRTPSESSION hRTP,
IN RvUint32 ip);
/************************************************************************************
* rtpResume
* description: Causes a blocked rtpRead() or rtpReadEx() function running in
* another thread to fail.
* input: hRTP - Handle of RTP session.
* output: none.
* return value: If an error occurs, the function returns a negative value.
* If no error occurs, the function returns a non-negative value.
***********************************************************************************/
RVAPI
RvInt32 RVCALLCONV rtpResume(
IN HRTPSESSION hRTP);
/************************************************************************************
* rtpUseSequenceNumber
* description: Forces the Stack to accept user input for the sequence number of
* the RTP packet. The RTP Stack usually determines the sequence number.
* However, the application can force its own sequence number.
* Call rtpUseSequenceNumber() at the beginning of the RTP session and
* then specify the sequence number in the rtpParam structure of the
* rtpWrite() function.
* input: hRTP - Handle of RTP session.
* output: none.
* return value: return 0.
***********************************************************************************/
RVAPI
RvInt32 RVCALLCONV rtpUseSequenceNumber(
IN HRTPSESSION hRTP);
/************************************************************************************
* rtpSetReceiveBufferSize
* description: Changes the RTP session receive buffer size.
* input: hRTP - Handle of RTP session.
* output: none.
* return value: return 0.
***********************************************************************************/
RVAPI
RvInt32 RVCALLCONV rtpSetReceiveBufferSize(
IN HRTPSESSION hRTP,
IN int size);
/************************************************************************************
* rtpSetTransmitBufferSize
* description: Changes the RTP session transmit buffer size.
* input: hRTP - Handle of RTP session.
* size - The new transmit buffer size.
* output: none.
* return value: return 0.
***********************************************************************************/
RVAPI
RvInt32 RVCALLCONV rtpSetTransmitBufferSize(
IN HRTPSESSION hRTP,
IN int size);
/************************************************************************************
* rtpSetTrasmitBufferSize
* description: Changes the RTP session transmit buffer size.
* input: hRTP - Handle of RTP session.
* size - The new transmit buffer size.
* output: none.
* return value: return 0.
* comment : obsolete function provided for compatibility with prev. version
***********************************************************************************/
RVAPI
RvInt32 RVCALLCONV rtpSetTrasmitBufferSize(
IN HRTPSESSION hRTP,
IN int size);
/************************************************************************************
* rtpGetAvailableBytes
* description: Gets the number of bytes available for reading in the RTP session.
* input: hRTP - Handle of RTP session.
* output: none.
* return value: If an error occurs, the function returns a negative value.
* If no error occurs, the function returns a non-negative value.
***********************************************************************************/
RVAPI
RvInt32 RVCALLCONV rtpGetAvailableBytes(
IN HRTPSESSION hRTP);
/* == ENDS: Accessory RTP Functions == */
#ifdef __cplusplus
}
#endif
#endif /* __RTP_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -