提交 7fc6a08a authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Working on new video Consumer not being rendered in existing clients.

上级 64152f2e
# BUGS in mediasoup v2 (server-side)
* PeerA is joined. Later PeerB joins with audio+video. PeerA does not render the video from PeerB (note: we are not relaying PLI yet, but it should work). Suspecting logs:
```
mediasoup:WARN:mediasoup-worker [id:bnicjuxw#1] RTC::Transport::HandleConsumer() | requesting fullframe for new Consumer since Transport already connected +20s
mediasoup-demo-server:INFO:Room mediaPeer "newconsumer" event [id:50465828] +31ms
mediasoup-demo-server:INFO:Room mediaPeer "newproducer" event [id:91290656] +0ms
mediasoup-demo-server:INFO:Room mediaPeer "newconsumer" event [id:13942695] +179ms
mediasoup-demo-server:INFO:Room mediaPeer "newproducer" event [id:24688710] +1ms
mediasoup:WARN:mediasoup-worker [id:bnicjuxw#1] RTC::Transport::HandleConsumer() | requesting fullframe for new Consumer since Transport already connected +365ms
mediasoup:WARN:mediasoup-worker [id:bnicjuxw#1] RTC::RtpStreamSend::StorePacket() | ignoring packet older than anything in the buffer [ssrc:1815865740, seq:18175] +7ms
mediasoup:WARN:mediasoup-worker [id:bnicjuxw#1] RTC::RtpStreamSend::StorePacket() | ignoring packet older than anything in the buffer [ssrc:1815865740, seq:18175] +10ms
```
# TODO in mediasoup v2 (server-side) # TODO in mediasoup v2 (server-side)
* Set a proper value for Producer::FullFrameRequestBlockTimeout (currently 1 second). * Set a proper value for Producer::FullFrameRequestBlockTimeout (currently 1 second).
......
...@@ -180,7 +180,6 @@ namespace RTC ...@@ -180,7 +180,6 @@ namespace RTC
/* Inline instance methods. */ /* Inline instance methods. */
// TODO: Used?
inline bool Transport::IsConnected() const inline bool Transport::IsConnected() const
{ {
return this->dtlsTransport->GetState() == RTC::DtlsTransport::DtlsState::CONNECTED; return this->dtlsTransport->GetState() == RTC::DtlsTransport::DtlsState::CONNECTED;
......
...@@ -70,7 +70,7 @@ namespace RTC ...@@ -70,7 +70,7 @@ namespace RTC
{ {
MS_WARN_TAG( MS_WARN_TAG(
rtx, rtx,
"ignoring RTX packet with invalid payload type [ssrc: %" PRIu32 " seqnr: %" PRIu16 "ignoring RTX packet with invalid payload type [ssrc: %" PRIu32 " seq: %" PRIu16
" payload type: %" PRIu8 "]", " payload type: %" PRIu8 "]",
packet->GetSsrc(), packet->GetSsrc(),
packet->GetSequenceNumber(), packet->GetSequenceNumber(),
...@@ -87,11 +87,21 @@ namespace RTC ...@@ -87,11 +87,21 @@ namespace RTC
{ {
// Ignore RTX packets with no payload. // Ignore RTX packets with no payload.
if (packet->GetPayloadLength() < 2) if (packet->GetPayloadLength() < 2)
{
MS_DEBUG_TAG(
rtx,
"ignoring empty RTX packet [ssrc: %" PRIu32 " seq: %" PRIu16
" payload type: %" PRIu8 "]",
packet->GetSsrc(),
packet->GetSequenceNumber(),
packet->GetPayloadType());
return false; return false;
}
MS_WARN_TAG( MS_WARN_TAG(
rtx, rtx,
"ignoring malformed RTX packet [ssrc: %" PRIu32 " seqnr: %" PRIu16 "ignoring malformed RTX packet [ssrc: %" PRIu32 " seq: %" PRIu16
" payload type: %" PRIu8 "]", " payload type: %" PRIu8 "]",
packet->GetSsrc(), packet->GetSsrc(),
packet->GetSequenceNumber(), packet->GetSequenceNumber(),
...@@ -102,8 +112,8 @@ namespace RTC ...@@ -102,8 +112,8 @@ namespace RTC
MS_DEBUG_TAG( MS_DEBUG_TAG(
rtx, rtx,
"received RTX packet [ssrc: %" PRIu32 " seqnr: %" PRIu16 "received RTX packet [ssrc: %" PRIu32 " seq: %" PRIu16
"] recovering original [ssrc: %" PRIu32 " seqnr: %" PRIu16 "]", "] recovering original [ssrc: %" PRIu32 " seq: %" PRIu16 "]",
this->rtxSsrc, this->rtxSsrc,
rtxSeq, rtxSeq,
packet->GetSsrc(), packet->GetSsrc(),
......
...@@ -324,6 +324,9 @@ namespace RTC ...@@ -324,6 +324,9 @@ namespace RTC
this->receivedBytes = 0; this->receivedBytes = 0;
this->lastPacketTimeMs = 0; this->lastPacketTimeMs = 0;
this->lastPacketRtpTimestamp = 0; this->lastPacketRtpTimestamp = 0;
// Clear the buffer.
ClearBuffer();
} }
void RtpStreamSend::ClearBuffer() void RtpStreamSend::ClearBuffer()
......
...@@ -617,6 +617,19 @@ namespace RTC ...@@ -617,6 +617,19 @@ namespace RTC
// Add us as listener. // Add us as listener.
consumer->AddListener(this); consumer->AddListener(this);
// If we are connected, ask a fullrequest for this enabled Consumer.
if (IsConnected())
{
if (consumer->kind == RTC::Media::Kind::VIDEO)
{
MS_DEBUG_TAG(
rtx,
"requesting fullframe for new Consumer since Transport already connected");
}
consumer->RequestFullFrame();
}
} }
void Transport::SendRtpPacket(RTC::RtpPacket* packet) void Transport::SendRtpPacket(RTC::RtpPacket* packet)
...@@ -1256,6 +1269,9 @@ namespace RTC ...@@ -1256,6 +1269,9 @@ namespace RTC
// Iterate all the Consumers and request full frame. // Iterate all the Consumers and request full frame.
for (auto* consumer : this->consumers) for (auto* consumer : this->consumers)
{ {
if (consumer->kind == RTC::Media::Kind::VIDEO)
MS_DEBUG_TAG(rtx, "Transport connected, requesting fullframe for Consumers");
consumer->RequestFullFrame(); consumer->RequestFullFrame();
} }
} }
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论