Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
ee6f4e8c
提交
ee6f4e8c
authored
3月 22, 2017
作者:
José Luis Millán
提交者:
GitHub
3月 22, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #75 from ibc/enum-class
Use "enum class" instead of "typedef enum"
上级
e5a62f92
fcff405f
隐藏空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
99 行增加
和
99 行删除
+99
-99
Feedback.hpp
worker/include/RTC/RTCP/Feedback.hpp
+4
-4
FeedbackPsAfb.hpp
worker/include/RTC/RTCP/FeedbackPsAfb.hpp
+1
-1
FeedbackPsFir.hpp
worker/include/RTC/RTCP/FeedbackPsFir.hpp
+1
-1
FeedbackPsLei.hpp
worker/include/RTC/RTCP/FeedbackPsLei.hpp
+1
-1
FeedbackPsPli.hpp
worker/include/RTC/RTCP/FeedbackPsPli.hpp
+1
-1
FeedbackPsRpsi.hpp
worker/include/RTC/RTCP/FeedbackPsRpsi.hpp
+1
-1
FeedbackPsSli.hpp
worker/include/RTC/RTCP/FeedbackPsSli.hpp
+1
-1
FeedbackPsVbcm.hpp
worker/include/RTC/RTCP/FeedbackPsVbcm.hpp
+1
-1
FeedbackRtpEcn.hpp
worker/include/RTC/RTCP/FeedbackRtpEcn.hpp
+1
-1
FeedbackRtpNack.hpp
worker/include/RTC/RTCP/FeedbackRtpNack.hpp
+1
-1
FeedbackRtpSrReq.hpp
worker/include/RTC/RTCP/FeedbackRtpSrReq.hpp
+1
-1
FeedbackRtpTllei.hpp
worker/include/RTC/RTCP/FeedbackRtpTllei.hpp
+1
-1
Sdes.hpp
worker/include/RTC/RTCP/Sdes.hpp
+7
-7
Peer.cpp
worker/src/RTC/Peer.cpp
+20
-20
Feedback.cpp
worker/src/RTC/RTCP/Feedback.cpp
+40
-40
FeedbackPsTst.cpp
worker/src/RTC/RTCP/FeedbackPsTst.cpp
+2
-2
FeedbackRtpTmmb.cpp
worker/src/RTC/RTCP/FeedbackRtpTmmb.cpp
+2
-2
Sdes.cpp
worker/src/RTC/RTCP/Sdes.cpp
+13
-13
没有找到文件。
worker/include/RTC/RTCP/Feedback.hpp
浏览文件 @
ee6f4e8c
...
@@ -54,7 +54,7 @@ namespace RTC { namespace RTCP
...
@@ -54,7 +54,7 @@ namespace RTC { namespace RTCP
class
FeedbackPs
class
FeedbackPs
{
{
public
:
public
:
typedef
enum
MessageType
:
uint8_t
enum
class
MessageType
:
uint8_t
{
{
PLI
=
1
,
PLI
=
1
,
SLI
=
2
,
SLI
=
2
,
...
@@ -67,13 +67,13 @@ namespace RTC { namespace RTCP
...
@@ -67,13 +67,13 @@ namespace RTC { namespace RTCP
ROI
=
9
,
ROI
=
9
,
AFB
=
15
,
AFB
=
15
,
EXT
=
31
EXT
=
31
}
MessageType
;
};
};
};
class
FeedbackRtp
class
FeedbackRtp
{
{
public
:
public
:
typedef
enum
MessageType
:
uint8_t
enum
class
MessageType
:
uint8_t
{
{
NACK
=
1
,
NACK
=
1
,
TMMBR
=
3
,
TMMBR
=
3
,
...
@@ -84,7 +84,7 @@ namespace RTC { namespace RTCP
...
@@ -84,7 +84,7 @@ namespace RTC { namespace RTCP
ECN
=
8
,
ECN
=
8
,
PS
=
9
,
PS
=
9
,
EXT
=
31
EXT
=
31
}
MessageType
;
};
};
};
typedef
FeedbackPacket
<
FeedbackPs
>
FeedbackPsPacket
;
typedef
FeedbackPacket
<
FeedbackPs
>
FeedbackPsPacket
;
...
...
worker/include/RTC/RTCP/FeedbackPsAfb.hpp
浏览文件 @
ee6f4e8c
...
@@ -43,7 +43,7 @@ namespace RTC { namespace RTCP
...
@@ -43,7 +43,7 @@ namespace RTC { namespace RTCP
inline
inline
FeedbackPsAfbPacket
::
FeedbackPsAfbPacket
(
uint32_t
sender_ssrc
,
uint32_t
media_ssrc
)
:
FeedbackPsAfbPacket
::
FeedbackPsAfbPacket
(
uint32_t
sender_ssrc
,
uint32_t
media_ssrc
)
:
FeedbackPsPacket
(
FeedbackPs
::
AFB
,
sender_ssrc
,
media_ssrc
)
FeedbackPsPacket
(
FeedbackPs
::
MessageType
::
AFB
,
sender_ssrc
,
media_ssrc
)
{}
{}
inline
inline
...
...
worker/include/RTC/RTCP/FeedbackPsFir.hpp
浏览文件 @
ee6f4e8c
...
@@ -30,7 +30,7 @@ namespace RTC { namespace RTCP
...
@@ -30,7 +30,7 @@ namespace RTC { namespace RTCP
};
};
public
:
public
:
static
const
FeedbackPs
::
MessageType
MessageType
=
FeedbackPs
::
FIR
;
static
const
FeedbackPs
::
MessageType
MessageType
=
FeedbackPs
::
MessageType
::
FIR
;
public
:
public
:
static
FeedbackPsFirItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
static
FeedbackPsFirItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
...
...
worker/include/RTC/RTCP/FeedbackPsLei.hpp
浏览文件 @
ee6f4e8c
...
@@ -25,7 +25,7 @@ namespace RTC { namespace RTCP
...
@@ -25,7 +25,7 @@ namespace RTC { namespace RTCP
};
};
public
:
public
:
static
const
FeedbackPs
::
MessageType
MessageType
=
FeedbackPs
::
PSLEI
;
static
const
FeedbackPs
::
MessageType
MessageType
=
FeedbackPs
::
MessageType
::
PSLEI
;
public
:
public
:
static
FeedbackPsLeiItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
static
FeedbackPsLeiItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
...
...
worker/include/RTC/RTCP/FeedbackPsPli.hpp
浏览文件 @
ee6f4e8c
...
@@ -31,7 +31,7 @@ namespace RTC { namespace RTCP
...
@@ -31,7 +31,7 @@ namespace RTC { namespace RTCP
inline
inline
FeedbackPsPliPacket
::
FeedbackPsPliPacket
(
uint32_t
sender_ssrc
,
uint32_t
media_ssrc
)
:
FeedbackPsPliPacket
::
FeedbackPsPliPacket
(
uint32_t
sender_ssrc
,
uint32_t
media_ssrc
)
:
FeedbackPsPacket
(
FeedbackPs
::
PLI
,
sender_ssrc
,
media_ssrc
)
FeedbackPsPacket
(
FeedbackPs
::
MessageType
::
PLI
,
sender_ssrc
,
media_ssrc
)
{}
{}
}}
}}
...
...
worker/include/RTC/RTCP/FeedbackPsRpsi.hpp
浏览文件 @
ee6f4e8c
...
@@ -35,7 +35,7 @@ namespace RTC { namespace RTCP
...
@@ -35,7 +35,7 @@ namespace RTC { namespace RTCP
};
};
public
:
public
:
static
const
FeedbackPs
::
MessageType
MessageType
=
FeedbackPs
::
RPSI
;
static
const
FeedbackPs
::
MessageType
MessageType
=
FeedbackPs
::
MessageType
::
RPSI
;
public
:
public
:
static
FeedbackPsRpsiItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
static
FeedbackPsRpsiItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
...
...
worker/include/RTC/RTCP/FeedbackPsSli.hpp
浏览文件 @
ee6f4e8c
...
@@ -25,7 +25,7 @@ namespace RTC { namespace RTCP
...
@@ -25,7 +25,7 @@ namespace RTC { namespace RTCP
};
};
public
:
public
:
static
const
FeedbackPs
::
MessageType
MessageType
=
FeedbackPs
::
SLI
;
static
const
FeedbackPs
::
MessageType
MessageType
=
FeedbackPs
::
MessageType
::
SLI
;
public
:
public
:
static
FeedbackPsSliItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
static
FeedbackPsSliItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
...
...
worker/include/RTC/RTCP/FeedbackPsVbcm.hpp
浏览文件 @
ee6f4e8c
...
@@ -36,7 +36,7 @@ namespace RTC { namespace RTCP
...
@@ -36,7 +36,7 @@ namespace RTC { namespace RTCP
};
};
public
:
public
:
static
const
FeedbackPs
::
MessageType
MessageType
=
FeedbackPs
::
FIR
;
static
const
FeedbackPs
::
MessageType
MessageType
=
FeedbackPs
::
MessageType
::
FIR
;
public
:
public
:
static
FeedbackPsVbcmItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
static
FeedbackPsVbcmItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
...
...
worker/include/RTC/RTCP/FeedbackRtpEcn.hpp
浏览文件 @
ee6f4e8c
...
@@ -42,7 +42,7 @@ namespace RTC { namespace RTCP
...
@@ -42,7 +42,7 @@ namespace RTC { namespace RTCP
};
};
public
:
public
:
static
const
FeedbackRtp
::
MessageType
MessageType
=
FeedbackRtp
::
ECN
;
static
const
FeedbackRtp
::
MessageType
MessageType
=
FeedbackRtp
::
MessageType
::
ECN
;
public
:
public
:
static
FeedbackRtpEcnItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
static
FeedbackRtpEcnItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
...
...
worker/include/RTC/RTCP/FeedbackRtpNack.hpp
浏览文件 @
ee6f4e8c
...
@@ -26,7 +26,7 @@ namespace RTC { namespace RTCP
...
@@ -26,7 +26,7 @@ namespace RTC { namespace RTCP
};
};
public
:
public
:
static
const
FeedbackRtp
::
MessageType
MessageType
=
FeedbackRtp
::
NACK
;
static
const
FeedbackRtp
::
MessageType
MessageType
=
FeedbackRtp
::
MessageType
::
NACK
;
public
:
public
:
static
FeedbackRtpNackItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
static
FeedbackRtpNackItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
...
...
worker/include/RTC/RTCP/FeedbackRtpSrReq.hpp
浏览文件 @
ee6f4e8c
...
@@ -30,7 +30,7 @@ namespace RTC { namespace RTCP
...
@@ -30,7 +30,7 @@ namespace RTC { namespace RTCP
inline
inline
FeedbackRtpSrReqPacket
::
FeedbackRtpSrReqPacket
(
uint32_t
sender_ssrc
,
uint32_t
media_ssrc
)
:
FeedbackRtpSrReqPacket
::
FeedbackRtpSrReqPacket
(
uint32_t
sender_ssrc
,
uint32_t
media_ssrc
)
:
FeedbackRtpPacket
(
FeedbackRtp
::
SR_REQ
,
sender_ssrc
,
media_ssrc
)
FeedbackRtpPacket
(
FeedbackRtp
::
MessageType
::
SR_REQ
,
sender_ssrc
,
media_ssrc
)
{}
{}
}}
}}
...
...
worker/include/RTC/RTCP/FeedbackRtpTllei.hpp
浏览文件 @
ee6f4e8c
...
@@ -26,7 +26,7 @@ namespace RTC { namespace RTCP
...
@@ -26,7 +26,7 @@ namespace RTC { namespace RTCP
};
};
public
:
public
:
static
const
FeedbackRtp
::
MessageType
MessageType
=
FeedbackRtp
::
TLLEI
;
static
const
FeedbackRtp
::
MessageType
MessageType
=
FeedbackRtp
::
MessageType
::
TLLEI
;
public
:
public
:
static
FeedbackRtpTlleiItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
static
FeedbackRtpTlleiItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
...
...
worker/include/RTC/RTCP/Sdes.hpp
浏览文件 @
ee6f4e8c
...
@@ -13,7 +13,7 @@ namespace RTC { namespace RTCP
...
@@ -13,7 +13,7 @@ namespace RTC { namespace RTCP
class
SdesItem
class
SdesItem
{
{
public
:
public
:
typedef
enum
Type
:
uint8_t
enum
class
Type
:
uint8_t
{
{
END
=
0
,
END
=
0
,
CNAME
,
CNAME
,
...
@@ -24,24 +24,24 @@ namespace RTC { namespace RTCP
...
@@ -24,24 +24,24 @@ namespace RTC { namespace RTCP
TOOL
,
TOOL
,
NOTE
,
NOTE
,
PRIV
PRIV
}
Type
;
};
private
:
private
:
struct
Header
struct
Header
{
{
uint8_t
type
;
SdesItem
::
Type
type
;
uint8_t
length
;
uint8_t
length
;
char
value
[];
char
value
[];
};
};
public
:
public
:
static
SdesItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
static
SdesItem
*
Parse
(
const
uint8_t
*
data
,
size_t
len
);
static
const
std
::
string
&
Type2String
(
Type
type
);
static
const
std
::
string
&
Type2String
(
SdesItem
::
Type
type
);
public
:
public
:
explicit
SdesItem
(
Header
*
header
);
explicit
SdesItem
(
Header
*
header
);
explicit
SdesItem
(
SdesItem
*
item
);
explicit
SdesItem
(
SdesItem
*
item
);
SdesItem
(
Type
type
,
size_t
len
,
const
char
*
value
);
SdesItem
(
SdesItem
::
Type
type
,
size_t
len
,
const
char
*
value
);
~
SdesItem
();
~
SdesItem
();
void
Dump
()
const
;
void
Dump
()
const
;
...
@@ -143,7 +143,7 @@ namespace RTC { namespace RTCP
...
@@ -143,7 +143,7 @@ namespace RTC { namespace RTCP
inline
inline
SdesItem
::
Type
SdesItem
::
GetType
()
const
SdesItem
::
Type
SdesItem
::
GetType
()
const
{
{
return
(
SdesItem
::
Type
)
this
->
header
->
type
;
return
this
->
header
->
type
;
}
}
inline
inline
...
@@ -235,7 +235,7 @@ namespace RTC { namespace RTCP
...
@@ -235,7 +235,7 @@ namespace RTC { namespace RTCP
inline
inline
SdesPacket
::
SdesPacket
()
SdesPacket
::
SdesPacket
()
:
Packet
(
Type
::
SDES
)
:
Packet
(
RTCP
::
Type
::
SDES
)
{}
{}
inline
inline
...
...
worker/src/RTC/Peer.cpp
浏览文件 @
ee6f4e8c
...
@@ -790,11 +790,11 @@ namespace RTC
...
@@ -790,11 +790,11 @@ namespace RTC
switch
(
feedback
->
GetMessageType
())
switch
(
feedback
->
GetMessageType
())
{
{
case
RTCP
:
:
FeedbackPs
::
PLI
:
case
RTCP
:
:
FeedbackPs
::
MessageType
::
PLI
:
case
RTCP
:
:
FeedbackPs
::
SLI
:
case
RTCP
:
:
FeedbackPs
::
MessageType
::
SLI
:
case
RTCP
:
:
FeedbackPs
::
RPSI
:
case
RTCP
:
:
FeedbackPs
::
MessageType
::
RPSI
:
case
RTCP
:
:
FeedbackPs
::
FIR
:
case
RTCP
:
:
FeedbackPs
::
MessageType
::
FIR
:
case
RTCP
:
:
FeedbackPs
::
AFB
:
case
RTCP
:
:
FeedbackPs
::
MessageType
::
AFB
:
{
{
RTC
::
RtpSender
*
rtpSender
=
this
->
GetRtpSender
(
feedback
->
GetMediaSsrc
());
RTC
::
RtpSender
*
rtpSender
=
this
->
GetRtpSender
(
feedback
->
GetMediaSsrc
());
...
@@ -811,12 +811,12 @@ namespace RTC
...
@@ -811,12 +811,12 @@ namespace RTC
break
;
break
;
}
}
case
RTCP
:
:
FeedbackPs
::
TSTR
:
case
RTCP
:
:
FeedbackPs
::
MessageType
::
TSTR
:
case
RTCP
:
:
FeedbackPs
::
TSTN
:
case
RTCP
:
:
FeedbackPs
::
MessageType
::
TSTN
:
case
RTCP
:
:
FeedbackPs
::
VBCM
:
case
RTCP
:
:
FeedbackPs
::
MessageType
::
VBCM
:
case
RTCP
:
:
FeedbackPs
::
PSLEI
:
case
RTCP
:
:
FeedbackPs
::
MessageType
::
PSLEI
:
case
RTCP
:
:
FeedbackPs
::
ROI
:
case
RTCP
:
:
FeedbackPs
::
MessageType
::
ROI
:
case
RTCP
:
:
FeedbackPs
::
EXT
:
case
RTCP
:
:
FeedbackPs
::
MessageType
::
EXT
:
default
:
default
:
{
{
MS_WARN_TAG
(
rtcp
,
"ignoring Feedback packet '%s' [sender_ssrc:%"
PRIu32
", media_ssrc:%"
PRIu32
"]"
,
MS_WARN_TAG
(
rtcp
,
"ignoring Feedback packet '%s' [sender_ssrc:%"
PRIu32
", media_ssrc:%"
PRIu32
"]"
,
...
@@ -835,7 +835,7 @@ namespace RTC
...
@@ -835,7 +835,7 @@ namespace RTC
switch
(
feedback
->
GetMessageType
())
switch
(
feedback
->
GetMessageType
())
{
{
case
RTCP
:
:
FeedbackRtp
::
NACK
:
case
RTCP
:
:
FeedbackRtp
::
MessageType
::
NACK
:
{
{
RTC
::
RtpSender
*
rtpSender
=
this
->
GetRtpSender
(
feedback
->
GetMediaSsrc
());
RTC
::
RtpSender
*
rtpSender
=
this
->
GetRtpSender
(
feedback
->
GetMediaSsrc
());
...
@@ -854,14 +854,14 @@ namespace RTC
...
@@ -854,14 +854,14 @@ namespace RTC
break
;
break
;
}
}
case
RTCP
:
:
FeedbackRtp
::
TMMBR
:
case
RTCP
:
:
FeedbackRtp
::
MessageType
::
TMMBR
:
case
RTCP
:
:
FeedbackRtp
::
TMMBN
:
case
RTCP
:
:
FeedbackRtp
::
MessageType
::
TMMBN
:
case
RTCP
:
:
FeedbackRtp
::
SR_REQ
:
case
RTCP
:
:
FeedbackRtp
::
MessageType
::
SR_REQ
:
case
RTCP
:
:
FeedbackRtp
::
RAMS
:
case
RTCP
:
:
FeedbackRtp
::
MessageType
::
RAMS
:
case
RTCP
:
:
FeedbackRtp
::
TLLEI
:
case
RTCP
:
:
FeedbackRtp
::
MessageType
::
TLLEI
:
case
RTCP
:
:
FeedbackRtp
::
ECN
:
case
RTCP
:
:
FeedbackRtp
::
MessageType
::
ECN
:
case
RTCP
:
:
FeedbackRtp
::
PS
:
case
RTCP
:
:
FeedbackRtp
::
MessageType
::
PS
:
case
RTCP
:
:
FeedbackRtp
::
EXT
:
case
RTCP
:
:
FeedbackRtp
::
MessageType
::
EXT
:
default
:
default
:
{
{
MS_WARN_TAG
(
rtcp
,
"ignoring unsupported Feedback packet '%s' [sender_ssrc:%"
PRIu32
", media_ssrc:%"
PRIu32
"]"
,
MS_WARN_TAG
(
rtcp
,
"ignoring unsupported Feedback packet '%s' [sender_ssrc:%"
PRIu32
", media_ssrc:%"
PRIu32
"]"
,
...
...
worker/src/RTC/RTCP/Feedback.cpp
浏览文件 @
ee6f4e8c
...
@@ -96,17 +96,17 @@ namespace RTC { namespace RTCP
...
@@ -96,17 +96,17 @@ namespace RTC { namespace RTCP
template
<>
template
<>
std
::
map
<
FeedbackPs
::
MessageType
,
std
::
string
>
FeedbackPacket
<
FeedbackPs
>::
type2String
=
std
::
map
<
FeedbackPs
::
MessageType
,
std
::
string
>
FeedbackPacket
<
FeedbackPs
>::
type2String
=
{
{
{
FeedbackPs
::
PLI
,
"PLI"
},
{
FeedbackPs
::
MessageType
::
PLI
,
"PLI"
},
{
FeedbackPs
::
SLI
,
"SLI"
},
{
FeedbackPs
::
MessageType
::
SLI
,
"SLI"
},
{
FeedbackPs
::
RPSI
,
"RPSI"
},
{
FeedbackPs
::
MessageType
::
RPSI
,
"RPSI"
},
{
FeedbackPs
::
FIR
,
"FIR"
},
{
FeedbackPs
::
MessageType
::
FIR
,
"FIR"
},
{
FeedbackPs
::
TSTR
,
"TSTR"
},
{
FeedbackPs
::
MessageType
::
TSTR
,
"TSTR"
},
{
FeedbackPs
::
TSTN
,
"TSTN"
},
{
FeedbackPs
::
MessageType
::
TSTN
,
"TSTN"
},
{
FeedbackPs
::
VBCM
,
"VBCM"
},
{
FeedbackPs
::
MessageType
::
VBCM
,
"VBCM"
},
{
FeedbackPs
::
PSLEI
,
"PSLEI"
},
{
FeedbackPs
::
MessageType
::
PSLEI
,
"PSLEI"
},
{
FeedbackPs
::
ROI
,
"ROI"
},
{
FeedbackPs
::
MessageType
::
ROI
,
"ROI"
},
{
FeedbackPs
::
AFB
,
"AFB"
},
{
FeedbackPs
::
MessageType
::
AFB
,
"AFB"
},
{
FeedbackPs
::
EXT
,
"EXT"
}
{
FeedbackPs
::
MessageType
::
EXT
,
"EXT"
}
};
};
template
<>
template
<>
...
@@ -126,46 +126,46 @@ namespace RTC { namespace RTCP
...
@@ -126,46 +126,46 @@ namespace RTC { namespace RTCP
switch
(
FeedbackPs
::
MessageType
(
commonHeader
->
count
))
switch
(
FeedbackPs
::
MessageType
(
commonHeader
->
count
))
{
{
case
FeedbackPs
:
:
PLI
:
case
FeedbackPs
:
:
MessageType
::
PLI
:
packet
=
FeedbackPsPliPacket
::
Parse
(
data
,
len
);
packet
=
FeedbackPsPliPacket
::
Parse
(
data
,
len
);
break
;
break
;
case
FeedbackPs
:
:
SLI
:
case
FeedbackPs
:
:
MessageType
::
SLI
:
packet
=
FeedbackPsSliPacket
::
Parse
(
data
,
len
);
packet
=
FeedbackPsSliPacket
::
Parse
(
data
,
len
);
break
;
break
;
case
FeedbackPs
:
:
RPSI
:
case
FeedbackPs
:
:
MessageType
::
RPSI
:
packet
=
FeedbackPsRpsiPacket
::
Parse
(
data
,
len
);
packet
=
FeedbackPsRpsiPacket
::
Parse
(
data
,
len
);
break
;
break
;
case
FeedbackPs
:
:
FIR
:
case
FeedbackPs
:
:
MessageType
::
FIR
:
packet
=
FeedbackPsFirPacket
::
Parse
(
data
,
len
);
packet
=
FeedbackPsFirPacket
::
Parse
(
data
,
len
);
break
;
break
;
case
FeedbackPs
:
:
TSTR
:
case
FeedbackPs
:
:
MessageType
::
TSTR
:
packet
=
FeedbackPsTstrPacket
::
Parse
(
data
,
len
);
packet
=
FeedbackPsTstrPacket
::
Parse
(
data
,
len
);
break
;
break
;
case
FeedbackPs
:
:
TSTN
:
case
FeedbackPs
:
:
MessageType
::
TSTN
:
packet
=
FeedbackPsTstnPacket
::
Parse
(
data
,
len
);
packet
=
FeedbackPsTstnPacket
::
Parse
(
data
,
len
);
break
;
break
;
case
FeedbackPs
:
:
VBCM
:
case
FeedbackPs
:
:
MessageType
::
VBCM
:
packet
=
FeedbackPsVbcmPacket
::
Parse
(
data
,
len
);
packet
=
FeedbackPsVbcmPacket
::
Parse
(
data
,
len
);
break
;
break
;
case
FeedbackPs
:
:
PSLEI
:
case
FeedbackPs
:
:
MessageType
::
PSLEI
:
packet
=
FeedbackPsLeiPacket
::
Parse
(
data
,
len
);
packet
=
FeedbackPsLeiPacket
::
Parse
(
data
,
len
);
break
;
break
;
case
FeedbackPs
:
:
ROI
:
case
FeedbackPs
:
:
MessageType
::
ROI
:
break
;
break
;
case
FeedbackPs
:
:
AFB
:
case
FeedbackPs
:
:
MessageType
::
AFB
:
packet
=
FeedbackPsAfbPacket
::
Parse
(
data
,
len
);
packet
=
FeedbackPsAfbPacket
::
Parse
(
data
,
len
);
break
;
break
;
case
FeedbackPs
:
:
EXT
:
case
FeedbackPs
:
:
MessageType
::
EXT
:
break
;
break
;
default
:
default
:
...
@@ -183,15 +183,15 @@ namespace RTC { namespace RTCP
...
@@ -183,15 +183,15 @@ namespace RTC { namespace RTCP
template
<>
template
<>
std
::
map
<
FeedbackRtp
::
MessageType
,
std
::
string
>
FeedbackPacket
<
FeedbackRtp
>::
type2String
=
std
::
map
<
FeedbackRtp
::
MessageType
,
std
::
string
>
FeedbackPacket
<
FeedbackRtp
>::
type2String
=
{
{
{
FeedbackRtp
::
NACK
,
"NACK"
},
{
FeedbackRtp
::
MessageType
::
NACK
,
"NACK"
},
{
FeedbackRtp
::
TMMBR
,
"TMMBR"
},
{
FeedbackRtp
::
MessageType
::
TMMBR
,
"TMMBR"
},
{
FeedbackRtp
::
TMMBN
,
"TMMBN"
},
{
FeedbackRtp
::
MessageType
::
TMMBN
,
"TMMBN"
},
{
FeedbackRtp
::
SR_REQ
,
"SR_REQ"
},
{
FeedbackRtp
::
MessageType
::
SR_REQ
,
"SR_REQ"
},
{
FeedbackRtp
::
RAMS
,
"RAMS"
},
{
FeedbackRtp
::
MessageType
::
RAMS
,
"RAMS"
},
{
FeedbackRtp
::
TLLEI
,
"TLLEI"
},
{
FeedbackRtp
::
MessageType
::
TLLEI
,
"TLLEI"
},
{
FeedbackRtp
::
ECN
,
"ECN"
},
{
FeedbackRtp
::
MessageType
::
ECN
,
"ECN"
},
{
FeedbackRtp
::
PS
,
"PS"
},
{
FeedbackRtp
::
MessageType
::
PS
,
"PS"
},
{
FeedbackRtp
::
EXT
,
"EXT"
}
{
FeedbackRtp
::
MessageType
::
EXT
,
"EXT"
}
};
};
/* Class methods. */
/* Class methods. */
...
@@ -213,37 +213,37 @@ namespace RTC { namespace RTCP
...
@@ -213,37 +213,37 @@ namespace RTC { namespace RTCP
switch
(
FeedbackRtp
::
MessageType
(
commonHeader
->
count
))
switch
(
FeedbackRtp
::
MessageType
(
commonHeader
->
count
))
{
{
case
FeedbackRtp
:
:
NACK
:
case
FeedbackRtp
:
:
MessageType
::
NACK
:
packet
=
FeedbackRtpNackPacket
::
Parse
(
data
,
len
);
packet
=
FeedbackRtpNackPacket
::
Parse
(
data
,
len
);
break
;
break
;
case
FeedbackRtp
:
:
TMMBR
:
case
FeedbackRtp
:
:
MessageType
::
TMMBR
:
packet
=
FeedbackRtpTmmbrPacket
::
Parse
(
data
,
len
);
packet
=
FeedbackRtpTmmbrPacket
::
Parse
(
data
,
len
);
break
;
break
;
case
FeedbackRtp
:
:
TMMBN
:
case
FeedbackRtp
:
:
MessageType
::
TMMBN
:
packet
=
FeedbackRtpTmmbnPacket
::
Parse
(
data
,
len
);
packet
=
FeedbackRtpTmmbnPacket
::
Parse
(
data
,
len
);
break
;
break
;
case
FeedbackRtp
:
:
SR_REQ
:
case
FeedbackRtp
:
:
MessageType
::
SR_REQ
:
packet
=
FeedbackRtpSrReqPacket
::
Parse
(
data
,
len
);
packet
=
FeedbackRtpSrReqPacket
::
Parse
(
data
,
len
);
break
;
break
;
case
FeedbackRtp
:
:
RAMS
:
case
FeedbackRtp
:
:
MessageType
::
RAMS
:
break
;
break
;
case
FeedbackRtp
:
:
TLLEI
:
case
FeedbackRtp
:
:
MessageType
::
TLLEI
:
packet
=
FeedbackRtpTlleiPacket
::
Parse
(
data
,
len
);
packet
=
FeedbackRtpTlleiPacket
::
Parse
(
data
,
len
);
break
;
break
;
case
FeedbackRtp
:
:
ECN
:
case
FeedbackRtp
:
:
MessageType
::
ECN
:
packet
=
FeedbackRtpEcnPacket
::
Parse
(
data
,
len
);
packet
=
FeedbackRtpEcnPacket
::
Parse
(
data
,
len
);
break
;
break
;
case
FeedbackRtp
:
:
PS
:
case
FeedbackRtp
:
:
MessageType
::
PS
:
break
;
break
;
case
FeedbackRtp
:
:
EXT
:
case
FeedbackRtp
:
:
MessageType
::
EXT
:
break
;
break
;
default
:
default
:
...
...
worker/src/RTC/RTCP/FeedbackPsTst.cpp
浏览文件 @
ee6f4e8c
...
@@ -68,12 +68,12 @@ namespace RTC { namespace RTCP
...
@@ -68,12 +68,12 @@ namespace RTC { namespace RTCP
/* Specialization for Tstr class. */
/* Specialization for Tstr class. */
template
<>
template
<>
const
FeedbackPs
::
MessageType
FeedbackPsTstItem
<
Tstr
>::
MessageType
=
FeedbackPs
::
TSTR
;
const
FeedbackPs
::
MessageType
FeedbackPsTstItem
<
Tstr
>::
MessageType
=
FeedbackPs
::
MessageType
::
TSTR
;
/* Specialization for Tstn class. */
/* Specialization for Tstn class. */
template
<>
template
<>
const
FeedbackPs
::
MessageType
FeedbackPsTstItem
<
Tstn
>::
MessageType
=
FeedbackPs
::
TSTN
;
const
FeedbackPs
::
MessageType
FeedbackPsTstItem
<
Tstn
>::
MessageType
=
FeedbackPs
::
MessageType
::
TSTN
;
// Explicit instantiation to have all definitions in this file.
// Explicit instantiation to have all definitions in this file.
template
class
FeedbackPsTstItem
<
Tstr
>
;
template
class
FeedbackPsTstItem
<
Tstr
>
;
...
...
worker/src/RTC/RTCP/FeedbackRtpTmmb.cpp
浏览文件 @
ee6f4e8c
...
@@ -91,12 +91,12 @@ namespace RTC { namespace RTCP
...
@@ -91,12 +91,12 @@ namespace RTC { namespace RTCP
/* Specialization for Tmmbr class. */
/* Specialization for Tmmbr class. */
template
<>
template
<>
const
FeedbackRtp
::
MessageType
FeedbackRtpTmmbItem
<
FeedbackRtpTmmbr
>::
MessageType
=
FeedbackRtp
::
TMMBR
;
const
FeedbackRtp
::
MessageType
FeedbackRtpTmmbItem
<
FeedbackRtpTmmbr
>::
MessageType
=
FeedbackRtp
::
MessageType
::
TMMBR
;
/* Specialization for Tmmbn class. */
/* Specialization for Tmmbn class. */
template
<>
template
<>
const
FeedbackRtp
::
MessageType
FeedbackRtpTmmbItem
<
FeedbackRtpTmmbn
>::
MessageType
=
FeedbackRtp
::
TMMBN
;
const
FeedbackRtp
::
MessageType
FeedbackRtpTmmbItem
<
FeedbackRtpTmmbn
>::
MessageType
=
FeedbackRtp
::
MessageType
::
TMMBN
;
// Explicit instantiation to have all FeedbackRtpTmmbItem definitions in this file.
// Explicit instantiation to have all FeedbackRtpTmmbItem definitions in this file.
template
class
FeedbackRtpTmmbItem
<
FeedbackRtpTmmbr
>
;
template
class
FeedbackRtpTmmbItem
<
FeedbackRtpTmmbr
>
;
...
...
worker/src/RTC/RTCP/Sdes.cpp
浏览文件 @
ee6f4e8c
...
@@ -12,15 +12,15 @@ namespace RTC { namespace RTCP
...
@@ -12,15 +12,15 @@ namespace RTC { namespace RTCP
std
::
map
<
SdesItem
::
Type
,
std
::
string
>
SdesItem
::
type2String
=
std
::
map
<
SdesItem
::
Type
,
std
::
string
>
SdesItem
::
type2String
=
{
{
{
END
,
"END"
},
{
SdesItem
::
Type
::
END
,
"END"
},
{
CNAME
,
"CNAME"
},
{
SdesItem
::
Type
::
CNAME
,
"CNAME"
},
{
NAME
,
"NAME"
},
{
SdesItem
::
Type
::
NAME
,
"NAME"
},
{
EMAIL
,
"EMAIL"
},
{
SdesItem
::
Type
::
EMAIL
,
"EMAIL"
},
{
PHONE
,
"PHONE"
},
{
SdesItem
::
Type
::
PHONE
,
"PHONE"
},
{
LOC
,
"LOC"
},
{
SdesItem
::
Type
::
LOC
,
"LOC"
},
{
TOOL
,
"TOOL"
},
{
SdesItem
::
Type
::
TOOL
,
"TOOL"
},
{
NOTE
,
"NOTE"
},
{
SdesItem
::
Type
::
NOTE
,
"NOTE"
},
{
PRIV
,
"PRIV"
}
{
SdesItem
::
Type
::
PRIV
,
"PRIV"
}
};
};
/* Class methods. */
/* Class methods. */
...
@@ -43,7 +43,7 @@ namespace RTC { namespace RTCP
...
@@ -43,7 +43,7 @@ namespace RTC { namespace RTCP
return
new
SdesItem
(
header
);
return
new
SdesItem
(
header
);
}
}
const
std
::
string
&
SdesItem
::
Type2String
(
Type
type
)
const
std
::
string
&
SdesItem
::
Type2String
(
SdesItem
::
Type
type
)
{
{
static
const
std
::
string
unknown
(
"UNKNOWN"
);
static
const
std
::
string
unknown
(
"UNKNOWN"
);
...
@@ -55,7 +55,7 @@ namespace RTC { namespace RTCP
...
@@ -55,7 +55,7 @@ namespace RTC { namespace RTCP
/* Instance methods. */
/* Instance methods. */
SdesItem
::
SdesItem
(
Type
type
,
size_t
len
,
const
char
*
value
)
SdesItem
::
SdesItem
(
SdesItem
::
Type
type
,
size_t
len
,
const
char
*
value
)
{
{
MS_TRACE
();
MS_TRACE
();
...
@@ -77,7 +77,7 @@ namespace RTC { namespace RTCP
...
@@ -77,7 +77,7 @@ namespace RTC { namespace RTCP
MS_TRACE
();
MS_TRACE
();
MS_DUMP
(
"<SdesItem>"
);
MS_DUMP
(
"<SdesItem>"
);
MS_DUMP
(
" type : %s"
,
Type2String
(
this
->
GetType
()).
c_str
());
MS_DUMP
(
" type : %s"
,
SdesItem
::
Type2String
(
this
->
GetType
()).
c_str
());
MS_DUMP
(
" length : %"
PRIu8
,
this
->
header
->
length
);
MS_DUMP
(
" length : %"
PRIu8
,
this
->
header
->
length
);
MS_DUMP
(
" value : %.*s"
,
this
->
header
->
length
,
this
->
header
->
value
);
MS_DUMP
(
" value : %.*s"
,
this
->
header
->
length
,
this
->
header
->
value
);
MS_DUMP
(
"</SdesItem>"
);
MS_DUMP
(
"</SdesItem>"
);
...
@@ -119,7 +119,7 @@ namespace RTC { namespace RTCP
...
@@ -119,7 +119,7 @@ namespace RTC { namespace RTCP
SdesItem
*
item
=
SdesItem
::
Parse
(
data
+
offset
,
len
-
offset
);
SdesItem
*
item
=
SdesItem
::
Parse
(
data
+
offset
,
len
-
offset
);
if
(
item
)
if
(
item
)
{
{
if
(
item
->
GetType
()
==
SdesItem
::
END
)
if
(
item
->
GetType
()
==
SdesItem
::
Type
::
END
)
return
chunk
.
release
();
return
chunk
.
release
();
chunk
->
AddItem
(
item
);
chunk
->
AddItem
(
item
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论