[webrtc-pc] Encode and Decode error event (#2219)

drkron has just created a new issue for https://github.com/w3c/webrtc-pc:

== Encode and Decode error event ==
I'm looking for a way to detect decoding errors (both in the sense of failure to decode a frame and also in the sense that the decoder is falling behind due to scarce resources.

My suggestion is to add error events for decoding and encoding errors.

This was also proposed two years ago in #1323, where the consensus was that getStats() would be good enough.

The primary target for me is to use this to detect when the decoder is falling behind.
A concern I have with using getStats() is that it would require the user to have some custom heuristic code to detect this. Since this would be based on a rather limited set of information it would be noisy and it also requires the user to constantly pull getStats() for information. I believe that a signaling event that is fired from within WebRTC should be possible to make more accurate and robust.

Another problem is that some HW encoder/decoder uses a pipeline so that there's always a one-frame delay. In this case a high encode/decode time does not mean that it's falling behind. In such a case a detection in WebRTC could look at how queues are building up.


Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2219 using your GitHub account

Received on Wednesday, 26 June 2019 12:39:45 UTC