Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
3e9be3da
提交
3e9be3da
authored
8月 29, 2017
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
foo
上级
cada4592
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
72 行增加
和
79 行删除
+72
-79
Consumer.hpp
worker/include/RTC/Consumer.hpp
+2
-24
Producer.hpp
worker/include/RTC/Producer.hpp
+4
-19
RtpListener.hpp
worker/include/RTC/RtpListener.hpp
+4
-1
Transport.hpp
worker/include/RTC/Transport.hpp
+12
-14
Consumer.cpp
worker/src/RTC/Consumer.cpp
+2
-4
Producer.cpp
worker/src/RTC/Producer.cpp
+0
-14
Router.cpp
worker/src/RTC/Router.cpp
+15
-0
RtpListener.cpp
worker/src/RTC/RtpListener.cpp
+4
-3
Transport.cpp
worker/src/RTC/Transport.cpp
+29
-0
没有找到文件。
worker/include/RTC/Consumer.hpp
浏览文件 @
3e9be3da
...
@@ -32,7 +32,7 @@ namespace RTC
...
@@ -32,7 +32,7 @@ namespace RTC
};
};
public
:
public
:
Consumer
(
Listener
*
listener
,
Channel
::
Notifier
*
notifier
,
uint32_t
consumerId
,
RTC
::
Media
::
Kind
kind
);
Consumer
(
Listener
*
listener
,
Channel
::
Notifier
*
notifier
,
uint32_t
consumerId
,
RTC
::
Media
::
Kind
kind
,
RTC
::
Transport
*
transport
);
private
:
private
:
virtual
~
Consumer
();
virtual
~
Consumer
();
...
@@ -42,10 +42,7 @@ namespace RTC
...
@@ -42,10 +42,7 @@ namespace RTC
Json
::
Value
ToJson
()
const
;
Json
::
Value
ToJson
()
const
;
void
HandleRequest
(
Channel
::
Request
*
request
);
void
HandleRequest
(
Channel
::
Request
*
request
);
void
Send
(
RTC
::
RtpParameters
*
rtpParameters
);
void
Send
(
RTC
::
RtpParameters
*
rtpParameters
);
void
SetTransport
(
RTC
::
Transport
*
transport
);
RTC
::
RtpParameters
*
GetParameters
()
const
;
// TODO: What for?
RTC
::
Transport
*
GetTransport
()
const
;
void
RemoveTransport
(
RTC
::
Transport
*
transport
);
RTC
::
RtpParameters
*
GetParameters
()
const
;
bool
GetEnabled
()
const
;
bool
GetEnabled
()
const
;
void
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
);
void
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
);
void
GetRtcp
(
RTC
::
RTCP
::
CompoundPacket
*
packet
,
uint64_t
now
);
void
GetRtcp
(
RTC
::
RTCP
::
CompoundPacket
*
packet
,
uint64_t
now
);
...
@@ -83,25 +80,6 @@ namespace RTC
...
@@ -83,25 +80,6 @@ namespace RTC
/* Inline methods. */
/* Inline methods. */
inline
void
Consumer
::
SetTransport
(
RTC
::
Transport
*
transport
)
{
this
->
transport
=
transport
;
}
inline
RTC
::
Transport
*
Consumer
::
GetTransport
()
const
{
return
this
->
transport
;
}
inline
void
Consumer
::
RemoveTransport
(
RTC
::
Transport
*
transport
)
{
if
(
this
->
transport
==
transport
)
this
->
transport
=
nullptr
;
// TODO: More. Remove rtpParameters.
}
// TODO: What for?
inline
RTC
::
RtpParameters
*
Consumer
::
GetParameters
()
const
inline
RTC
::
RtpParameters
*
Consumer
::
GetParameters
()
const
{
{
return
this
->
rtpParameters
;
return
this
->
rtpParameters
;
...
...
worker/include/RTC/Producer.hpp
浏览文件 @
3e9be3da
...
@@ -10,16 +10,13 @@
...
@@ -10,16 +10,13 @@
#include "RTC/RtpDictionaries.hpp"
#include "RTC/RtpDictionaries.hpp"
#include "RTC/RtpPacket.hpp"
#include "RTC/RtpPacket.hpp"
#include "RTC/RtpStreamRecv.hpp"
#include "RTC/RtpStreamRecv.hpp"
#include "RTC/Transport.hpp"
#include <json/json.h>
#include <json/json.h>
#include <map>
#include <map>
#include <string>
#include <string>
namespace
RTC
namespace
RTC
{
{
// Avoid cyclic #include problem by declaring classes instead of including
// the corresponding header files.
class
Transport
;
class
Producer
:
public
RtpStreamRecv
::
Listener
class
Producer
:
public
RtpStreamRecv
::
Listener
{
{
public
:
public
:
...
@@ -50,16 +47,15 @@ namespace RTC
...
@@ -50,16 +47,15 @@ namespace RTC
public
:
public
:
Producer
(
Listener
*
listener
,
Channel
::
Notifier
*
notifier
,
uint32_t
producerId
,
RTC
::
Media
::
Kind
kind
,
RTC
::
Transport
*
transport
);
Producer
(
Listener
*
listener
,
Channel
::
Notifier
*
notifier
,
uint32_t
producerId
,
RTC
::
Media
::
Kind
kind
,
RTC
::
Transport
*
transport
);
private
:
public
:
// Must be public because Router needs to call it.
virtual
~
Producer
();
virtual
~
Producer
();
public
:
public
:
void
Destroy
();
void
Destroy
();
Json
::
Value
ToJson
()
const
;
Json
::
Value
ToJson
()
const
;
void
HandleRequest
(
Channel
::
Request
*
request
);
void
HandleRequest
(
Channel
::
Request
*
request
);
RTC
::
Transport
*
GetTransport
()
const
;
// TODO: YES?
RTC
::
RtpParameters
*
GetParameters
()
const
;
void
RemoveTransport
(
RTC
::
Transport
*
transport
);
// TODO: better close this.
RTC
::
RtpParameters
*
GetParameters
()
const
;
// TODO: What for?
void
ReceiveRtpPacket
(
RTC
::
RtpPacket
*
packet
);
void
ReceiveRtpPacket
(
RTC
::
RtpPacket
*
packet
);
void
ReceiveRtcpSenderReport
(
RTC
::
RTCP
::
SenderReport
*
report
);
void
ReceiveRtcpSenderReport
(
RTC
::
RTCP
::
SenderReport
*
report
);
void
GetRtcp
(
RTC
::
RTCP
::
CompoundPacket
*
packet
,
uint64_t
now
);
void
GetRtcp
(
RTC
::
RTCP
::
CompoundPacket
*
packet
,
uint64_t
now
);
...
@@ -105,17 +101,6 @@ namespace RTC
...
@@ -105,17 +101,6 @@ namespace RTC
/* Inline methods. */
/* Inline methods. */
inline
RTC
::
Transport
*
Producer
::
GetTransport
()
const
{
return
this
->
transport
;
}
inline
void
Producer
::
RemoveTransport
(
RTC
::
Transport
*
transport
)
{
if
(
this
->
transport
==
transport
)
this
->
transport
=
nullptr
;
}
inline
RTC
::
RtpParameters
*
Producer
::
GetParameters
()
const
inline
RTC
::
RtpParameters
*
Producer
::
GetParameters
()
const
{
{
return
this
->
rtpParameters
;
return
this
->
rtpParameters
;
...
...
worker/include/RTC/RtpListener.hpp
浏览文件 @
3e9be3da
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
#define MS_RTC_LISTENER_HPP
#define MS_RTC_LISTENER_HPP
#include "common.hpp"
#include "common.hpp"
#include "RTC/Producer.hpp"
#include "RTC/RtpPacket.hpp"
#include "RTC/RtpPacket.hpp"
#include <string>
#include <string>
#include <unordered_map>
#include <unordered_map>
...
@@ -10,6 +9,10 @@
...
@@ -10,6 +9,10 @@
namespace
RTC
namespace
RTC
{
{
// Avoid cyclic #include problem by declaring classes instead of including
// the corresponding header files.
class
Producer
;
class
RtpListener
class
RtpListener
{
{
public
:
public
:
...
...
worker/include/RTC/Transport.hpp
浏览文件 @
3e9be3da
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
#include "RTC/DtlsTransport.hpp"
#include "RTC/DtlsTransport.hpp"
#include "RTC/IceCandidate.hpp"
#include "RTC/IceCandidate.hpp"
#include "RTC/IceServer.hpp"
#include "RTC/IceServer.hpp"
#include "RTC/Producer.hpp"
#include "RTC/RTCP/CompoundPacket.hpp"
#include "RTC/RTCP/CompoundPacket.hpp"
#include "RTC/RTCP/Packet.hpp"
#include "RTC/RTCP/Packet.hpp"
#include "RTC/RemoteBitrateEstimator/RemoteBitrateEstimatorAbsSendTime.hpp"
#include "RTC/RemoteBitrateEstimator/RemoteBitrateEstimatorAbsSendTime.hpp"
...
@@ -21,10 +20,16 @@
...
@@ -21,10 +20,16 @@
#include "RTC/UdpSocket.hpp"
#include "RTC/UdpSocket.hpp"
#include <json/json.h>
#include <json/json.h>
#include <string>
#include <string>
#include <unordered_set>
#include <vector>
#include <vector>
namespace
RTC
namespace
RTC
{
{
// Avoid cyclic #include problem by declaring classes instead of including
// the corresponding header files.
class
Producer
;
class
Consumer
;
class
Transport
:
public
RTC
::
UdpSocket
::
Listener
,
class
Transport
:
public
RTC
::
UdpSocket
::
Listener
,
public
RTC
::
TcpServer
::
Listener
,
public
RTC
::
TcpServer
::
Listener
,
public
RTC
::
TcpConnection
::
Listener
,
public
RTC
::
TcpConnection
::
Listener
,
...
@@ -49,8 +54,8 @@ namespace RTC
...
@@ -49,8 +54,8 @@ namespace RTC
void
Destroy
();
void
Destroy
();
Json
::
Value
ToJson
()
const
;
Json
::
Value
ToJson
()
const
;
void
HandleRequest
(
Channel
::
Request
*
request
);
void
HandleRequest
(
Channel
::
Request
*
request
);
void
Add
Producer
(
RTC
::
Producer
*
producer
);
void
Handle
Producer
(
RTC
::
Producer
*
producer
);
void
RemoveProducer
(
const
RTC
::
Producer
*
produc
er
);
void
HandleConsumer
(
RTC
::
Consumer
*
consum
er
);
void
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
);
void
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
);
void
SendRtcpPacket
(
RTC
::
RTCP
::
Packet
*
packet
);
void
SendRtcpPacket
(
RTC
::
RTCP
::
Packet
*
packet
);
void
SendRtcpCompoundPacket
(
RTC
::
RTCP
::
CompoundPacket
*
packet
);
void
SendRtcpCompoundPacket
(
RTC
::
RTCP
::
CompoundPacket
*
packet
);
...
@@ -137,6 +142,9 @@ namespace RTC
...
@@ -137,6 +142,9 @@ namespace RTC
RTC
::
SrtpSession
*
srtpSendSession
{
nullptr
};
RTC
::
SrtpSession
*
srtpSendSession
{
nullptr
};
// Others.
// Others.
bool
allocated
{
false
};
bool
allocated
{
false
};
// Others (Producers and Consumers).
std
::
unordered_set
<
RTC
::
Producer
*>
producers
;
std
::
unordered_set
<
RTC
::
Consumer
*>
consumers
;
// Others (ICE).
// Others (ICE).
std
::
vector
<
IceCandidate
>
iceLocalCandidates
;
std
::
vector
<
IceCandidate
>
iceLocalCandidates
;
RTC
::
TransportTuple
*
selectedTuple
{
nullptr
};
RTC
::
TransportTuple
*
selectedTuple
{
nullptr
};
...
@@ -145,7 +153,7 @@ namespace RTC
...
@@ -145,7 +153,7 @@ namespace RTC
RTC
::
DtlsTransport
::
Role
dtlsLocalRole
{
RTC
::
DtlsTransport
::
Role
::
AUTO
};
RTC
::
DtlsTransport
::
Role
dtlsLocalRole
{
RTC
::
DtlsTransport
::
Role
::
AUTO
};
// Others (RtpListener).
// Others (RtpListener).
RtpListener
rtpListener
;
RtpListener
rtpListener
;
//
REMB and bitrate stuff
.
//
Others (REMB and bitrate stuff)
.
std
::
unique_ptr
<
RTC
::
RemoteBitrateEstimatorAbsSendTime
>
remoteBitrateEstimator
;
std
::
unique_ptr
<
RTC
::
RemoteBitrateEstimatorAbsSendTime
>
remoteBitrateEstimator
;
uint32_t
maxBitrate
{
0
};
uint32_t
maxBitrate
{
0
};
uint32_t
effectiveMaxBitrate
{
0
};
uint32_t
effectiveMaxBitrate
{
0
};
...
@@ -154,16 +162,6 @@ namespace RTC
...
@@ -154,16 +162,6 @@ namespace RTC
/* Inline instance methods. */
/* Inline instance methods. */
inline
void
Transport
::
AddProducer
(
RTC
::
Producer
*
producer
)
{
this
->
rtpListener
.
AddProducer
(
producer
);
}
inline
void
Transport
::
RemoveProducer
(
const
RTC
::
Producer
*
producer
)
{
this
->
rtpListener
.
RemoveProducer
(
producer
);
}
inline
RTC
::
Producer
*
Transport
::
GetProducer
(
uint32_t
ssrc
)
inline
RTC
::
Producer
*
Transport
::
GetProducer
(
uint32_t
ssrc
)
{
{
return
this
->
rtpListener
.
GetProducer
(
ssrc
);
return
this
->
rtpListener
.
GetProducer
(
ssrc
);
...
...
worker/src/RTC/Consumer.cpp
浏览文件 @
3e9be3da
...
@@ -18,8 +18,8 @@ namespace RTC
...
@@ -18,8 +18,8 @@ namespace RTC
/* Instance methods. */
/* Instance methods. */
Consumer
::
Consumer
(
Consumer
::
Consumer
(
Listener
*
listener
,
Channel
::
Notifier
*
notifier
,
uint32_t
consumerId
,
RTC
::
Media
::
Kind
kind
)
Listener
*
listener
,
Channel
::
Notifier
*
notifier
,
uint32_t
consumerId
,
RTC
::
Media
::
Kind
kind
,
RTC
::
Transport
*
transport
)
:
consumerId
(
consumerId
),
kind
(
kind
),
listener
(
listener
),
notifier
(
notifier
)
:
consumerId
(
consumerId
),
kind
(
kind
),
listener
(
listener
),
notifier
(
notifier
)
,
transport
(
transport
)
{
{
MS_TRACE
();
MS_TRACE
();
...
@@ -41,8 +41,6 @@ namespace RTC
...
@@ -41,8 +41,6 @@ namespace RTC
{
{
MS_TRACE
();
MS_TRACE
();
this
->
notifier
->
Emit
(
this
->
consumerId
,
"close"
);
// Notify the listener.
// Notify the listener.
this
->
listener
->
OnConsumerClosed
(
this
);
this
->
listener
->
OnConsumerClosed
(
this
);
...
...
worker/src/RTC/Producer.cpp
浏览文件 @
3e9be3da
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
#include "RTC/RTCP/FeedbackPsPli.hpp"
#include "RTC/RTCP/FeedbackPsPli.hpp"
#include "RTC/RTCP/FeedbackRtp.hpp"
#include "RTC/RTCP/FeedbackRtp.hpp"
#include "RTC/RTCP/FeedbackRtpNack.hpp"
#include "RTC/RTCP/FeedbackRtpNack.hpp"
#include "RTC/Transport.hpp"
namespace
RTC
namespace
RTC
{
{
...
@@ -38,9 +37,6 @@ namespace RTC
...
@@ -38,9 +37,6 @@ namespace RTC
{
{
MS_TRACE
();
MS_TRACE
();
// Notify.
this
->
notifier
->
Emit
(
this
->
producerId
,
"close"
);
// Notify the listener.
// Notify the listener.
this
->
listener
->
OnProducerClosed
(
this
);
this
->
listener
->
OnProducerClosed
(
this
);
...
@@ -54,13 +50,11 @@ namespace RTC
...
@@ -54,13 +50,11 @@ namespace RTC
static
const
Json
::
StaticString
JsonStringProducerId
{
"producerId"
};
static
const
Json
::
StaticString
JsonStringProducerId
{
"producerId"
};
static
const
Json
::
StaticString
JsonStringKind
{
"kind"
};
static
const
Json
::
StaticString
JsonStringKind
{
"kind"
};
static
const
Json
::
StaticString
JsonStringRtpParameters
{
"rtpParameters"
};
static
const
Json
::
StaticString
JsonStringRtpParameters
{
"rtpParameters"
};
static
const
Json
::
StaticString
JsonStringHasTransport
{
"hasTransport"
};
static
const
Json
::
StaticString
JsonStringSsrcAudioLevelId
{
"ssrcAudioLevelId"
};
static
const
Json
::
StaticString
JsonStringSsrcAudioLevelId
{
"ssrcAudioLevelId"
};
static
const
Json
::
StaticString
JsonStringAbsSendTimeId
{
"absSendTimeId"
};
static
const
Json
::
StaticString
JsonStringAbsSendTimeId
{
"absSendTimeId"
};
static
const
Json
::
StaticString
JsonStringRtpRawEventEnabled
{
"rtpRawEventEnabled"
};
static
const
Json
::
StaticString
JsonStringRtpRawEventEnabled
{
"rtpRawEventEnabled"
};
static
const
Json
::
StaticString
JsonStringRtpObjectEventEnabled
{
"rtpObjectEventEnabled"
};
static
const
Json
::
StaticString
JsonStringRtpObjectEventEnabled
{
"rtpObjectEventEnabled"
};
static
const
Json
::
StaticString
JsonStringRtpStreams
{
"rtpStreams"
};
static
const
Json
::
StaticString
JsonStringRtpStreams
{
"rtpStreams"
};
static
const
Json
::
StaticString
JsonStringRtpStream
{
"rtpStream"
};
Json
::
Value
json
(
Json
::
objectValue
);
Json
::
Value
json
(
Json
::
objectValue
);
Json
::
Value
jsonRtpStreams
(
Json
::
arrayValue
);
Json
::
Value
jsonRtpStreams
(
Json
::
arrayValue
);
...
@@ -74,8 +68,6 @@ namespace RTC
...
@@ -74,8 +68,6 @@ namespace RTC
else
else
json
[
JsonStringRtpParameters
]
=
Json
::
nullValue
;
json
[
JsonStringRtpParameters
]
=
Json
::
nullValue
;
json
[
JsonStringHasTransport
]
=
this
->
transport
!=
nullptr
;
if
(
this
->
knownHeaderExtensions
.
ssrcAudioLevelId
)
if
(
this
->
knownHeaderExtensions
.
ssrcAudioLevelId
)
json
[
JsonStringSsrcAudioLevelId
]
=
this
->
knownHeaderExtensions
.
ssrcAudioLevelId
;
json
[
JsonStringSsrcAudioLevelId
]
=
this
->
knownHeaderExtensions
.
ssrcAudioLevelId
;
...
@@ -157,12 +149,6 @@ namespace RTC
...
@@ -157,12 +149,6 @@ namespace RTC
// NOTE: This may throw.
// NOTE: This may throw.
this
->
rtpParameters
=
new
RTC
::
RtpParameters
(
request
->
data
[
JsonStringRtpParameters
]);
this
->
rtpParameters
=
new
RTC
::
RtpParameters
(
request
->
data
[
JsonStringRtpParameters
]);
auto
transport
=
GetTransport
();
// NOTE: This may throw.
if
(
transport
!=
nullptr
)
transport
->
AddProducer
(
this
);
// NOTE: This may throw.
// NOTE: This may throw.
CreateRtpMapping
(
request
->
data
[
JsonStringRtpMapping
]);
CreateRtpMapping
(
request
->
data
[
JsonStringRtpMapping
]);
}
}
...
...
worker/src/RTC/Router.cpp
浏览文件 @
3e9be3da
...
@@ -277,6 +277,21 @@ namespace RTC
...
@@ -277,6 +277,21 @@ namespace RTC
return
;
return
;
}
}
// Tell the Transport to handle the new Producer.
try
{
// NOTE: This may throw.
transport
->
HandleProducer
(
producer
);
}
catch
(
const
MediaSoupError
&
error
)
{
delete
producer
;
request
->
Reject
(
error
.
what
());
return
;
}
this
->
producers
[
producerId
]
=
producer
;
this
->
producers
[
producerId
]
=
producer
;
MS_DEBUG_DEV
(
"Producer created [producerId:%"
PRIu32
"]"
,
producerId
);
MS_DEBUG_DEV
(
"Producer created [producerId:%"
PRIu32
"]"
,
producerId
);
...
...
worker/src/RTC/RtpListener.cpp
浏览文件 @
3e9be3da
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#include "RTC/RtpListener.hpp"
#include "RTC/RtpListener.hpp"
#include "Logger.hpp"
#include "Logger.hpp"
#include "MediaSoupError.hpp"
#include "MediaSoupError.hpp"
#include "RTC/Producer.hpp"
namespace
RTC
namespace
RTC
{
{
...
@@ -22,7 +23,7 @@ namespace RTC
...
@@ -22,7 +23,7 @@ namespace RTC
Json
::
Value
jsonMuxIdTable
(
Json
::
objectValue
);
Json
::
Value
jsonMuxIdTable
(
Json
::
objectValue
);
Json
::
Value
jsonPtTable
(
Json
::
objectValue
);
Json
::
Value
jsonPtTable
(
Json
::
objectValue
);
// Add
`ssrcTable`
.
// Add
ssrcTable
.
for
(
auto
&
kv
:
this
->
ssrcTable
)
for
(
auto
&
kv
:
this
->
ssrcTable
)
{
{
auto
ssrc
=
kv
.
first
;
auto
ssrc
=
kv
.
first
;
...
@@ -32,7 +33,7 @@ namespace RTC
...
@@ -32,7 +33,7 @@ namespace RTC
}
}
json
[
JsonStringSsrcTable
]
=
jsonSsrcTable
;
json
[
JsonStringSsrcTable
]
=
jsonSsrcTable
;
// Add
`muxIdTable`
.
// Add
muxIdTable
.
for
(
auto
&
kv
:
this
->
muxIdTable
)
for
(
auto
&
kv
:
this
->
muxIdTable
)
{
{
auto
muxId
=
kv
.
first
;
auto
muxId
=
kv
.
first
;
...
@@ -42,7 +43,7 @@ namespace RTC
...
@@ -42,7 +43,7 @@ namespace RTC
}
}
json
[
JsonStringMuxIdTable
]
=
jsonMuxIdTable
;
json
[
JsonStringMuxIdTable
]
=
jsonMuxIdTable
;
// Add
`ptTable`
.
// Add
ptTable
.
for
(
auto
&
kv
:
this
->
ptTable
)
for
(
auto
&
kv
:
this
->
ptTable
)
{
{
auto
payloadType
=
kv
.
first
;
auto
payloadType
=
kv
.
first
;
...
...
worker/src/RTC/Transport.cpp
浏览文件 @
3e9be3da
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
#include "MediaSoupError.hpp"
#include "MediaSoupError.hpp"
#include "Settings.hpp"
#include "Settings.hpp"
#include "Utils.hpp"
#include "Utils.hpp"
#include "RTC/Producer.hpp"
#include "RTC/Consumer.hpp"
#include "RTC/RTCP/FeedbackPsRemb.hpp"
#include "RTC/RTCP/FeedbackPsRemb.hpp"
#include <cmath> // std::pow()
#include <cmath> // std::pow()
#include <iterator> // std::ostream_iterator
#include <iterator> // std::ostream_iterator
...
@@ -47,6 +49,16 @@ namespace RTC
...
@@ -47,6 +49,16 @@ namespace RTC
{
{
MS_TRACE
();
MS_TRACE
();
// TODO: TMP
for
(
auto
&
producer
:
this
->
producers
)
{
producer
->
GetParameters
();
}
for
(
auto
&
consumer
:
this
->
consumers
)
{
consumer
->
GetParameters
();
}
static
const
Json
::
StaticString
JsonStringUdp
{
"udp"
};
static
const
Json
::
StaticString
JsonStringUdp
{
"udp"
};
static
const
Json
::
StaticString
JsonStringTcp
{
"tcp"
};
static
const
Json
::
StaticString
JsonStringTcp
{
"tcp"
};
static
const
Json
::
StaticString
JsonStringPreferIPv4
{
"preferIPv4"
};
static
const
Json
::
StaticString
JsonStringPreferIPv4
{
"preferIPv4"
};
...
@@ -583,6 +595,23 @@ namespace RTC
...
@@ -583,6 +595,23 @@ namespace RTC
}
}
}
}
void
Transport
::
HandleProducer
(
RTC
::
Producer
*
producer
)
{
MS_TRACE
();
// NOTE: This may throw.
this
->
rtpListener
.
AddProducer
(
producer
);
// TODO: add to the map
}
void
Transport
::
HandleConsumer
(
RTC
::
Consumer
*
consumer
)
{
MS_TRACE
();
// TODO
}
void
Transport
::
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
)
void
Transport
::
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
)
{
{
MS_TRACE
();
MS_TRACE
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论