mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-27 05:38:31 +08:00
添加rtpfb枚举与工具类
This commit is contained in:
parent
48338af700
commit
93160c0ec7
@ -42,6 +42,15 @@ const char *psfbTypeToStr(PSFBType type) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *rtpfbTypeToStr(RTPFBType type) {
|
||||||
|
switch (type){
|
||||||
|
#define SWITCH_CASE(key, value) case RTPFBType::key : return #value "(" #key ")";
|
||||||
|
RTPFB_TYPE_MAP(SWITCH_CASE)
|
||||||
|
#undef SWITCH_CASE
|
||||||
|
default: return "unknown transport layer feedback messages fmt type";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static size_t alignSize(size_t bytes) {
|
static size_t alignSize(size_t bytes) {
|
||||||
return (size_t)((bytes + 3) / 4) << 2;
|
return (size_t)((bytes + 3) / 4) << 2;
|
||||||
}
|
}
|
||||||
|
@ -133,6 +133,13 @@ enum class PSFBType : uint8_t {
|
|||||||
#undef XX
|
#undef XX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//rtpfb类型枚举
|
||||||
|
enum class RTPFBType : uint8_t {
|
||||||
|
#define XX(key, value) key = value,
|
||||||
|
RTPFB_TYPE_MAP(XX)
|
||||||
|
#undef XX
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RtcpType转描述字符串
|
* RtcpType转描述字符串
|
||||||
*/
|
*/
|
||||||
@ -148,6 +155,11 @@ const char *sdesTypeToStr(SdesType type);
|
|||||||
*/
|
*/
|
||||||
const char *psfbTypeToStr(PSFBType type);
|
const char *psfbTypeToStr(PSFBType type);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtpfb枚举转描述字符串
|
||||||
|
*/
|
||||||
|
const char *rtpfbTypeToStr(RTPFBType type);
|
||||||
|
|
||||||
class RtcpHeader {
|
class RtcpHeader {
|
||||||
public:
|
public:
|
||||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||||
|
Loading…
Reference in New Issue
Block a user