提交 77d6a308 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Remove H264 keyframe issue logs

上级 1083a967
......@@ -50,7 +50,7 @@
},
"devDependencies": {
"eslint": "^5.16.0",
"eslint-plugin-jest": "^22.5.0",
"eslint-plugin-jest": "^22.5.1",
"gulp": "^4.0.1",
"gulp-clang-format": "^1.0.27",
"jest": "^24.7.1",
......
......@@ -49,11 +49,12 @@ namespace RTC
// Allocated by this.
RTC::RtpStreamSend* rtpStream{ nullptr };
// Others.
std::vector<RTC::RtpStreamSend*> rtpStreams;
RTC::RtpStream* producerRtpStream{ nullptr };
bool keyFrameSupported{ false };
bool syncRequired{ false };
RTC::SeqManager<uint16_t> rtpSeqManager;
RTC::SeqManager<uint32_t> rtpTimestampManager;
RTC::RtpStream* producerRtpStream{ nullptr };
};
/* Inline methods. */
......@@ -65,7 +66,7 @@ namespace RTC
inline std::vector<RTC::RtpStreamSend*> SimpleConsumer::GetRtpStreams()
{
return std::vector<RTC::RtpStreamSend*>{ this->rtpStream };
return this->rtpStreams;
}
} // namespace RTC
......
......@@ -63,9 +63,10 @@ namespace RTC
private:
// Allocated by this.
RTC::RtpStreamSend* rtpStream{ nullptr };
// Others.
std::unordered_map<uint32_t, int16_t> mapMappedSsrcSpatialLayer;
std::vector<RTC::RtpStreamSend*> rtpStreams;
std::vector<RTC::RtpStream*> producerRtpStreams; // Indexed by spatial layer.
// Others.
bool keyFrameSupported{ false };
bool syncRequired{ false };
RTC::SeqManager<uint16_t> rtpSeqManager;
......@@ -103,7 +104,7 @@ namespace RTC
inline std::vector<RTC::RtpStreamSend*> SimulcastConsumer::GetRtpStreams()
{
return std::vector<RTC::RtpStreamSend*>{ this->rtpStream };
return this->rtpStreams;
}
} // namespace RTC
......
......@@ -26,8 +26,6 @@ namespace RTC
// IDR (instantaneous decoding picture).
case 7:
{
MS_ERROR("H264: ***KEYFRAME*** [nal:7]");
payloadDescriptor->isKeyFrame = true;
break;
......@@ -47,10 +45,8 @@ namespace RTC
auto naluSize = Utils::Byte::Get2Bytes(data, offset);
uint8_t subnal = *(data + offset + sizeof(naluSize)) & 0x1F;
if (subnal == 7 || subnal == 8)
if (subnal == 7)
{
MS_ERROR("H264: ***KEYFRAME*** [nal:24, subnal:%" PRIu8 "]", subnal);
payloadDescriptor->isKeyFrame = true;
break;
......@@ -72,15 +68,11 @@ namespace RTC
case 28:
case 29:
{
uint8_t subnal = *(data + 1) & 0x1F;
uint8_t subnal = *(data + 1) & 0x1F;
uint8_t startBit = *(data + 1) & 0x80;
if ((subnal == 7 || subnal == 8) && startBit == 128)
{
MS_ERROR("H264: ***KEYFRAME*** [nal:%" PRIu8 ", subnal:%" PRIu8 ", startBit:%" PRIu8 "]", nal, subnal, startBit);
if (subnal == 7 && startBit == 128)
payloadDescriptor->isKeyFrame = true;
}
break;
}
......
......@@ -455,12 +455,6 @@ namespace RTC
if (packet->IsKeyFrame())
{
// TODO
MS_ERROR(
"key frame received [ssrc:%" PRIu32 ", seq:%" PRIu16 "]",
packet->GetSsrc(),
packet->GetSequenceNumber());
MS_DEBUG_TAG(
rtp,
"key frame received [ssrc:%" PRIu32 ", seq:%" PRIu16 "]",
......@@ -572,8 +566,6 @@ namespace RTC
)
// clang-format on
{
MS_ERROR("----- IGNORING BECAUSE CURRENT PACKET IS KEY FRAME [ssrc:%" PRIu32 "]", ssrc);
return;
}
......@@ -843,8 +835,7 @@ namespace RTC
auto mappedSsrc = this->mapRtpStreamMappedSsrc.at(rtpStream);
// Notify the listener.
this->listener->OnProducerNewRtpStream(
this, static_cast<RTC::RtpStream*>(rtpStream), mappedSsrc);
this->listener->OnProducerNewRtpStream(this, static_cast<RTC::RtpStream*>(rtpStream), mappedSsrc);
}
inline bool Producer::MangleRtpPacket(RTC::RtpPacket* packet, RTC::RtpStreamRecv* rtpStream) const
......@@ -1071,8 +1062,6 @@ namespace RTC
auto* rtpStream = it->second;
MS_ERROR("----- sending PLI [ssrc:%" PRIu32 "]", rtpStream->GetSsrc());
rtpStream->RequestKeyFrame();
}
} // namespace RTC
......@@ -421,6 +421,7 @@ namespace RTC
size_t bufferSize = params.useNack ? 1500 : 0;
this->rtpStream = new RTC::RtpStreamSend(this, params, bufferSize);
this->rtpStreams.push_back(this->rtpStream);
// If the Consumer is paused, tell the RtpStreamSend.
if (IsPaused() || IsProducerPaused())
......
......@@ -903,6 +903,7 @@ namespace RTC
size_t bufferSize = params.useNack ? 1500 : 0;
this->rtpStream = new RTC::RtpStreamSend(this, params, bufferSize);
this->rtpStreams.push_back(this->rtpStream);
// If the Consumer is paused, tell the RtpStreamSend.
if (IsPaused() || IsProducerPaused())
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论