Sender Report not being sent
While streaming video, I'm currently using an SR Reporter similar to the way it is used in the example https://github.com/paullouisageneau/libdatachannel/blob/master/examples/streamer/main.cpp (I'm calling its startRecording() function once and periodically calling setNeedsToReport())
However, on the receiving end, when calling the getStats method on the peerConnection, I get no StatsReport of type remote-inbound-rtp or remote-outbound-rtp. I'm guessing that is because the browser gets no sender reports to generate these stats. If that is not the reason, how can I tell that the sender reports are actually being received on the browser side?
By the way, the actual issue is that the browser isn't sending any receiver reports (except when sending PLI messages), I just wanted to check that the browser was actually getting the sender reports we were sending before diving deeper into that issue
RTCP Sender Reports should indeed result in remote-outbound-rtp stats. Does it work with the streamer example? Also, do you have some example code to show how RtcpSrReporter is setup?
Tried running the streamer example on the same configuration (32 bit windows build). I get remote-outbound-rtp stats from the streamer, but only with kind: audio

As for the code: There are two globals, one for audio and one for video
std::shared_ptr<rtc::RtcpSrReporter> globalSender = nullptr;
std::shared_ptr<rtc::RtcpSrReporter> globalAudioSender = nullptr;
These are initialized (before any connection is established) like
auto srReporter = std::make_shared<rtc::RtcpSrReporter>(rtpConfig);
globalSender = srReporter;
(globalAudioSender is initialized in a similar way)
On track open, we start recording for the reporters
globalSender->rtpConfig->setStartTime(secs, rtc::RtpPacketizationConfig::EpochStart::T1970);
globalAudioSender->rtpConfig->setStartTime(secs, rtc::RtpPacketizationConfig::EpochStart::T1970);
globalSender->startRecording();
globalAudioSender->startRecording();
Finally, while sending video frames, we send a report every n frames (where N is the frames per second)
if (captured % FPS == 0) {
std::cout << "needs to report\n";
globalSender->setNeedsToReport();
globalAudioSender->setNeedsToReport();
}
Tried running the streamer example on the same configuration (32 bit windows build). I get
remote-outbound-rtpstats from the streamer, but only withkind: audio
After testing on my side, remote-outbound-rtp stats are also missing for video. I'm investigating why.
Your setup looks good, it's weird there is no corresponding stats reports in the browser. Is the browser Chrome or Firefox? Could you join the verbose log please?
The browser is chrome and I've just attached the verbose log (plus my own logging for when setNeedsToReport is called) verboselog.txt
Thank you, I'm looking into it!
I'm still stuck on this. What happens in the streamer example is that the sender report for video is ignored by Chrome whereas the one for audio works fine. I think it is the same issue than what you encounter here.
However, I don't know what causes it. It works with Firefox, and the RTCP packet looks good to me. At first I assumed it was an SSRC problem as 1 is used by Chrome as some sort of wildcard, but that's not the issue.
Is there any update on this about why this happens?