提交 529538ae authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Improve SimulcastConsumer::RecalculateTargetSpatialLayer()

上级 54dde57d
......@@ -11,7 +11,7 @@
#include "RTC/RtpDictionaries.hpp"
#include "RTC/RtpHeaderExtensionIds.hpp"
#include "RTC/RtpPacket.hpp"
#include "RTC/RtpStreamRecv.hpp"
#include "RTC/RtpStream.hpp"
#include <string>
#include <unordered_set>
#include <vector>
......@@ -55,9 +55,9 @@ namespace RTC
virtual uint32_t UseBandwidth(uint32_t availableBandwidth) = 0;
void ProducerPaused();
void ProducerResumed();
virtual void ProducerRtpStream(RTC::RtpStreamRecv* rtpStream, uint32_t mappedSsrc) = 0;
virtual void ProducerNewRtpStream(RTC::RtpStreamRecv* rtpStream, uint32_t mappedSsrc) = 0;
virtual void ProducerRtpStreamScore(RTC::RtpStreamRecv* rtpStream, uint8_t score) = 0;
virtual void ProducerRtpStream(RTC::RtpStream* rtpStream, uint32_t mappedSsrc) = 0;
virtual void ProducerNewRtpStream(RTC::RtpStream* rtpStream, uint32_t mappedSsrc) = 0;
virtual void ProducerRtpStreamScore(RTC::RtpStream* rtpStream, uint8_t score) = 0;
void ProducerClosed();
virtual void SendRtpPacket(RTC::RtpPacket* packet) = 0;
virtual void GetRtcp(RTC::RTCP::CompoundPacket* packet, uint64_t now) = 0;
......
......@@ -18,9 +18,9 @@ namespace RTC
void FillJsonScore(json& jsonObject) const override;
void HandleRequest(Channel::Request* request) override;
uint32_t UseBandwidth(uint32_t availableBandwidth) override;
void ProducerRtpStream(RTC::RtpStreamRecv* rtpStream, uint32_t mappedSsrc) override;
void ProducerNewRtpStream(RTC::RtpStreamRecv* rtpStream, uint32_t mappedSsrc) override;
void ProducerRtpStreamScore(RTC::RtpStreamRecv* rtpStream, uint8_t score) 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) override;
void SendRtpPacket(RTC::RtpPacket* packet) override;
void GetRtcp(RTC::RTCP::CompoundPacket* packet, uint64_t now) override;
void NeedWorstRemoteFractionLost(uint32_t mappedSsrc, uint8_t& worstRemoteFractionLost) override;
......
......@@ -27,9 +27,9 @@ namespace RTC
virtual void OnProducerPaused(RTC::Producer* producer) = 0;
virtual void OnProducerResumed(RTC::Producer* producer) = 0;
virtual void OnProducerNewRtpStream(
RTC::Producer* producer, RTC::RtpStreamRecv* rtpStream, uint32_t mappedSsrc) = 0;
RTC::Producer* producer, RTC::RtpStream* rtpStream, uint32_t mappedSsrc) = 0;
virtual void OnProducerRtpStreamScore(
RTC::Producer* producer, RTC::RtpStreamRecv* rtpStream, uint8_t score) = 0;
RTC::Producer* producer, RTC::RtpStream* rtpStream, uint8_t score) = 0;
virtual void OnProducerRtpPacketReceived(RTC::Producer* producer, RTC::RtpPacket* packet) = 0;
virtual void OnProducerSendRtcpPacket(RTC::Producer* producer, RTC::RTCP::Packet* packet) = 0;
virtual void OnProducerNeedWorstRemoteFractionLost(
......
......@@ -44,7 +44,7 @@ namespace RTC
void OnTransportProducerNewRtpStream(
RTC::Transport* transport,
RTC::Producer* producer,
RTC::RtpStreamRecv* rtpStream,
RTC::RtpStream* rtpStream,
uint32_t mappedSsrc) override;
void OnTransportProducerRtpPacketReceived(
RTC::Transport* transport, RTC::Producer* producer, RTC::RtpPacket* packet) override;
......@@ -56,7 +56,7 @@ namespace RTC
void OnTransportProducerRtpStreamScore(
RTC::Transport* transport,
RTC::Producer* producer,
RTC::RtpStreamRecv* rtpStream,
RTC::RtpStream* rtpStream,
uint8_t score) override;
void OnTransportNewConsumer(
RTC::Transport* transport, RTC::Consumer* consumer, std::string& producerId) override;
......
......@@ -19,9 +19,9 @@ namespace RTC
void FillJsonScore(json& jsonObject) const override;
void HandleRequest(Channel::Request* request) override;
uint32_t UseBandwidth(uint32_t availableBandwidth) override;
void ProducerRtpStream(RTC::RtpStreamRecv* rtpStream, uint32_t mappedSsrc) override;
void ProducerNewRtpStream(RTC::RtpStreamRecv* rtpStream, uint32_t mappedSsrc) override;
void ProducerRtpStreamScore(RTC::RtpStreamRecv* rtpStream, uint8_t score) 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) override;
void SendRtpPacket(RTC::RtpPacket* packet) override;
void GetRtcp(RTC::RTCP::CompoundPacket* packet, uint64_t now) override;
void NeedWorstRemoteFractionLost(uint32_t mappedSsrc, uint8_t& worstRemoteFractionLost) override;
......
......@@ -20,9 +20,9 @@ namespace RTC
void FillJsonScore(json& jsonObject) const override;
void HandleRequest(Channel::Request* request) override;
uint32_t UseBandwidth(uint32_t availableBandwidth) override;
void ProducerRtpStream(RTC::RtpStreamRecv* rtpStream, uint32_t mappedSsrc) override;
void ProducerNewRtpStream(RTC::RtpStreamRecv* rtpStream, uint32_t mappedSsrc) override;
void ProducerRtpStreamScore(RTC::RtpStreamRecv* rtpStream, uint8_t score) 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) override;
void SendRtpPacket(RTC::RtpPacket* packet) override;
void GetRtcp(RTC::RTCP::CompoundPacket* packet, uint64_t now) override;
void NeedWorstRemoteFractionLost(uint32_t mappedSsrc, uint8_t& worstRemoteFractionLost) override;
......@@ -39,7 +39,7 @@ namespace RTC
void RequestKeyFrame();
void RetransmitRtpPacket(RTC::RtpPacket* packet);
void EmitScore() const;
void UpdateLayers();
void UpdateCurrentLayers();
void RecalculateTargetSpatialLayer();
RTC::RtpStream* GetProducerCurrentRtpStream() const;
RTC::RtpStream* GetProducerTargetRtpStream() const;
......
......@@ -35,12 +35,12 @@ namespace RTC
virtual void OnTransportProducerNewRtpStream(
RTC::Transport* transport,
RTC::Producer* producer,
RTC::RtpStreamRecv* rtpStream,
RTC::RtpStream* rtpStream,
uint32_t mappedSsrc) = 0;
virtual void OnTransportProducerRtpStreamScore(
RTC::Transport* transport,
RTC::Producer* producer,
RTC::RtpStreamRecv* rtpStream,
RTC::RtpStream* rtpStream,
uint8_t score) = 0;
virtual void OnTransportProducerRtpPacketReceived(
RTC::Transport* transport, RTC::Producer* producer, RTC::RtpPacket* packet) = 0;
......@@ -101,9 +101,9 @@ namespace RTC
void OnProducerPaused(RTC::Producer* producer) override;
void OnProducerResumed(RTC::Producer* producer) override;
void OnProducerNewRtpStream(
RTC::Producer* producer, RTC::RtpStreamRecv* rtpStream, uint32_t mappedSsrc) override;
RTC::Producer* producer, RTC::RtpStream* rtpStream, uint32_t mappedSsrc) override;
void OnProducerRtpStreamScore(
RTC::Producer* producer, RTC::RtpStreamRecv* rtpStream, uint8_t score) override;
RTC::Producer* producer, RTC::RtpStream* rtpStream, uint8_t score) override;
void OnProducerRtpPacketReceived(RTC::Producer* producer, RTC::RtpPacket* packet) override;
void OnProducerSendRtcpPacket(RTC::Producer* producer, RTC::RTCP::Packet* packet) override;
void OnProducerNeedWorstRemoteFractionLost(
......
......@@ -90,21 +90,21 @@ namespace RTC
return 0;
}
void PipeConsumer::ProducerRtpStream(RTC::RtpStreamRecv* /*rtpStream*/, uint32_t /*mappedSsrc*/)
void PipeConsumer::ProducerRtpStream(RTC::RtpStream* /*rtpStream*/, uint32_t /*mappedSsrc*/)
{
MS_TRACE();
// Do nothing.
}
void PipeConsumer::ProducerNewRtpStream(RTC::RtpStreamRecv* /*rtpStream*/, uint32_t /*mappedSsrc*/)
void PipeConsumer::ProducerNewRtpStream(RTC::RtpStream* /*rtpStream*/, uint32_t /*mappedSsrc*/)
{
MS_TRACE();
// Do nothing.
}
void PipeConsumer::ProducerRtpStreamScore(RTC::RtpStreamRecv* /*rtpStream*/, uint8_t /*score*/)
void PipeConsumer::ProducerRtpStreamScore(RTC::RtpStream* /*rtpStream*/, uint8_t /*score*/)
{
MS_TRACE();
......
......@@ -776,7 +776,8 @@ namespace RTC
rtpStream->Pause();
// Notify to the listener.
this->listener->OnProducerNewRtpStream(this, rtpStream, encodingMapping.mappedSsrc);
this->listener->OnProducerNewRtpStream(
this, static_cast<RTC::RtpStream*>(rtpStream), encodingMapping.mappedSsrc);
// Request a key frame for this stream since we may have lost the first packets
// (do not do it if this is a key frame).
......@@ -983,7 +984,7 @@ namespace RTC
MS_TRACE();
// Notify the listener.
this->listener->OnProducerRtpStreamScore(this, static_cast<RTC::RtpStreamRecv*>(rtpStream), score);
this->listener->OnProducerRtpStreamScore(this, rtpStream, score);
// Emit the score event.
EmitScore();
......
......@@ -549,10 +549,7 @@ namespace RTC
}
inline void Router::OnTransportProducerNewRtpStream(
RTC::Transport* /*transport*/,
RTC::Producer* producer,
RTC::RtpStreamRecv* rtpStream,
uint32_t mappedSsrc)
RTC::Transport* /*transport*/, RTC::Producer* producer, RTC::RtpStream* rtpStream, uint32_t mappedSsrc)
{
MS_TRACE();
......@@ -565,7 +562,7 @@ namespace RTC
}
inline void Router::OnTransportProducerRtpStreamScore(
RTC::Transport* /*transport*/, RTC::Producer* producer, RTC::RtpStreamRecv* rtpStream, uint8_t score)
RTC::Transport* /*transport*/, RTC::Producer* producer, RTC::RtpStream* rtpStream, uint8_t score)
{
MS_TRACE();
......
......@@ -109,7 +109,7 @@ namespace RTC
return 0;
}
void SimpleConsumer::ProducerRtpStream(RTC::RtpStreamRecv* rtpStream, uint32_t /*mappedSsrc*/)
void SimpleConsumer::ProducerRtpStream(RTC::RtpStream* rtpStream, uint32_t /*mappedSsrc*/)
{
MS_TRACE();
......@@ -119,7 +119,7 @@ namespace RTC
EmitScore();
}
void SimpleConsumer::ProducerNewRtpStream(RTC::RtpStreamRecv* rtpStream, uint32_t /*mappedSsrc*/)
void SimpleConsumer::ProducerNewRtpStream(RTC::RtpStream* rtpStream, uint32_t /*mappedSsrc*/)
{
MS_TRACE();
......@@ -136,7 +136,7 @@ namespace RTC
EmitScore();
}
void SimpleConsumer::ProducerRtpStreamScore(RTC::RtpStreamRecv* /*rtpStream*/, uint8_t /*score*/)
void SimpleConsumer::ProducerRtpStreamScore(RTC::RtpStream* /*rtpStream*/, uint8_t /*score*/)
{
MS_TRACE();
......
......@@ -62,6 +62,10 @@ namespace RTC
if (this->preferredTemporalLayer > encoding.temporalLayers - 1)
this->preferredTemporalLayer = encoding.temporalLayers - 1;
}
else
{
this->preferredTemporalLayer = encoding.temporalLayers - 1;
}
}
else
{
......@@ -179,31 +183,31 @@ namespace RTC
MS_THROW_TYPE_ERROR("missing spatialLayer");
}
auto preferredSpatialLayer = jsonSpatialLayerIt->get<int16_t>();
if (preferredSpatialLayer > this->rtpStream->GetSpatialLayers() - 1)
preferredSpatialLayer = this->rtpStream->GetSpatialLayers() - 1;
this->preferredSpatialLayer = jsonSpatialLayerIt->get<int16_t>();
// Temporal layer.
uint16_t preferredTemporalLayer;
if (this->preferredSpatialLayer > this->rtpStream->GetSpatialLayers() - 1)
this->preferredSpatialLayer = this->rtpStream->GetSpatialLayers() - 1;
// perferredTemporaLayer is optional.
// preferredTemporaLayer is optional.
if (jsonTemporalLayerIt != request->data.end() && jsonTemporalLayerIt->is_number_unsigned())
{
preferredTemporalLayer = jsonTemporalLayerIt->get<int16_t>();
this->preferredTemporalLayer = jsonTemporalLayerIt->get<int16_t>();
if (this->preferredTemporalLayer > this->rtpStream->GetTemporalLayers() - 1)
this->preferredTemporalLayer = this->rtpStream->GetTemporalLayers() - 1;
}
else
{
preferredTemporalLayer = this->preferredTemporalLayer;
this->preferredTemporalLayer = this->rtpStream->GetTemporalLayers() - 1;
}
this->preferredSpatialLayer = preferredSpatialLayer;
this->preferredTemporalLayer = preferredTemporalLayer;
this->targetTemporalLayer = preferredTemporalLayer;
if (this->currentSpatialLayer == this->preferredSpatialLayer)
{
this->targetTemporalLayer = this->preferredTemporalLayer;
if (this->currentSpatialLayer == this->targetSpatialLayer && this->encodingContext)
this->encodingContext->preferences.temporalLayer = this->targetTemporalLayer;
if (this->encodingContext)
this->encodingContext->preferences.temporalLayer = this->targetTemporalLayer;
}
MS_DEBUG_DEV(
"preferred layers changed to [spatial:%" PRIi16 ", temporal:%" PRIi16 ", consumerId:%s]",
......@@ -242,7 +246,7 @@ namespace RTC
return 0;
}
void SimulcastConsumer::ProducerRtpStream(RTC::RtpStreamRecv* rtpStream, uint32_t mappedSsrc)
void SimulcastConsumer::ProducerRtpStream(RTC::RtpStream* rtpStream, uint32_t mappedSsrc)
{
MS_TRACE();
......@@ -258,7 +262,7 @@ namespace RTC
EmitScore();
}
void SimulcastConsumer::ProducerNewRtpStream(RTC::RtpStreamRecv* rtpStream, uint32_t mappedSsrc)
void SimulcastConsumer::ProducerNewRtpStream(RTC::RtpStream* rtpStream, uint32_t mappedSsrc)
{
MS_TRACE();
......@@ -296,7 +300,7 @@ namespace RTC
EmitScore();
}
void SimulcastConsumer::ProducerRtpStreamScore(RTC::RtpStreamRecv* /*rtpStream*/, uint8_t /*score*/)
void SimulcastConsumer::ProducerRtpStreamScore(RTC::RtpStream* /*rtpStream*/, uint8_t /*score*/)
{
MS_TRACE();
......@@ -338,7 +342,7 @@ namespace RTC
return;
// Change current spatial layer.
UpdateLayers();
UpdateCurrentLayers();
// Need to resync the stream.
this->syncRequired = true;
......@@ -382,9 +386,6 @@ namespace RTC
this->syncRequired = false;
}
// TODO: Not sure how to deal with it, but if this happens (and we drop the packet)
// we shouldn't have unset the syncRequired flag, etc.
//
// Rewrite payload if needed. Drop packet if necessary.
if (this->encodingContext && !packet->EncodePayload(this->encodingContext.get()))
{
......@@ -394,13 +395,12 @@ namespace RTC
return;
}
// Update temporal layer only if we are using the target spatial layer.
// Update temporal layer only if we are sending the target spatial layer.
if (
this->currentSpatialLayer == this->targetSpatialLayer &&
this->currentTemporalLayer != this->targetTemporalLayer &&
packet->GetTemporalLayer() == this->targetTemporalLayer)
{
UpdateLayers();
UpdateCurrentLayers();
}
// Update RTP seq number and timestamp.
......@@ -561,8 +561,17 @@ namespace RTC
this->rtpStream->Pause();
// Unset current and target layers.
this->targetSpatialLayer = -1;
this->currentSpatialLayer = -1;
this->targetSpatialLayer = -1;
this->currentSpatialLayer = -1;
this->targetTemporalLayer = -1;
this->currentTemporalLayer = -1;
if (this->encodingContext)
{
this->encodingContext->preferences.temporalLayer = this->rtpStream->GetTemporalLayers() - 1;
}
// TODO: Emit JS event?
}
void SimulcastConsumer::Resumed()
......@@ -702,16 +711,31 @@ namespace RTC
Channel::Notifier::Emit(this->id, "score", data);
}
void SimulcastConsumer::UpdateLayers()
void SimulcastConsumer::UpdateCurrentLayers()
{
MS_TRACE();
if (this->targetSpatialLayer == this->currentSpatialLayer && this->targetTemporalLayer == this->currentTemporalLayer)
if (this->currentSpatialLayer == this->targetSpatialLayer && this->currentTemporalLayer == this->targetTemporalLayer)
{
return;
}
// Reset the score of our RtpStream to 10 if spatial layer changed.
if (this->targetSpatialLayer != this->currentSpatialLayer)
this->rtpStream->ResetScore(10, false);
// If the new current spatial layer is the preferred one honor the preferred
// temporal layer.
if (this->targetSpatialLayer == this->preferredSpatialLayer)
{
this->targetTemporalLayer = this->preferredTemporalLayer;
}
// Otherwise, choose the highest temporal layer.
else
{
this->targetTemporalLayer = this->rtpStream->GetTemporalLayers() - 1;
}
this->currentSpatialLayer = this->targetSpatialLayer;
this->currentTemporalLayer = this->targetTemporalLayer;
......@@ -739,128 +763,29 @@ namespace RTC
{
MS_TRACE();
uint8_t maxProducerScore{ 0 };
int16_t newTargetSpatialLayer{ -1 };
// No current spatial layer, select the highest possible.
if (this->currentSpatialLayer == -1)
for (size_t idx = 0; idx < this->producerRtpStreams.size(); ++idx)
{
MS_DEBUG_TAG(simulcast, "no current spatial layer, selecting the highest possible");
auto spatialLayer = static_cast<int16_t>(idx);
auto* producerRtpStream = this->producerRtpStreams[idx];
auto producerScore = producerRtpStream ? producerRtpStream->GetScore() : 0;
uint8_t maxScore = 0;
// Ignore spatial layers for non existing Producer streams or for those
// with score 0.
if (producerScore == 0)
continue;
// Ignore spatial layers higher than the preferred one.
for (int idx = this->preferredSpatialLayer; idx >= 0; --idx)
if (producerScore >= maxProducerScore)
{
auto spatialLayer = static_cast<int16_t>(idx);
auto* producerRtpStream = this->producerRtpStreams[idx];
// Ignore spatial layers for non existing Producer streams.
if (!producerRtpStream)
continue;
if (producerRtpStream->GetScore() >= maxScore)
{
maxScore = producerRtpStream->GetScore();
newTargetSpatialLayer = spatialLayer;
if (maxScore > 7)
{
MS_DEBUG_TAG(simulcast, "found Producer RtpStream with score > 7, keep it");
break;
}
}
}
}
// Downgrade is desired.
else if (this->preferredSpatialLayer < this->currentSpatialLayer)
{
MS_DEBUG_TAG(simulcast, "trying to downgrade current spatial layer to preferred one");
int16_t idx = this->preferredSpatialLayer;
uint8_t maxScore = 0;
for (; idx < this->currentSpatialLayer; ++idx)
{
auto spatialLayer = static_cast<int16_t>(idx);
auto* producerRtpStream = this->producerRtpStreams[idx];
// Ignore spatial layers for non existing Producer streams.
if (!producerRtpStream)
continue;
if (producerRtpStream->GetScore() >= maxScore)
{
maxScore = producerRtpStream->GetScore();
newTargetSpatialLayer = spatialLayer;
if (maxScore > 7)
{
MS_DEBUG_TAG(simulcast, "found Producer RtpStream with score > 7, keep it");
break;
}
}
}
}
// Downgrade is needed.
else if (
!this->GetProducerCurrentRtpStream() || this->GetProducerCurrentRtpStream()->GetScore() < 7 ||
this->rtpStream->GetScore() <= 6)
{
MS_DEBUG_TAG(simulcast, "trying to downgrade current spatial layer");
uint8_t maxScore = 0;
for (int idx = this->currentSpatialLayer - 1; idx >= 0; --idx)
{
auto spatialLayer = static_cast<int16_t>(idx);
auto* producerRtpStream = this->producerRtpStreams[idx];
// Ignore spatial layers for non existing Producer streams.
if (!producerRtpStream)
continue;
if (producerRtpStream->GetScore() >= maxScore)
{
maxScore = producerRtpStream->GetScore();
newTargetSpatialLayer = spatialLayer;
if (maxScore > 7)
{
MS_DEBUG_TAG(simulcast, "found Producer RtpStream with score > 7, keep it");
break;
}
}
}
}
// Update to the highest possible spatial layer.
else
{
MS_DEBUG_TAG(simulcast, "trying to upgrade current spatial layer");
int16_t idx = this->currentSpatialLayer == -1 ? 0 : this->currentSpatialLayer + 1;
// Ignore spatial layers above the preferred one.
for (; idx <= this->preferredSpatialLayer; ++idx)
{
auto spatialLayer = idx;
auto* producerRtpStream = this->producerRtpStreams[idx];
// Ignore spatial layers for non existing Producer streams.
if (!producerRtpStream)
continue;
// Take this as the new target if it is good enough.
if (producerRtpStream->GetScore() >= 7)
{
MS_DEBUG_TAG(simulcast, "good enough spatial layer found: %" PRIi16, spatialLayer);
newTargetSpatialLayer = spatialLayer;
maxProducerScore = producerScore;
newTargetSpatialLayer = spatialLayer;
// If this is the preferred or higher spatial layer and has good score,
// take it and exit.
if (spatialLayer >= this->preferredSpatialLayer && maxProducerScore >= 7)
break;
}
}
}
......@@ -872,7 +797,20 @@ namespace RTC
if (newTargetSpatialLayer == -1)
{
MS_DEBUG_TAG(simulcast, "newTargetSpatialLayer remains unset");
MS_DEBUG_TAG(simulcast, "no valid spatial layer found");
// Unset current and target layers.
this->targetSpatialLayer = -1;
this->currentSpatialLayer = -1;
this->targetTemporalLayer = -1;
this->currentTemporalLayer = -1;
if (this->encodingContext)
{
this->encodingContext->preferences.temporalLayer = this->rtpStream->GetTemporalLayers() - 1;
}
// TODO: Emit JS event?
return;
}
......@@ -883,17 +821,17 @@ namespace RTC
this->targetSpatialLayer = newTargetSpatialLayer;
// Already using the target layer. Do nothing.
if (this->targetSpatialLayer == this->currentSpatialLayer)
return;
RequestKeyFrame();
MS_DEBUG_TAG(
simulcast,
"target spatial layer changed to %" PRIi16 " [consumerId:%s]",
this->targetSpatialLayer,
this->id.c_str());
// Already using the target layer. Do nothing.
if (this->targetSpatialLayer == this->currentSpatialLayer)
return;
RequestKeyFrame();
}
inline RTC::RtpStream* SimulcastConsumer::GetProducerCurrentRtpStream() const
......
......@@ -826,7 +826,7 @@ namespace RTC
}
inline void Transport::OnProducerNewRtpStream(
RTC::Producer* producer, RTC::RtpStreamRecv* rtpStream, uint32_t mappedSsrc)
RTC::Producer* producer, RTC::RtpStream* rtpStream, uint32_t mappedSsrc)
{
MS_TRACE();
......@@ -834,7 +834,7 @@ namespace RTC
}
inline void Transport::OnProducerRtpStreamScore(
RTC::Producer* producer, RTC::RtpStreamRecv* rtpStream, uint8_t score)
RTC::Producer* producer, RTC::RtpStream* rtpStream, uint8_t score)
{
MS_TRACE();
......
......@@ -51,6 +51,10 @@ public:
{
return this->isKeyFrame;
};
uint8_t GetTemporalLayer() const
{
return 0;
};
private:
bool isKeyFrame{ false };
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论