mediasoup 3.19.21 → 3.19.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/node/lib/Worker.d.ts +1 -0
  2. package/node/lib/Worker.d.ts.map +1 -1
  3. package/node/lib/Worker.js +14 -0
  4. package/package.json +4 -2
  5. package/worker/fuzzer/src/RTC/FuzzerDtlsTransport.cpp +9 -3
  6. package/worker/fuzzer/src/RTC/RTP/FuzzerRtpStreamSend.cpp +9 -1
  7. package/worker/include/Channel/ChannelMessageRegistrator.hpp +39 -0
  8. package/worker/include/Channel/ChannelMessageRegistratorInterface.hpp +32 -0
  9. package/worker/include/Channel/ChannelSocket.hpp +1 -1
  10. package/worker/include/DepUsrSCTP.hpp +8 -7
  11. package/worker/include/RTC/ActiveSpeakerObserver.hpp +7 -7
  12. package/worker/include/RTC/AudioLevelObserver.hpp +7 -7
  13. package/worker/include/RTC/Consumer.hpp +3 -3
  14. package/worker/include/RTC/DataConsumer.hpp +3 -3
  15. package/worker/include/RTC/DataProducer.hpp +3 -3
  16. package/worker/include/RTC/DirectTransport.hpp +2 -2
  17. package/worker/include/RTC/DtlsTransport.hpp +8 -6
  18. package/worker/include/RTC/ICE/IceServer.hpp +8 -5
  19. package/worker/include/RTC/KeyFrameRequestManager.hpp +15 -12
  20. package/worker/include/RTC/NackGenerator.hpp +7 -6
  21. package/worker/include/RTC/PipeConsumer.hpp +1 -2
  22. package/worker/include/RTC/PipeTransport.hpp +2 -2
  23. package/worker/include/RTC/PlainTransport.hpp +2 -2
  24. package/worker/include/RTC/Producer.hpp +3 -3
  25. package/worker/include/RTC/RTP/RtpStream.hpp +7 -1
  26. package/worker/include/RTC/RTP/RtpStreamRecv.hpp +6 -5
  27. package/worker/include/RTC/RTP/RtpStreamSend.hpp +4 -1
  28. package/worker/include/RTC/Router.hpp +3 -3
  29. package/worker/include/RTC/RtpObserver.hpp +3 -3
  30. package/worker/include/RTC/SCTP/TODO_SCTP.md +18 -6
  31. package/worker/include/RTC/SCTP/association/Association.hpp +11 -8
  32. package/worker/include/RTC/SCTP/association/HeartbeatHandler.hpp +9 -6
  33. package/worker/include/RTC/SCTP/association/StreamResetHandler.hpp +37 -23
  34. package/worker/include/RTC/SCTP/association/TCBContext.hpp +3 -2
  35. package/worker/include/RTC/SCTP/association/TransmissionControlBlock.hpp +81 -8
  36. package/worker/include/RTC/SCTP/packet/UserData.hpp +36 -0
  37. package/worker/include/RTC/SCTP/packet/chunks/ForwardTsnChunk.hpp +1 -1
  38. package/worker/include/RTC/SCTP/packet/chunks/IForwardTsnChunk.hpp +1 -1
  39. package/worker/include/RTC/SCTP/public/SctpOptions.hpp +2 -1
  40. package/worker/include/RTC/SCTP/tx/OutstandingData.hpp +604 -0
  41. package/worker/include/RTC/SCTP/tx/RetransmissionQueue.hpp +336 -0
  42. package/worker/include/RTC/SCTP/tx/RetransmissionTimeout.hpp +5 -4
  43. package/worker/include/RTC/Serializable.hpp +8 -0
  44. package/worker/include/RTC/SimpleConsumer.hpp +1 -2
  45. package/worker/include/RTC/SimulcastConsumer.hpp +1 -2
  46. package/worker/include/RTC/SvcConsumer.hpp +1 -2
  47. package/worker/include/RTC/Transport.hpp +8 -8
  48. package/worker/include/RTC/TransportCongestionControlClient.hpp +8 -5
  49. package/worker/include/RTC/TransportCongestionControlServer.hpp +8 -5
  50. package/worker/include/RTC/WebRtcServer.hpp +3 -3
  51. package/worker/include/RTC/WebRtcTransport.hpp +3 -3
  52. package/worker/include/Shared.hpp +40 -0
  53. package/worker/include/SharedInterface.hpp +44 -0
  54. package/worker/include/Utils.hpp +6 -0
  55. package/worker/include/Worker.hpp +3 -3
  56. package/worker/include/common.hpp +1 -1
  57. package/worker/include/handles/BackoffTimerHandle.hpp +27 -65
  58. package/worker/include/handles/BackoffTimerHandleInterface.hpp +116 -0
  59. package/worker/include/handles/TimerHandle.hpp +36 -20
  60. package/worker/include/handles/TimerHandleInterface.hpp +43 -0
  61. package/worker/meson.build +21 -4
  62. package/worker/meson_options.txt +2 -1
  63. package/worker/mocks/include/Channel/MockChannelMessageRegistrator.hpp +45 -0
  64. package/worker/mocks/include/MockShared.hpp +43 -0
  65. package/worker/mocks/src/Channel/MockChannelMessageRegistrator.cpp +128 -0
  66. package/worker/mocks/src/MockShared.cpp +26 -0
  67. package/worker/scripts/clang-scripts.mjs +4 -1
  68. package/worker/src/Channel/ChannelMessageRegistrator.cpp +125 -0
  69. package/worker/src/Channel/ChannelSocket.cpp +1 -1
  70. package/worker/src/DepUsrSCTP.cpp +10 -4
  71. package/worker/src/RTC/ActiveSpeakerObserver.cpp +7 -7
  72. package/worker/src/RTC/AudioLevelObserver.cpp +12 -10
  73. package/worker/src/RTC/Consumer.cpp +23 -20
  74. package/worker/src/RTC/DataConsumer.cpp +11 -11
  75. package/worker/src/RTC/DataProducer.cpp +3 -3
  76. package/worker/src/RTC/DirectTransport.cpp +16 -16
  77. package/worker/src/RTC/DtlsTransport.cpp +4 -4
  78. package/worker/src/RTC/ICE/IceServer.cpp +4 -3
  79. package/worker/src/RTC/KeyFrameRequestManager.cpp +15 -15
  80. package/worker/src/RTC/NackGenerator.cpp +3 -3
  81. package/worker/src/RTC/PipeConsumer.cpp +5 -4
  82. package/worker/src/RTC/PipeTransport.cpp +3 -3
  83. package/worker/src/RTC/PlainTransport.cpp +10 -9
  84. package/worker/src/RTC/Producer.cpp +30 -28
  85. package/worker/src/RTC/RTCP/FeedbackPsRpsi.cpp +1 -2
  86. package/worker/src/RTC/RTP/RtpStream.cpp +9 -2
  87. package/worker/src/RTC/RTP/RtpStreamRecv.cpp +5 -4
  88. package/worker/src/RTC/RTP/RtpStreamSend.cpp +5 -2
  89. package/worker/src/RTC/Router.cpp +3 -3
  90. package/worker/src/RTC/RtpObserver.cpp +2 -1
  91. package/worker/src/RTC/SCTP/association/Association.cpp +94 -114
  92. package/worker/src/RTC/SCTP/association/HeartbeatHandler.cpp +27 -21
  93. package/worker/src/RTC/SCTP/association/StreamResetHandler.cpp +52 -55
  94. package/worker/src/RTC/SCTP/association/TransmissionControlBlock.cpp +144 -25
  95. package/worker/src/RTC/SCTP/packet/chunks/ForwardTsnChunk.cpp +2 -2
  96. package/worker/src/RTC/SCTP/packet/chunks/IForwardTsnChunk.cpp +2 -2
  97. package/worker/src/RTC/SCTP/tx/OutstandingData.cpp +905 -0
  98. package/worker/src/RTC/SCTP/tx/RetransmissionQueue.cpp +799 -0
  99. package/worker/src/RTC/SCTP/tx/RetransmissionTimeout.cpp +1 -1
  100. package/worker/src/RTC/SctpAssociation.cpp +1 -1
  101. package/worker/src/RTC/SimpleConsumer.cpp +8 -7
  102. package/worker/src/RTC/SimulcastConsumer.cpp +11 -10
  103. package/worker/src/RTC/SvcConsumer.cpp +11 -10
  104. package/worker/src/RTC/Transport.cpp +36 -26
  105. package/worker/src/RTC/TransportCongestionControlClient.cpp +4 -2
  106. package/worker/src/RTC/TransportCongestionControlServer.cpp +4 -3
  107. package/worker/src/RTC/WebRtcServer.cpp +5 -4
  108. package/worker/src/RTC/WebRtcTransport.cpp +39 -26
  109. package/worker/src/Shared.cpp +35 -0
  110. package/worker/src/Worker.cpp +10 -23
  111. package/worker/src/handles/BackoffTimerHandle.cpp +11 -16
  112. package/worker/src/handles/TimerHandle.cpp +5 -4
  113. package/worker/src/lib.cpp +14 -1
  114. package/worker/tasks.py +1 -1
  115. package/worker/test/include/RTC/ICE/iceCommon.hpp +1 -0
  116. package/worker/test/include/RTC/RTP/rtpCommon.hpp +1 -0
  117. package/worker/test/include/RTC/SCTP/sctpCommon.hpp +6 -0
  118. package/worker/test/src/RTC/RTP/TestRtpStreamRecv.cpp +12 -5
  119. package/worker/test/src/RTC/RTP/TestRtpStreamSend.cpp +34 -23
  120. package/worker/test/src/RTC/SCTP/tx/TestOutstandingData.cpp +1196 -0
  121. package/worker/test/src/RTC/SCTP/tx/TestRetransmissionTimeout.cpp +33 -33
  122. package/worker/test/src/RTC/TestKeyFrameRequestManager.cpp +14 -6
  123. package/worker/test/src/RTC/TestNackGenerator.cpp +6 -2
  124. package/worker/test/src/RTC/TestSimpleConsumer.cpp +6 -10
  125. package/worker/test/src/RTC/TestTransportCongestionControlServer.cpp +9 -2
  126. package/worker/test/src/Utils/TestByte.cpp +98 -0
  127. package/worker/include/ChannelMessageRegistrator.hpp +0 -30
  128. package/worker/include/RTC/Shared.hpp +0 -23
  129. package/worker/src/ChannelMessageRegistrator.cpp +0 -119
  130. package/worker/src/RTC/Shared.cpp +0 -23
