webrtc-stats
webrtc-stats copied to clipboard
add framesDropped stats to video sender(RTCOutboundRtpStreamStats)
video frame maybe dropped prior to encode, according to webrtc code the capture video frame maybe dropped by encoder's internal rate limiter or MediaOptimizations , but no stats about this now, its useful for diagnose online video problems, and the same stats exist in[RTCInboundRtpStreamStats. we recommend add such stats to video sender side.
we add this in native code, add get via getStas, report to our diagnostic system for analize online user rtc problem.
I think you can look at the delta between media-source.frames and outbound-rtp.framesEncoded
inputFrames and framesEncoded should give you this.
yes, user can calculate this via exist stats, but it leave complex to end user, the same stats exist in RTCInboundRtpStreamStats, but not exist in RTCOutboundRtpStreamStats, user may confused.
framesDiscardedBeforeSend is that the metric that you need? in this case, we should put it in to provisional-stats, unless this is going to be exposed by the browsers.
libwebrtc has 185 implemented metrics (or 213 if you include some deprecated ones; 232 if you also include some that are not exposed to JavaScript). So as much as I like convenience, I'm opposed to adding metrics that are equivalent to "X - Y" of already exposed metrics.
framesDiscardedBeforeSend is that the metric that you need? in this case, we should put it in to provisional-stats, unless this is going to be exposed by the browsers.
not necessary,user want get it via getStats and report to a diagnostic system, we can get it via what @henbos described.
👍