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

Style

上级 7632afac
......@@ -10,8 +10,8 @@ namespace RTC
{
namespace Codecs
{
bool isKnown(const RTC::RtpCodecMimeType& mimeType);
bool isKeyFrame(const RTC::RtpCodecMimeType& mimeType, const RTC::RtpPacket* packet);
bool IsKnown(const RTC::RtpCodecMimeType& mimeType);
bool IsKeyFrame(const RTC::RtpCodecMimeType& mimeType, const RTC::RtpPacket* packet);
} // namespace Codecs
} // namespace RTC
......
......@@ -10,7 +10,7 @@ namespace RTC
class VP8
{
public:
static bool isKeyFrame(const uint8_t* data, size_t len);
static bool IsKeyFrame(const uint8_t* data, size_t len);
};
} // namespace Codecs
} // namespace RTC
......
......@@ -9,7 +9,7 @@ namespace RTC
{
namespace Codecs
{
bool isKnown(const RTC::RtpCodecMimeType& mimeType)
bool IsKnown(const RTC::RtpCodecMimeType& mimeType)
{
MS_TRACE();
......@@ -25,11 +25,11 @@ namespace RTC
}
}
bool isKeyFrame(const RTC::RtpCodecMimeType& mimeType, const RTC::RtpPacket* packet)
bool IsKeyFrame(const RTC::RtpCodecMimeType& mimeType, const RTC::RtpPacket* packet)
{
MS_TRACE();
if (!isKnown(mimeType))
if (!IsKnown(mimeType))
return false;
auto data = packet->GetPayload();
......@@ -38,7 +38,7 @@ namespace RTC
switch (mimeType.subtype)
{
case RTC::RtpCodecMimeType::Subtype::VP8:
return VP8::isKeyFrame(data, len);
return VP8::IsKeyFrame(data, len);
default:
MS_DEBUG_TAG(
......
......@@ -9,7 +9,7 @@ namespace RTC
{
namespace Codecs
{
bool VP8::isKeyFrame(const uint8_t* data, size_t len)
bool VP8::IsKeyFrame(const uint8_t* data, size_t len)
{
if (len < 1)
return false;
......
......@@ -175,9 +175,7 @@ namespace RTC
MS_DEBUG_DEV("Consumer resumed [consumerId:%" PRIu32 "]", this->consumerId);
if (IsEnabled() && !this->sourcePaused)
{
RequestFullFrame();
}
}
void Consumer::SourcePause()
......@@ -239,7 +237,6 @@ namespace RTC
MS_DEBUG_TAG(
rtp, "profile added [profile:%s]", RTC::RtpEncodingParameters::profile2String[profile].c_str());
;
RecalculateTargetProfile();
}
......@@ -260,7 +257,6 @@ namespace RTC
rtp,
"profile removed [profile:%s]",
RTC::RtpEncodingParameters::profile2String[profile].c_str());
;
RecalculateTargetProfile();
}
......@@ -278,7 +274,6 @@ namespace RTC
rtp,
"preferred profile set [profile:%s]",
RTC::RtpEncodingParameters::profile2String[profile].c_str());
;
RecalculateTargetProfile();
}
......@@ -339,8 +334,8 @@ namespace RTC
{
bool isKeyFrame = false;
if (Codecs::isKnown(this->rtpStream->GetMymeType()) &&
Codecs::isKeyFrame(this->rtpStream->GetMymeType(), packet))
if (Codecs::IsKnown(this->rtpStream->GetMymeType()) &&
Codecs::IsKeyFrame(this->rtpStream->GetMymeType(), packet))
{
isKeyFrame = true;
......@@ -348,7 +343,7 @@ namespace RTC
RTC::RtpEncodingParameters::profile2String[profile].c_str());
}
if (!Codecs::isKnown(this->rtpStream->GetMymeType()) || isKeyFrame )
if (!Codecs::IsKnown(this->rtpStream->GetMymeType()) || isKeyFrame )
{
SetEffectiveProfile(this->targetProfile);
......@@ -357,9 +352,6 @@ namespace RTC
// Resynchronize the stream.
this->syncRequired = true;
// Calculate the new target profile.
RecalculateTargetProfile();
}
}
......@@ -696,12 +688,9 @@ namespace RTC
rtp,
"target profile set [profile:%s]",
RTC::RtpEncodingParameters::profile2String[this->targetProfile].c_str());
;
if (IsEnabled() && !IsPaused())
{
RequestFullFrame();
}
}
void Consumer::SetEffectiveProfile(RTC::RtpEncodingParameters::Profile profile)
......@@ -718,7 +707,6 @@ namespace RTC
rtp,
"effective profile set [profile:%s]",
RTC::RtpEncodingParameters::profile2String[this->effectiveProfile].c_str());
;
// Notify.
eventData[JsonStringProfile] = RTC::RtpEncodingParameters::profile2String[this->effectiveProfile];
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论