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

Remove H264 keyframe issue logs

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