@@ -27,7 +27,7 @@ namespace RTC
27
27
  /* Instance methods. */
28
28
 
29
29
  Producer::Producer(
30
- RTC::Shared* shared,
30
+ SharedInterface* shared,
31
31
  const std::string& id,
32
32
  RTC::Producer::Listener* listener,
33
33
  const FBS::Transport::ProduceRequest* data)
@@ -209,11 +209,12 @@ namespace RTC
209
209
  {
210
210
  auto keyFrameRequestDelay = data->keyFrameRequestDelay();
211
211
 
212
- this->keyFrameRequestManager = new RTC::KeyFrameRequestManager(this, keyFrameRequestDelay);
212
+ this->keyFrameRequestManager =
213
+ new RTC::KeyFrameRequestManager(this, this->shared, keyFrameRequestDelay);
213
214
  }
214
215
 
215
216
  // NOTE: This may throw.
216
- this->shared->channelMessageRegistrator->RegisterHandler(
217
+ this->shared->GetChannelMessageRegistrator()->RegisterHandler(
217
218
  this->id,
218
219
  /*channelRequestHandler*/ this,
219
220
  /*channelNotificationHandler*/ this);
@@ -223,7 +224,7 @@ namespace RTC
223
224
  {
224
225
  MS_TRACE();
225
226
 
226
- this->shared->channelMessageRegistrator->UnregisterHandler(this->id);
227
+ this->shared->GetChannelMessageRegistrator()->UnregisterHandler(this->id);
227
228
 
228
229
  // Delete all streams.
229
230
  for (auto& kv : this->mapSsrcRtpStream)
@@ -1131,7 +1132,8 @@ namespace RTC
1131
1132
  this->type == RtpParameters::Type::SIMULCAST && this->rtpMapping.encodings.size() > 1;
1132
1133
 
1133
1134
  // Create a RtpStreamRecv for receiving a media stream.
1134
- auto* rtpStream = new RTC::RTP::RtpStreamRecv(this, params, SendNackDelay, useRtpInactivityCheck);
1135
+ auto* rtpStream =
1136
+ new RTC::RTP::RtpStreamRecv(this, this->shared, params, SendNackDelay, useRtpInactivityCheck);
1135
1137
 
1136
1138
  // Insert into the maps.
1137
1139
  this->mapSsrcRtpStream[ssrc] = rtpStream;
@@ -1433,12 +1435,12 @@ namespace RTC
1433
1435
  this->videoOrientation.rotation = rotation;
1434
1436
 
1435
1437
  auto notification = FBS::Producer::CreateVideoOrientationChangeNotification(
1436
- this->shared->channelNotifier->GetBufferBuilder(),
1438
+ this->shared->GetChannelNotifier()->GetBufferBuilder(),
1437
1439
  this->videoOrientation.camera,
1438
1440
  this->videoOrientation.flip,
1439
1441
  this->videoOrientation.rotation);
1440
1442
 
1441
- this->shared->channelNotifier->Emit(
1443
+ this->shared->GetChannelNotifier()->Emit(
1442
1444
  this->id,
1443
1445
  FBS::Notification::Event::PRODUCER_VIDEO_ORIENTATION_CHANGE,
1444
1446
  FBS::Notification::Body::Producer_VideoOrientationChangeNotification,
@@ -1463,7 +1465,7 @@ namespace RTC
1463
1465
 
1464
1466
  scores.emplace_back(
1465
1467
  FBS::Producer::CreateScoreDirect(
1466
- this->shared->channelNotifier->GetBufferBuilder(),
1468
+ this->shared->GetChannelNotifier()->GetBufferBuilder(),
1467
1469
  rtpStream->GetEncodingIdx(),
1468
1470
  rtpStream->GetSsrc(),
1469
1471
  !rtpStream->GetRid().empty() ? rtpStream->GetRid().c_str() : nullptr,
@@ -1471,9 +1473,9 @@ namespace RTC
1471
1473
  }
1472
1474
 
1473
1475
  auto notification = FBS::Producer::CreateScoreNotificationDirect(
1474
- this->shared->channelNotifier->GetBufferBuilder(), &scores);
1476
+ this->shared->GetChannelNotifier()->GetBufferBuilder(), &scores);
1475
1477
 
1476
- this->shared->channelNotifier->Emit(
1478
+ this->shared->GetChannelNotifier()->Emit(
1477
1479
  this->id,
1478
1480
  FBS::Notification::Event::PRODUCER_SCORE,
1479
1481
  FBS::Notification::Body::Producer_ScoreNotification,
@@ -1486,12 +1488,12 @@ namespace RTC
1486
1488
 
1487
1489
  if (this->traceEventTypes.keyframe && packet->IsKeyFrame())
1488
1490
  {
1489
- auto rtpPacketDump = packet->FillBuffer(this->shared->channelNotifier->GetBufferBuilder());
1490
- auto traceInfo = FBS::Producer::CreateKeyFrameTraceInfo(
1491
- this->shared->channelNotifier->GetBufferBuilder(), rtpPacketDump, isRtx);
1491
+ auto rtpPacketDump = packet->FillBuffer(this->shared->GetChannelNotifier()->GetBufferBuilder());
1492
+ auto traceInfo = FBS::Producer::CreateKeyFrameTraceInfo(
1493
+ this->shared->GetChannelNotifier()->GetBufferBuilder(), rtpPacketDump, isRtx);
1492
1494
 
1493
1495
  auto notification = FBS::Producer::CreateTraceNotification(
1494
- this->shared->channelNotifier->GetBufferBuilder(),
1496
+ this->shared->GetChannelNotifier()->GetBufferBuilder(),
1495
1497
  FBS::Producer::TraceEventType::KEYFRAME,
1496
1498
  DepLibUV::GetTimeMs(),
1497
1499
  FBS::Common::TraceDirection::DIRECTION_IN,
@@ -1502,12 +1504,12 @@ namespace RTC
1502
1504
  }
1503
1505
  else if (this->traceEventTypes.rtp)
1504
1506
  {
1505
- auto rtpPacketDump = packet->FillBuffer(this->shared->channelNotifier->GetBufferBuilder());
1506
- auto traceInfo = FBS::Producer::CreateRtpTraceInfo(
1507
- this->shared->channelNotifier->GetBufferBuilder(), rtpPacketDump, isRtx);
1507
+ auto rtpPacketDump = packet->FillBuffer(this->shared->GetChannelNotifier()->GetBufferBuilder());
1508
+ auto traceInfo = FBS::Producer::CreateRtpTraceInfo(
1509
+ this->shared->GetChannelNotifier()->GetBufferBuilder(), rtpPacketDump, isRtx);
1508
1510
 
1509
1511
  auto notification = FBS::Producer::CreateTraceNotification(
1510
- this->shared->channelNotifier->GetBufferBuilder(),
1512
+ this->shared->GetChannelNotifier()->GetBufferBuilder(),
1511
1513
  FBS::Producer::TraceEventType::RTP,
1512
1514
  DepLibUV::GetTimeMs(),
1513
1515
  FBS::Common::TraceDirection::DIRECTION_IN,
@@ -1527,11 +1529,11 @@ namespace RTC
1527
1529
  return;
1528
1530
  }
1529
1531
 
1530
- auto traceInfo =
1531
- FBS::Producer::CreatePliTraceInfo(this->shared->channelNotifier->GetBufferBuilder(), ssrc);
1532
+ auto traceInfo = FBS::Producer::CreatePliTraceInfo(
1533
+ this->shared->GetChannelNotifier()->GetBufferBuilder(), ssrc);
1532
1534
 
1533
1535
  auto notification = FBS::Producer::CreateTraceNotification(
1534
- this->shared->channelNotifier->GetBufferBuilder(),
1536
+ this->shared->GetChannelNotifier()->GetBufferBuilder(),
1535
1537
  FBS::Producer::TraceEventType::PLI,
1536
1538
  DepLibUV::GetTimeMs(),
1537
1539
  FBS::Common::TraceDirection::DIRECTION_OUT,
@@ -1550,11 +1552,11 @@ namespace RTC
1550
1552
  return;
1551
1553
  }
1552
1554
 
1553
- auto traceInfo =
1554
- FBS::Producer::CreateFirTraceInfo(this->shared->channelNotifier->GetBufferBuilder(), ssrc);
1555
+ auto traceInfo = FBS::Producer::CreateFirTraceInfo(
1556
+ this->shared->GetChannelNotifier()->GetBufferBuilder(), ssrc);
1555
1557
 
1556
1558
  auto notification = FBS::Producer::CreateTraceNotification(
1557
- this->shared->channelNotifier->GetBufferBuilder(),
1559
+ this->shared->GetChannelNotifier()->GetBufferBuilder(),
1558
1560
  FBS::Producer::TraceEventType::FIR,
1559
1561
  DepLibUV::GetTimeMs(),
1560
1562
  FBS::Common::TraceDirection::DIRECTION_OUT,
@@ -1574,7 +1576,7 @@ namespace RTC
1574
1576
  }
1575
1577
 
1576
1578
  auto notification = FBS::Producer::CreateTraceNotification(
1577
- this->shared->channelNotifier->GetBufferBuilder(),
1579
+ this->shared->GetChannelNotifier()->GetBufferBuilder(),
1578
1580
  FBS::Producer::TraceEventType::NACK,
1579
1581
  DepLibUV::GetTimeMs(),
1580
1582
  FBS::Common::TraceDirection::DIRECTION_OUT);
@@ -1592,7 +1594,7 @@ namespace RTC
1592
1594
  }
1593
1595
 
1594
1596
  auto traceInfo = FBS::Producer::CreateSrTraceInfo(
1595
- this->shared->channelNotifier->GetBufferBuilder(),
1597
+ this->shared->GetChannelNotifier()->GetBufferBuilder(),
1596
1598
  report->GetSsrc(),
1597
1599
  report->GetNtpSec(),
1598
1600
  report->GetNtpFrac(),
@@ -1601,7 +1603,7 @@ namespace RTC
1601
1603
  report->GetOctetCount());
1602
1604
 
1603
1605
  auto notification = FBS::Producer::CreateTraceNotification(
1604
- this->shared->channelNotifier->GetBufferBuilder(),
1606
+ this->shared->GetChannelNotifier()->GetBufferBuilder(),
1605
1607
  FBS::Producer::TraceEventType::SR,
1606
1608
  DepLibUV::GetTimeMs(),
1607
1609
  FBS::Common::TraceDirection::DIRECTION_IN,
@@ -1616,7 +1618,7 @@ namespace RTC
1616
1618
  {
1617
1619
  MS_TRACE();
1618
1620
 
1619
- this->shared->channelNotifier->Emit(
1621
+ this->shared->GetChannelNotifier()->Emit(
1620
1622
  this->id,
1621
1623
  FBS::Notification::Event::PRODUCER_TRACE,
1622
1624
  FBS::Notification::Body::Producer_TraceNotification,
@@ -1,9 +1,8 @@
1
- #include <cstdint>
2
1
  #define MS_CLASS "RTC::RTCP::FeedbackPsRpsi"
3
2
  // #define MS_LOG_DEV_LEVEL 3
4
3
 
5
- #include "Logger.hpp"
6
4
  #include "RTC/RTCP/FeedbackPsRpsi.hpp"
5
+ #include "Logger.hpp"
7
6
  #include <cstring>
8
7
 
9
8
  namespace RTC
@@ -19,8 +19,15 @@ namespace RTC
19
19
  /* Instance methods. */
20
20
 
21
21
  RtpStream::RtpStream(
22
- RTP::RtpStream::Listener* listener, RTP::RtpStream::Params& params, uint8_t initialScore)
23
- : listener(listener), params(params), score(initialScore), activeSinceMs(DepLibUV::GetTimeMs())
22
+ RTP::RtpStream::Listener* listener,
23
+ SharedInterface* shared,
24
+ RTP::RtpStream::Params& params,
25
+ uint8_t initialScore)
26
+ : listener(listener),
27
+ shared(shared),
28
+ params(params),
29
+ score(initialScore),
30
+ activeSinceMs(DepLibUV::GetTimeMs())
24
31
  {
25
32
  MS_TRACE();
26
33
  }
@@ -183,10 +183,11 @@ namespace RTC
183
183
 
184
184
  RtpStreamRecv::RtpStreamRecv(
185
185
  RTP::RtpStreamRecv::Listener* listener,
186
+ SharedInterface* shared,
186
187
  RTP::RtpStream::Params& params,
187
188
  uint32_t sendNackDelayMs,
188
189
  bool useRtpInactivityCheck)
189
- : RTP::RtpStream::RtpStream(listener, params, 10),
190
+ : RTP::RtpStream::RtpStream(listener, shared, params, 10),
190
191
  sendNackDelayMs(sendNackDelayMs),
191
192
  useRtpInactivityCheck(useRtpInactivityCheck),
192
193
  transmissionCounter(
@@ -197,7 +198,7 @@ namespace RTC
197
198
 
198
199
  if (this->params.useNack)
199
200
  {
200
- this->nackGenerator.reset(new RTC::NackGenerator(this, this->sendNackDelayMs));
201
+ this->nackGenerator.reset(new RTC::NackGenerator(this, this->shared, this->sendNackDelayMs));
201
202
  }
202
203
 
203
204
  this->inactive = false;
@@ -206,7 +207,7 @@ namespace RTC
206
207
  {
207
208
  // Run the RTP inactivity periodic timer (use a different timeout if DTX is
208
209
  // enabled).
209
- this->inactivityCheckPeriodicTimer = new TimerHandle(this);
210
+ this->inactivityCheckPeriodicTimer = this->shared->CreateTimer(this);
210
211
 
211
212
  this->inactivityCheckPeriodicTimer->Start(
212
213
  this->params.useDtx ? InactivityCheckIntervalWithDtx : InactivityCheckInterval);
@@ -858,7 +859,7 @@ namespace RTC
858
859
  // Nothing to do.
859
860
  }
860
861
 
861
- inline void RtpStreamRecv::OnTimer(TimerHandle* timer)
862
+ inline void RtpStreamRecv::OnTimer(TimerHandleInterface* timer)
862
863
  {
863
864
  MS_TRACE();
864
865
 
@@ -33,8 +33,11 @@ namespace RTC
33
33
  /* Instance methods. */
34
34
 
35
35
  RtpStreamSend::RtpStreamSend(
36
- RTP::RtpStreamSend::Listener* listener, RTP::RtpStream::Params& params, std::string& mid)
37
- : RTP::RtpStream::RtpStream(listener, params, 10),
36
+ RTP::RtpStreamSend::Listener* listener,
37
+ SharedInterface* shared,
38
+ RTP::RtpStream::Params& params,
39
+ std::string& mid)
40
+ : RTP::RtpStream::RtpStream(listener, shared, params, 10),
38
41
  mid(mid),
39
42
  transmissionCounter(/*ignorePaddingOnlyPackets*/ true)
40
43
  {
@@ -19,13 +19,13 @@ namespace RTC
19
19
  {
20
20
  /* Instance methods. */
21
21
 
22
- Router::Router(RTC::Shared* shared, const std::string& id, Listener* listener)
22
+ Router::Router(SharedInterface* shared, const std::string& id, Listener* listener)
23
23
  : id(id), shared(shared), listener(listener)
24
24
  {
25
25
  MS_TRACE();
26
26
 
27
27
  // NOTE: This may throw.
28
- this->shared->channelMessageRegistrator->RegisterHandler(
28
+ this->shared->GetChannelMessageRegistrator()->RegisterHandler(
29
29
  this->id,
30
30
  /*channelRequestHandler*/ this,
31
31
  /*ChannelNotificationHandler*/ nullptr);
@@ -35,7 +35,7 @@ namespace RTC
35
35
  {
36
36
  MS_TRACE();
37
37
 
38
- this->shared->channelMessageRegistrator->UnregisterHandler(this->id);
38
+ this->shared->GetChannelMessageRegistrator()->UnregisterHandler(this->id);
39
39
 
40
40
  // Close all Transports.
41
41
  for (auto& kv : this->mapTransports)
@@ -9,7 +9,8 @@ namespace RTC
9
9
  {
10
10
  /* Instance methods. */
11
11
 
12
- RtpObserver::RtpObserver(RTC::Shared* shared, const std::string& id, RTC::RtpObserver::Listener* listener)
12
+ RtpObserver::RtpObserver(
13
+ SharedInterface* shared, const std::string& id, RTC::RtpObserver::Listener* listener)
13
14
  : id(id), shared(shared), listener(listener)
14
15
  {
15
16
  MS_TRACE();