添加rtpfb枚举与工具类

This commit is contained in:
xia-chu
2021-04-23 15:25:33 +08:00
parent 48338af700
commit 93160c0ec7
2 changed files with 21 additions and 0 deletions

View File

@@ -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) {
return (size_t)((bytes + 3) / 4) << 2;
}