mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1341162 - Fix -Wunreachable-code-return warning in webrtc/signaling. r=bwc
The WebrtcVideoConduit::GetRTCPSenderReport() member function has an unnecessary scope block and unreachable `return false`. media/webrtc/signaling/src/media-conduit/VideoConduit.cpp:847:10 [-Wunreachable-code-return] 'return' will never be executed MozReview-Commit-ID: 1GFcupqcA9k --HG-- extra : rebase_source : c46a012a99c66b3953262ba5f86810d62a5b48cf extra : source : 6ca7c167f10cb234f67c89fb8b64c67f87ca5453
This commit is contained in:
parent
fdeaf1b69e
commit
436fefadc2
@ -823,26 +823,24 @@ WebrtcVideoConduit::GetRTCPSenderReport(DOMHighResTimeStamp* timestamp,
|
|||||||
unsigned int* packetsSent,
|
unsigned int* packetsSent,
|
||||||
uint64_t* bytesSent)
|
uint64_t* bytesSent)
|
||||||
{
|
{
|
||||||
{
|
CSFLogVerbose(logTag, "%s for VideoConduit:%p", __FUNCTION__, this);
|
||||||
CSFLogVerbose(logTag, "%s for VideoConduit:%p", __FUNCTION__, this);
|
MutexAutoLock lock(mCodecMutex);
|
||||||
MutexAutoLock lock(mCodecMutex);
|
if (!mSendStream) {
|
||||||
if (!mSendStream) {
|
return false;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const webrtc::VideoSendStream::Stats& stats = mSendStream->GetStats();
|
|
||||||
*packetsSent = 0;
|
|
||||||
for (auto entry: stats.substreams){
|
|
||||||
*packetsSent += entry.second.rtp_stats.transmitted.packets;
|
|
||||||
// NG -- per https://www.w3.org/TR/webrtc-stats/ this is only payload bytes
|
|
||||||
*bytesSent += entry.second.rtp_stats.MediaPayloadBytes();
|
|
||||||
}
|
|
||||||
// Note: timestamp is not correct per the spec... should be time the rtcp
|
|
||||||
// was received (remote) or sent (local)
|
|
||||||
*timestamp = webrtc::Clock::GetRealTimeClock()->TimeInMilliseconds();
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
|
const webrtc::VideoSendStream::Stats& stats = mSendStream->GetStats();
|
||||||
|
*packetsSent = 0;
|
||||||
|
for (auto entry: stats.substreams){
|
||||||
|
*packetsSent += entry.second.rtp_stats.transmitted.packets;
|
||||||
|
// NG -- per https://www.w3.org/TR/webrtc-stats/ this is only payload bytes
|
||||||
|
*bytesSent += entry.second.rtp_stats.MediaPayloadBytes();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: timestamp is not correct per the spec... should be time the rtcp
|
||||||
|
// was received (remote) or sent (local)
|
||||||
|
*timestamp = webrtc::Clock::GetRealTimeClock()->TimeInMilliseconds();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
MediaConduitErrorCode
|
MediaConduitErrorCode
|
||||||
|
Loading…
Reference in New Issue
Block a user