Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
4f520348
提交
4f520348
authored
7月 24, 2022
作者:
Nazar Mokrynskyi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refactor request and notification handlers to conform to the same API
上级
3d4ef192
隐藏空白字符变更
内嵌
并排
正在显示
22 个修改的文件
包含
141 行增加
和
56 行删除
+141
-56
ChannelSocket.hpp
worker/include/Channel/ChannelSocket.hpp
+11
-4
PayloadChannelSocket.hpp
worker/include/PayloadChannel/PayloadChannelSocket.hpp
+19
-7
Consumer.hpp
worker/include/RTC/Consumer.hpp
+6
-2
DataConsumer.hpp
worker/include/RTC/DataConsumer.hpp
+12
-3
DataProducer.hpp
worker/include/RTC/DataProducer.hpp
+6
-2
DirectTransport.hpp
worker/include/RTC/DirectTransport.hpp
+4
-1
PipeConsumer.hpp
worker/include/RTC/PipeConsumer.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
+8
-2
Router.hpp
worker/include/RTC/Router.hpp
+16
-4
SimpleConsumer.hpp
worker/include/RTC/SimpleConsumer.hpp
+4
-1
SimulcastConsumer.hpp
worker/include/RTC/SimulcastConsumer.hpp
+4
-1
SvcConsumer.hpp
worker/include/RTC/SvcConsumer.hpp
+4
-1
Transport.hpp
worker/include/RTC/Transport.hpp
+1
-0
WebRtcServer.hpp
worker/include/RTC/WebRtcServer.hpp
+6
-2
WebRtcTransport.hpp
worker/include/RTC/WebRtcTransport.hpp
+4
-1
Worker.hpp
worker/include/Worker.hpp
+14
-9
ChannelSocket.cpp
worker/src/Channel/ChannelSocket.cpp
+2
-2
PayloadChannelSocket.cpp
worker/src/PayloadChannel/PayloadChannelSocket.cpp
+4
-4
DataProducer.cpp
worker/src/RTC/DataProducer.cpp
+1
-1
Worker.cpp
worker/src/Worker.cpp
+3
-6
没有找到文件。
worker/include/Channel/ChannelSocket.hpp
浏览文件 @
4f520348
...
...
@@ -51,15 +51,22 @@ namespace Channel
class
ChannelSocket
:
public
ConsumerSocket
::
Listener
{
public
:
class
Listener
class
RequestHandler
{
public
:
virtual
~
RequestHandler
()
=
default
;
public
:
virtual
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
=
0
;
};
class
Listener
:
public
RequestHandler
{
public
:
virtual
~
Listener
()
=
default
;
public
:
virtual
void
OnChannelRequest
(
Channel
::
ChannelSocket
*
channel
,
Channel
::
ChannelRequest
*
request
)
=
0
;
virtual
void
OnChannelClosed
(
Channel
::
ChannelSocket
*
channel
)
=
0
;
virtual
void
OnChannelClosed
(
Channel
::
ChannelSocket
*
channel
)
=
0
;
};
public
:
...
...
worker/include/PayloadChannel/PayloadChannelSocket.hpp
浏览文件 @
4f520348
...
...
@@ -54,18 +54,30 @@ namespace PayloadChannel
class
PayloadChannelSocket
:
public
ConsumerSocket
::
Listener
{
public
:
class
Listener
class
RequestHandler
{
public
:
virtual
~
RequestHandler
()
=
default
;
public
:
virtual
void
HandleRequest
(
PayloadChannel
::
PayloadChannelRequest
*
request
)
=
0
;
};
class
NotificationHandler
{
public
:
virtual
~
NotificationHandler
()
=
default
;
public
:
virtual
void
HandleNotification
(
PayloadChannel
::
Notification
*
notification
)
=
0
;
};
class
Listener
:
public
RequestHandler
,
public
NotificationHandler
{
public
:
virtual
~
Listener
()
=
default
;
public
:
virtual
void
OnPayloadChannelNotification
(
PayloadChannel
::
PayloadChannelSocket
*
payloadChannel
,
PayloadChannel
::
Notification
*
notification
)
=
0
;
virtual
void
OnPayloadChannelRequest
(
PayloadChannel
::
PayloadChannelSocket
*
payloadChannel
,
PayloadChannel
::
PayloadChannelRequest
*
request
)
=
0
;
virtual
void
OnPayloadChannelClosed
(
PayloadChannel
::
PayloadChannelSocket
*
payloadChannel
)
=
0
;
};
...
...
worker/include/RTC/Consumer.hpp
浏览文件 @
4f520348
...
...
@@ -3,6 +3,7 @@
#include "common.hpp"
#include "Channel/ChannelRequest.hpp"
#include "Channel/ChannelSocket.hpp"
#include "RTC/RTCP/CompoundPacket.hpp"
#include "RTC/RTCP/FeedbackPs.hpp"
#include "RTC/RTCP/FeedbackPsFir.hpp"
...
...
@@ -23,7 +24,7 @@ using json = nlohmann::json;
namespace
RTC
{
class
Consumer
class
Consumer
:
Channel
::
ChannelSocket
::
RequestHandler
{
public
:
class
Listener
...
...
@@ -70,7 +71,6 @@ namespace RTC
virtual
void
FillJson
(
json
&
jsonObject
)
const
;
virtual
void
FillJsonStats
(
json
&
jsonArray
)
const
=
0
;
virtual
void
FillJsonScore
(
json
&
jsonObject
)
const
=
0
;
virtual
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
);
RTC
::
Media
::
Kind
GetKind
()
const
{
return
this
->
kind
;
...
...
@@ -155,6 +155,10 @@ namespace RTC
virtual
uint32_t
GetTransmissionRate
(
uint64_t
nowMs
)
=
0
;
virtual
float
GetRtt
()
const
=
0
;
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
protected
:
void
EmitTraceEventRtpAndKeyFrameTypes
(
RTC
::
RtpPacket
*
packet
,
bool
isRtx
=
false
)
const
;
void
EmitTraceEventKeyFrameType
(
RTC
::
RtpPacket
*
packet
,
bool
isRtx
=
false
)
const
;
...
...
worker/include/RTC/DataConsumer.hpp
浏览文件 @
4f520348
...
...
@@ -3,14 +3,17 @@
#include "common.hpp"
#include "Channel/ChannelRequest.hpp"
#include "Channel/ChannelSocket.hpp"
#include "PayloadChannel/PayloadChannelRequest.hpp"
#include "PayloadChannel/PayloadChannelSocket.hpp"
#include "RTC/SctpDictionaries.hpp"
#include <nlohmann/json.hpp>
#include <string>
namespace
RTC
{
class
DataConsumer
class
DataConsumer
:
Channel
::
ChannelSocket
::
RequestHandler
,
PayloadChannel
::
PayloadChannelSocket
::
RequestHandler
{
protected
:
using
onQueuedCallback
=
const
std
::
function
<
void
(
bool
queued
,
bool
sctpSendBufferFull
)
>
;
...
...
@@ -50,8 +53,6 @@ namespace RTC
public
:
void
FillJson
(
json
&
jsonObject
)
const
;
void
FillJsonStats
(
json
&
jsonArray
)
const
;
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
);
void
HandleRequest
(
PayloadChannel
::
PayloadChannelRequest
*
request
);
Type
GetType
()
const
{
return
this
->
type
;
...
...
@@ -78,6 +79,14 @@ namespace RTC
void
DataProducerClosed
();
void
SendMessage
(
uint32_t
ppid
,
const
uint8_t
*
msg
,
size_t
len
,
onQueuedCallback
*
=
nullptr
);
/* 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
;
public
:
// Passed by argument.
const
std
::
string
id
;
...
...
worker/include/RTC/DataProducer.hpp
浏览文件 @
4f520348
...
...
@@ -3,13 +3,14 @@
#include "common.hpp"
#include "Channel/ChannelRequest.hpp"
#include "Channel/ChannelSocket.hpp"
#include "RTC/SctpDictionaries.hpp"
#include <nlohmann/json.hpp>
#include <string>
namespace
RTC
{
class
DataProducer
class
DataProducer
:
Channel
::
ChannelSocket
::
RequestHandler
{
public
:
class
Listener
...
...
@@ -36,7 +37,6 @@ namespace RTC
public
:
void
FillJson
(
json
&
jsonObject
)
const
;
void
FillJsonStats
(
json
&
jsonArray
)
const
;
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
const
;
Type
GetType
()
const
{
return
this
->
type
;
...
...
@@ -47,6 +47,10 @@ namespace RTC
}
void
ReceiveMessage
(
uint32_t
ppid
,
const
uint8_t
*
msg
,
size_t
len
);
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
public
:
// Passed by argument.
const
std
::
string
id
;
...
...
worker/include/RTC/DirectTransport.hpp
浏览文件 @
4f520348
...
...
@@ -14,7 +14,6 @@ namespace RTC
public
:
void
FillJson
(
json
&
jsonObject
)
const
override
;
void
FillJsonStats
(
json
&
jsonArray
)
override
;
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
void
HandleNotification
(
PayloadChannel
::
Notification
*
notification
)
override
;
private
:
...
...
@@ -35,6 +34,10 @@ namespace RTC
void
RecvStreamClosed
(
uint32_t
ssrc
)
override
;
void
SendStreamClosed
(
uint32_t
ssrc
)
override
;
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
private
:
// Allocated by this.
uint8_t
*
buffer
{
nullptr
};
...
...
worker/include/RTC/PipeConsumer.hpp
浏览文件 @
4f520348
...
...
@@ -21,7 +21,6 @@ namespace RTC
void
FillJson
(
json
&
jsonObject
)
const
override
;
void
FillJsonStats
(
json
&
jsonArray
)
const
override
;
void
FillJsonScore
(
json
&
jsonObject
)
const
override
;
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
void
ProducerRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
override
;
void
ProducerNewRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
override
;
void
ProducerRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
,
uint8_t
previousScore
)
override
;
...
...
@@ -44,6 +43,10 @@ namespace RTC
uint32_t
GetTransmissionRate
(
uint64_t
nowMs
)
override
;
float
GetRtt
()
const
override
;
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
private
:
void
UserOnTransportConnected
()
override
;
void
UserOnTransportDisconnected
()
override
;
...
...
worker/include/RTC/PipeTransport.hpp
浏览文件 @
4f520348
...
...
@@ -29,9 +29,12 @@ namespace RTC
public
:
void
FillJson
(
json
&
jsonObject
)
const
override
;
void
FillJsonStats
(
json
&
jsonArray
)
override
;
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
void
HandleNotification
(
PayloadChannel
::
Notification
*
notification
)
override
;
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
private
:
bool
IsConnected
()
const
override
;
bool
HasSrtp
()
const
;
...
...
worker/include/RTC/PlainTransport.hpp
浏览文件 @
4f520348
...
...
@@ -29,9 +29,12 @@ namespace RTC
public
:
void
FillJson
(
json
&
jsonObject
)
const
override
;
void
FillJsonStats
(
json
&
jsonArray
)
override
;
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
void
HandleNotification
(
PayloadChannel
::
Notification
*
notification
)
override
;
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
private
:
bool
IsConnected
()
const
override
;
bool
HasSrtp
()
const
;
...
...
worker/include/RTC/Producer.hpp
浏览文件 @
4f520348
...
...
@@ -3,6 +3,7 @@
#include "common.hpp"
#include "Channel/ChannelRequest.hpp"
#include "Channel/ChannelSocket.hpp"
#include "RTC/KeyFrameRequestManager.hpp"
#include "RTC/RTCP/CompoundPacket.hpp"
#include "RTC/RTCP/Packet.hpp"
...
...
@@ -20,7 +21,9 @@ using json = nlohmann::json;
namespace
RTC
{
class
Producer
:
public
RTC
::
RtpStreamRecv
::
Listener
,
public
RTC
::
KeyFrameRequestManager
::
Listener
class
Producer
:
public
RTC
::
RtpStreamRecv
::
Listener
,
public
RTC
::
KeyFrameRequestManager
::
Listener
,
Channel
::
ChannelSocket
::
RequestHandler
{
public
:
class
Listener
...
...
@@ -91,7 +94,6 @@ namespace RTC
public
:
void
FillJson
(
json
&
jsonObject
)
const
;
void
FillJsonStats
(
json
&
jsonArray
)
const
;
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
);
RTC
::
Media
::
Kind
GetKind
()
const
{
return
this
->
kind
;
...
...
@@ -126,6 +128,10 @@ namespace RTC
void
GetRtcp
(
RTC
::
RTCP
::
CompoundPacket
*
packet
,
uint64_t
nowMs
);
void
RequestKeyFrame
(
uint32_t
mappedSsrc
);
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
private
:
RTC
::
RtpStreamRecv
*
GetRtpStream
(
RTC
::
RtpPacket
*
packet
);
RTC
::
RtpStreamRecv
*
CreateRtpStream
(
...
...
worker/include/RTC/Router.hpp
浏览文件 @
4f520348
...
...
@@ -23,7 +23,10 @@ using json = nlohmann::json;
namespace
RTC
{
class
Router
:
public
RTC
::
Transport
::
Listener
class
Router
:
public
RTC
::
Transport
::
Listener
,
Channel
::
ChannelSocket
::
RequestHandler
,
PayloadChannel
::
PayloadChannelSocket
::
RequestHandler
,
PayloadChannel
::
PayloadChannelSocket
::
NotificationHandler
{
public
:
class
Listener
...
...
@@ -42,9 +45,18 @@ namespace RTC
public
:
void
FillJson
(
json
&
jsonObject
)
const
;
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
);
void
HandleRequest
(
PayloadChannel
::
PayloadChannelRequest
*
request
);
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
;
private
:
void
SetNewTransportIdFromInternal
(
json
&
internal
,
std
::
string
&
transportId
)
const
;
...
...
worker/include/RTC/SimpleConsumer.hpp
浏览文件 @
4f520348
...
...
@@ -21,7 +21,6 @@ namespace RTC
void
FillJson
(
json
&
jsonObject
)
const
override
;
void
FillJsonStats
(
json
&
jsonArray
)
const
override
;
void
FillJsonScore
(
json
&
jsonObject
)
const
override
;
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
bool
IsActive
()
const
override
{
// clang-format off
...
...
@@ -54,6 +53,10 @@ namespace RTC
uint32_t
GetTransmissionRate
(
uint64_t
nowMs
)
override
;
float
GetRtt
()
const
override
;
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
private
:
void
UserOnTransportConnected
()
override
;
void
UserOnTransportDisconnected
()
override
;
...
...
worker/include/RTC/SimulcastConsumer.hpp
浏览文件 @
4f520348
...
...
@@ -22,7 +22,6 @@ namespace RTC
void
FillJson
(
json
&
jsonObject
)
const
override
;
void
FillJsonStats
(
json
&
jsonArray
)
const
override
;
void
FillJsonScore
(
json
&
jsonObject
)
const
override
;
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
RTC
::
Consumer
::
Layers
GetPreferredLayers
()
const
override
{
RTC
::
Consumer
::
Layers
layers
;
...
...
@@ -70,6 +69,10 @@ namespace RTC
uint32_t
GetTransmissionRate
(
uint64_t
nowMs
)
override
;
float
GetRtt
()
const
override
;
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
private
:
void
UserOnTransportConnected
()
override
;
void
UserOnTransportDisconnected
()
override
;
...
...
worker/include/RTC/SvcConsumer.hpp
浏览文件 @
4f520348
...
...
@@ -23,7 +23,6 @@ namespace RTC
void
FillJson
(
json
&
jsonObject
)
const
override
;
void
FillJsonStats
(
json
&
jsonArray
)
const
override
;
void
FillJsonScore
(
json
&
jsonObject
)
const
override
;
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
RTC
::
Consumer
::
Layers
GetPreferredLayers
()
const
override
{
RTC
::
Consumer
::
Layers
layers
;
...
...
@@ -65,6 +64,10 @@ namespace RTC
uint32_t
GetTransmissionRate
(
uint64_t
nowMs
)
override
;
float
GetRtt
()
const
override
;
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
private
:
void
UserOnTransportConnected
()
override
;
void
UserOnTransportDisconnected
()
override
;
...
...
worker/include/RTC/Transport.hpp
浏览文件 @
4f520348
...
...
@@ -5,6 +5,7 @@
#include "common.hpp"
#include "DepLibUV.hpp"
#include "Channel/ChannelRequest.hpp"
#include "Channel/ChannelSocket.hpp"
#include "PayloadChannel/Notification.hpp"
#include "PayloadChannel/PayloadChannelRequest.hpp"
#include "RTC/Consumer.hpp"
...
...
worker/include/RTC/WebRtcServer.hpp
浏览文件 @
4f520348
...
...
@@ -20,7 +20,8 @@ namespace RTC
class
WebRtcServer
:
public
RTC
::
UdpSocket
::
Listener
,
public
RTC
::
TcpServer
::
Listener
,
public
RTC
::
TcpConnection
::
Listener
,
public
RTC
::
WebRtcTransport
::
WebRtcTransportListener
public
RTC
::
WebRtcTransport
::
WebRtcTransportListener
,
Channel
::
ChannelSocket
::
RequestHandler
{
private
:
struct
ListenInfo
...
...
@@ -51,10 +52,13 @@ namespace RTC
public
:
void
FillJson
(
json
&
jsonObject
)
const
;
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
);
std
::
vector
<
RTC
::
IceCandidate
>
GetIceCandidates
(
bool
enableUdp
,
bool
enableTcp
,
bool
preferUdp
,
bool
preferTcp
);
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
private
:
std
::
string
GetLocalIceUsernameFragmentFromReceivedStunPacket
(
RTC
::
StunPacket
*
packet
)
const
;
void
OnPacketReceived
(
RTC
::
TransportTuple
*
tuple
,
const
uint8_t
*
data
,
size_t
len
);
...
...
worker/include/RTC/WebRtcTransport.hpp
浏览文件 @
4f520348
...
...
@@ -61,13 +61,16 @@ namespace RTC
public
:
void
FillJson
(
json
&
jsonObject
)
const
override
;
void
FillJsonStats
(
json
&
jsonArray
)
override
;
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
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
);
void
RemoveTuple
(
RTC
::
TransportTuple
*
tuple
);
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
private
:
bool
IsConnected
()
const
override
;
void
MayRunDtlsTransport
();
...
...
worker/include/Worker.hpp
浏览文件 @
4f520348
...
...
@@ -34,19 +34,24 @@ private:
void
SetNewRouterIdFromInternal
(
json
&
internal
,
std
::
string
&
routerId
)
const
;
RTC
::
Router
*
GetRouterFromInternal
(
json
&
internal
)
const
;
/* Methods inherited from Channel::lUnixStreamSocket::Listener. */
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
public
:
void
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
override
;
/* Methods inherited from Channel::ChannelSocket::Listener. */
public
:
void
OnChannelRequest
(
Channel
::
ChannelSocket
*
channel
,
Channel
::
ChannelRequest
*
request
)
override
;
void
OnChannelClosed
(
Channel
::
ChannelSocket
*
channel
)
override
;
/* Methods inherited from PayloadChannel::lUnixStreamSocket::Listener. */
/* 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
;
/* Methods inherited from PayloadChannel::PayloadChannelSocket::Listener. */
public
:
void
OnPayloadChannelNotification
(
PayloadChannel
::
PayloadChannelSocket
*
payloadChannel
,
PayloadChannel
::
Notification
*
notification
)
override
;
void
OnPayloadChannelRequest
(
PayloadChannel
::
PayloadChannelSocket
*
payloadChannel
,
PayloadChannel
::
PayloadChannelRequest
*
request
)
override
;
void
OnPayloadChannelClosed
(
PayloadChannel
::
PayloadChannelSocket
*
payloadChannel
)
override
;
/* Methods inherited from SignalsHandler::Listener. */
...
...
worker/src/Channel/ChannelSocket.cpp
浏览文件 @
4f520348
...
...
@@ -181,7 +181,7 @@ namespace Channel
// Notify the listener.
try
{
this
->
listener
->
OnChannelRequest
(
this
,
request
);
this
->
listener
->
HandleRequest
(
request
);
}
catch
(
const
MediaSoupTypeError
&
error
)
{
...
...
@@ -246,7 +246,7 @@ namespace Channel
// Notify the listener.
try
{
this
->
listener
->
OnChannelRequest
(
this
,
request
);
this
->
listener
->
HandleRequest
(
request
);
}
catch
(
const
MediaSoupTypeError
&
error
)
{
...
...
worker/src/PayloadChannel/PayloadChannelSocket.cpp
浏览文件 @
4f520348
...
...
@@ -212,7 +212,7 @@ namespace PayloadChannel
// Notify the listener.
try
{
this
->
listener
->
OnPayloadChannelRequest
(
this
,
request
);
this
->
listener
->
HandleRequest
(
request
);
}
catch
(
const
MediaSoupTypeError
&
error
)
{
...
...
@@ -246,7 +246,7 @@ namespace PayloadChannel
// Notify the listener.
try
{
this
->
listener
->
OnPayloadChannelNotification
(
this
,
notification
);
this
->
listener
->
HandleNotification
(
notification
);
}
catch
(
const
MediaSoupError
&
error
)
{
...
...
@@ -381,7 +381,7 @@ namespace PayloadChannel
// Notify the listener.
try
{
this
->
listener
->
OnPayloadChannelNotification
(
this
,
this
->
ongoingNotification
);
this
->
listener
->
HandleNotification
(
this
->
ongoingNotification
);
}
catch
(
const
MediaSoupError
&
error
)
{
...
...
@@ -399,7 +399,7 @@ namespace PayloadChannel
// Notify the listener.
try
{
this
->
listener
->
OnPayloadChannelRequest
(
this
,
this
->
ongoingRequest
);
this
->
listener
->
HandleRequest
(
this
->
ongoingRequest
);
}
catch
(
const
MediaSoupTypeError
&
error
)
{
...
...
worker/src/RTC/DataProducer.cpp
浏览文件 @
4f520348
...
...
@@ -110,7 +110,7 @@ namespace RTC
jsonObject
[
"bytesReceived"
]
=
this
->
bytesReceived
;
}
void
DataProducer
::
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
const
void
DataProducer
::
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
{
MS_TRACE
();
...
...
worker/src/Worker.cpp
浏览文件 @
4f520348
...
...
@@ -253,7 +253,7 @@ RTC::Router* Worker::GetRouterFromInternal(json& internal) const
return
router
;
}
inline
void
Worker
::
OnChannelRequest
(
Channel
::
ChannelSocket
*
/*channel*/
,
Channel
::
ChannelRequest
*
request
)
inline
void
Worker
::
HandleRequest
(
Channel
::
ChannelRequest
*
request
)
{
MS_TRACE
();
...
...
@@ -458,8 +458,7 @@ inline void Worker::OnChannelClosed(Channel::ChannelSocket* /*socket*/)
Close
();
}
inline
void
Worker
::
OnPayloadChannelNotification
(
PayloadChannel
::
PayloadChannelSocket
*
/*payloadChannel*/
,
PayloadChannel
::
Notification
*
notification
)
inline
void
Worker
::
HandleNotification
(
PayloadChannel
::
Notification
*
notification
)
{
MS_TRACE
();
...
...
@@ -481,9 +480,7 @@ inline void Worker::OnPayloadChannelNotification(
}
}
inline
void
Worker
::
OnPayloadChannelRequest
(
PayloadChannel
::
PayloadChannelSocket
*
/*payloadChannel*/
,
PayloadChannel
::
PayloadChannelRequest
*
request
)
inline
void
Worker
::
HandleRequest
(
PayloadChannel
::
PayloadChannelRequest
*
request
)
{
MS_TRACE
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论