Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
ee7e1728
提交
ee7e1728
authored
7月 24, 2022
作者:
Nazar Mokrynskyi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refactor request and notification handlers to conform to the same API (part 2)
上级
4d0ea75c
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
40 行增加
和
18 行删除
+40
-18
Consumer.hpp
worker/include/RTC/Consumer.hpp
+1
-1
DataConsumer.hpp
worker/include/RTC/DataConsumer.hpp
+2
-2
DataProducer.hpp
worker/include/RTC/DataProducer.hpp
+1
-1
DirectTransport.hpp
worker/include/RTC/DirectTransport.hpp
+4
-1
PipeTransport.hpp
worker/include/RTC/PipeTransport.hpp
+4
-1
PlainTransport.hpp
worker/include/RTC/PlainTransport.hpp
+4
-1
Producer.hpp
worker/include/RTC/Producer.hpp
+1
-1
Router.hpp
worker/include/RTC/Router.hpp
+3
-3
Transport.hpp
worker/include/RTC/Transport.hpp
+15
-5
WebRtcServer.hpp
worker/include/RTC/WebRtcServer.hpp
+1
-1
WebRtcTransport.hpp
worker/include/RTC/WebRtcTransport.hpp
+4
-1
没有找到文件。
worker/include/RTC/Consumer.hpp
浏览文件 @
ee7e1728
...
...
@@ -24,7 +24,7 @@ using json = nlohmann::json;
namespace
RTC
{
class
Consumer
:
Channel
::
ChannelSocket
::
RequestHandler
class
Consumer
:
public
Channel
::
ChannelSocket
::
RequestHandler
{
public
:
class
Listener
...
...
worker/include/RTC/DataConsumer.hpp
浏览文件 @
ee7e1728
...
...
@@ -12,8 +12,8 @@
namespace
RTC
{
class
DataConsumer
:
Channel
::
ChannelSocket
::
RequestHandler
,
PayloadChannel
::
PayloadChannelSocket
::
RequestHandler
class
DataConsumer
:
public
Channel
::
ChannelSocket
::
RequestHandler
,
public
PayloadChannel
::
PayloadChannelSocket
::
RequestHandler
{
protected
:
using
onQueuedCallback
=
const
std
::
function
<
void
(
bool
queued
,
bool
sctpSendBufferFull
)
>
;
...
...
worker/include/RTC/DataProducer.hpp
浏览文件 @
ee7e1728
...
...
@@ -10,7 +10,7 @@
namespace
RTC
{
class
DataProducer
:
Channel
::
ChannelSocket
::
RequestHandler
class
DataProducer
:
public
Channel
::
ChannelSocket
::
RequestHandler
{
public
:
class
Listener
...
...
worker/include/RTC/DirectTransport.hpp
浏览文件 @
ee7e1728
...
...
@@ -14,7 +14,6 @@ namespace RTC
public
:
void
FillJson
(
json
&
jsonObject
)
const
override
;
void
FillJsonStats
(
json
&
jsonArray
)
override
;
void
HandleNotification
(
PayloadChannel
::
Notification
*
notification
)
override
;
private
:
bool
IsConnected
()
const
override
;
...
...
@@ -38,6 +37,10 @@ namespace RTC
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
/* Methods inherited from PayloadChannel::PayloadChannelSocket::NotificationHandler. */
public
:
void
HandleNotification
(
PayloadChannel
::
Notification
*
notification
)
override
;
private
:
// Allocated by this.
uint8_t
*
buffer
{
nullptr
};
...
...
worker/include/RTC/PipeTransport.hpp
浏览文件 @
ee7e1728
...
...
@@ -29,12 +29,15 @@ namespace RTC
public
:
void
FillJson
(
json
&
jsonObject
)
const
override
;
void
FillJsonStats
(
json
&
jsonArray
)
override
;
void
HandleNotification
(
PayloadChannel
::
Notification
*
notification
)
override
;
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
/* Methods inherited from PayloadChannel::PayloadChannelSocket::NotificationHandler. */
public
:
void
HandleNotification
(
PayloadChannel
::
Notification
*
notification
)
override
;
private
:
bool
IsConnected
()
const
override
;
bool
HasSrtp
()
const
;
...
...
worker/include/RTC/PlainTransport.hpp
浏览文件 @
ee7e1728
...
...
@@ -29,12 +29,15 @@ namespace RTC
public
:
void
FillJson
(
json
&
jsonObject
)
const
override
;
void
FillJsonStats
(
json
&
jsonArray
)
override
;
void
HandleNotification
(
PayloadChannel
::
Notification
*
notification
)
override
;
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
/* Methods inherited from PayloadChannel::PayloadChannelSocket::NotificationHandler. */
public
:
void
HandleNotification
(
PayloadChannel
::
Notification
*
notification
)
override
;
private
:
bool
IsConnected
()
const
override
;
bool
HasSrtp
()
const
;
...
...
worker/include/RTC/Producer.hpp
浏览文件 @
ee7e1728
...
...
@@ -23,7 +23,7 @@ namespace RTC
{
class
Producer
:
public
RTC
::
RtpStreamRecv
::
Listener
,
public
RTC
::
KeyFrameRequestManager
::
Listener
,
Channel
::
ChannelSocket
::
RequestHandler
public
Channel
::
ChannelSocket
::
RequestHandler
{
public
:
class
Listener
...
...
worker/include/RTC/Router.hpp
浏览文件 @
ee7e1728
...
...
@@ -24,9 +24,9 @@ using json = nlohmann::json;
namespace
RTC
{
class
Router
:
public
RTC
::
Transport
::
Listener
,
Channel
::
ChannelSocket
::
RequestHandler
,
PayloadChannel
::
PayloadChannelSocket
::
RequestHandler
,
PayloadChannel
::
PayloadChannelSocket
::
NotificationHandler
public
Channel
::
ChannelSocket
::
RequestHandler
,
public
PayloadChannel
::
PayloadChannelSocket
::
RequestHandler
,
public
PayloadChannel
::
PayloadChannelSocket
::
NotificationHandler
{
public
:
class
Listener
...
...
worker/include/RTC/Transport.hpp
浏览文件 @
ee7e1728
...
...
@@ -42,6 +42,9 @@ namespace RTC
public
RTC
::
SctpAssociation
::
Listener
,
public
RTC
::
TransportCongestionControlClient
::
Listener
,
public
RTC
::
TransportCongestionControlServer
::
Listener
,
public
Channel
::
ChannelSocket
::
RequestHandler
,
public
PayloadChannel
::
PayloadChannelSocket
::
RequestHandler
,
public
PayloadChannel
::
PayloadChannelSocket
::
NotificationHandler
,
#ifdef ENABLE_RTC_SENDER_BANDWIDTH_ESTIMATOR
public
RTC
::
SenderBandwidthEstimator
::
Listener
,
#endif
...
...
@@ -125,11 +128,18 @@ namespace RTC
// Subclasses must also invoke the parent Close().
virtual
void
FillJson
(
json
&
jsonObject
)
const
;
virtual
void
FillJsonStats
(
json
&
jsonArray
);
// Subclasses must implement these methods and call the parent's ones to
// handle common requests.
virtual
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
);
virtual
void
HandleRequest
(
PayloadChannel
::
PayloadChannelRequest
*
request
);
virtual
void
HandleNotification
(
PayloadChannel
::
Notification
*
notification
);
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
/* Methods inherited from PayloadChannel::PayloadChannelSocket::RequestHandler. */
public
:
void
HandleRequest
(
PayloadChannel
::
PayloadChannelRequest
*
request
)
override
;
/* Methods inherited from PayloadChannel::PayloadChannelSocket::NotificationHandler. */
public
:
void
HandleNotification
(
PayloadChannel
::
Notification
*
notification
)
override
;
protected
:
// Must be called from the subclass.
...
...
worker/include/RTC/WebRtcServer.hpp
浏览文件 @
ee7e1728
...
...
@@ -21,7 +21,7 @@ namespace RTC
public
RTC
::
TcpServer
::
Listener
,
public
RTC
::
TcpConnection
::
Listener
,
public
RTC
::
WebRtcTransport
::
WebRtcTransportListener
,
Channel
::
ChannelSocket
::
RequestHandler
public
Channel
::
ChannelSocket
::
RequestHandler
{
private
:
struct
ListenInfo
...
...
worker/include/RTC/WebRtcTransport.hpp
浏览文件 @
ee7e1728
...
...
@@ -61,7 +61,6 @@ namespace RTC
public
:
void
FillJson
(
json
&
jsonObject
)
const
override
;
void
FillJsonStats
(
json
&
jsonArray
)
override
;
void
HandleNotification
(
PayloadChannel
::
Notification
*
notification
)
override
;
void
ProcessStunPacketFromWebRtcServer
(
RTC
::
TransportTuple
*
tuple
,
RTC
::
StunPacket
*
packet
);
void
ProcessNonStunPacketFromWebRtcServer
(
RTC
::
TransportTuple
*
tuple
,
const
uint8_t
*
data
,
size_t
len
);
...
...
@@ -71,6 +70,10 @@ namespace RTC
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
/* Methods inherited from PayloadChannel::PayloadChannelSocket::NotificationHandler. */
public
:
void
HandleNotification
(
PayloadChannel
::
Notification
*
notification
)
override
;
private
:
bool
IsConnected
()
const
override
;
void
MayRunDtlsTransport
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论