提交 169f0883 authored 作者: José Luis Millán's avatar José Luis Millán

const correctness

上级 ba6b6a83
......@@ -22,8 +22,8 @@ namespace RTC
if (this->consumableRtpEncodings.size() != 1u)
MS_THROW_TYPE_ERROR("invalid consumableRtpEncodings with size != 1");
auto& encoding = this->rtpParameters.encodings[0];
auto* mediaCodec = this->rtpParameters.GetCodecForEncoding(encoding);
auto& encoding = this->rtpParameters.encodings[0];
const auto* mediaCodec = this->rtpParameters.GetCodecForEncoding(encoding);
this->keyFrameSupported = RTC::Codecs::Tools::CanBeKeyFrame(mediaCodec->mimeType);
......@@ -501,9 +501,9 @@ namespace RTC
params.useDtx = true;
}
for (auto& fb : mediaCodec->rtcpFeedback)
for (const auto& fb : mediaCodec->rtcpFeedback)
{
if (!params.useNack && fb.type == "nack" && fb.parameter == "")
if (!params.useNack && fb.type == "nack" && fb.parameter.empty())
{
MS_DEBUG_2TAGS(rtp, rtcp, "NACK supported");
......@@ -533,7 +533,7 @@ namespace RTC
if (IsPaused() || IsProducerPaused())
this->rtpStream->Pause();
auto* rtxCodec = this->rtpParameters.GetRtxCodecForEncoding(encoding);
const auto* rtxCodec = this->rtpParameters.GetRtxCodecForEncoding(encoding);
if (rtxCodec && encoding.hasRtx)
this->rtpStream->SetRtx(rtxCodec->payloadType, encoding.rtx.ssrc);
......
......@@ -319,7 +319,7 @@ namespace RTC
}
void SimulcastConsumer::ProducerRtpStreamScore(
RTC::RtpStream* rtpStream, uint8_t score, uint8_t previousScore)
RTC::RtpStream* /*rtpStream*/, uint8_t score, uint8_t previousScore)
{
MS_TRACE();
......@@ -1067,8 +1067,8 @@ namespace RTC
{
MS_TRACE();
auto& encoding = this->rtpParameters.encodings[0];
auto* mediaCodec = this->rtpParameters.GetCodecForEncoding(encoding);
auto& encoding = this->rtpParameters.encodings[0];
const auto* mediaCodec = this->rtpParameters.GetCodecForEncoding(encoding);
MS_DEBUG_TAG(
rtp, "[ssrc:%" PRIu32 ", payloadType:%" PRIu8 "]", encoding.ssrc, mediaCodec->payloadType);
......@@ -1108,9 +1108,9 @@ namespace RTC
params.useDtx = true;
}
for (auto& fb : mediaCodec->rtcpFeedback)
for (const auto& fb : mediaCodec->rtcpFeedback)
{
if (!params.useNack && fb.type == "nack" && fb.parameter == "")
if (!params.useNack && fb.type == "nack" && fb.parameter.empty())
{
MS_DEBUG_2TAGS(rtp, rtcp, "NACK supported");
......@@ -1140,7 +1140,7 @@ namespace RTC
if (IsPaused() || IsProducerPaused())
this->rtpStream->Pause();
auto* rtxCodec = this->rtpParameters.GetRtxCodecForEncoding(encoding);
const auto* rtxCodec = this->rtpParameters.GetRtxCodecForEncoding(encoding);
if (rtxCodec && encoding.hasRtx)
this->rtpStream->SetRtx(rtxCodec->payloadType, encoding.rtx.ssrc);
......
......@@ -83,7 +83,7 @@ namespace RTC
}
// Create the encoding context.
auto* mediaCodec = this->rtpParameters.GetCodecForEncoding(encoding);
const auto* mediaCodec = this->rtpParameters.GetCodecForEncoding(encoding);
if (!RTC::Codecs::Tools::IsValidTypeForCodec(this->type, mediaCodec->mimeType))
{
......@@ -806,8 +806,8 @@ namespace RTC
{
MS_TRACE();
auto& encoding = this->rtpParameters.encodings[0];
auto* mediaCodec = this->rtpParameters.GetCodecForEncoding(encoding);
auto& encoding = this->rtpParameters.encodings[0];
const auto* mediaCodec = this->rtpParameters.GetCodecForEncoding(encoding);
MS_DEBUG_TAG(
rtp, "[ssrc:%" PRIu32 ", payloadType:%" PRIu8 "]", encoding.ssrc, mediaCodec->payloadType);
......@@ -847,9 +847,9 @@ namespace RTC
params.useDtx = true;
}
for (auto& fb : mediaCodec->rtcpFeedback)
for (const auto& fb : mediaCodec->rtcpFeedback)
{
if (!params.useNack && fb.type == "nack" && fb.parameter == "")
if (!params.useNack && fb.type == "nack" && fb.parameter.empty())
{
MS_DEBUG_2TAGS(rtp, rtcp, "NACK supported");
......@@ -879,7 +879,7 @@ namespace RTC
if (IsPaused() || IsProducerPaused())
this->rtpStream->Pause();
auto* rtxCodec = this->rtpParameters.GetRtxCodecForEncoding(encoding);
const auto* rtxCodec = this->rtpParameters.GetRtxCodecForEncoding(encoding);
if (rtxCodec && encoding.hasRtx)
this->rtpStream->SetRtx(rtxCodec->payloadType, encoding.rtx.ssrc);
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论