Files
livekit/pkg/rtc
Raja Subramanian fc52b18776 Try sending small key frames to clear decoded buffer (#179)
* Try sending small key frames to clear decoded buffer

Problem:
--------
With transceiver re-use, client disables/enables tracks.
With video, this retains the last picture and when a new track
starts, there is a brief moment when the old stream is displayed
till there is data from new stream to decode and display.

Fix:
---
Send small key frames before closing DownTrack to try and clear
the decoder display buffer.

Testing:
--------
Tried with Chrome/Safari/Firefox and they worked. But, very rarely,
the last frames do not seem to show up. In fact, 6 frames are sent
and webrtc internals (in Firefox) reports anywhere from 1 - 6 frames
at the small resolution. Unclear as to why it does not get all the
frames or why it reports less than 6. A not so small percentage of
times (maybe 1 in 15 - 20), have seen no small frame reported at all.

TODO:
----
- Have to support more video codecs
- Would this be an issue for audio also? Should we send something to handle that?
  Probably not necessary as video is more jarring.

* Make VP8 Key Frame a const

* Need a packet factory buffer for simple tracks too
as we are using the VP8 munger for simple tracks too because
of the need to send blank frames at the end.

Also, making the writeBlankFrameRTP a private function.
And adding a check to not send blank frames if nothing has been sent
on that DownTrack.
2021-11-11 14:38:38 +05:30
..
2021-11-09 12:03:16 +08:00
2021-11-09 12:03:16 +08:00
2021-08-27 13:16:33 -05:00
2021-11-09 12:03:16 +08:00
2021-11-08 20:00:34 -06:00
2021-11-09 12:03:16 +08:00
2021-09-09 00:45:42 -07:00
2021-11-08 20:00:34 -06:00
2021-11-08 20:00:34 -06:00