Glimesh / waveguide

A polyglot WebRTC media server.
GNU Affero General Public License v3.0
34 stars 7 forks source link

Thumbnailer experiment #23

Closed nassah221 closed 1 year ago

nassah221 commented 1 year ago

This code contains a poc for sending thumbnails as requested on every tick. The peer-connection OnTrack handler hands-off the rtp packets to the ingestor which 'ingests' the packets. The purpose of the ingestor is to transform the rtp packets to thumbnails and the code in-review implements an on-demand delivery of those thumbnails.

The ingestor would extend to cover the case of writing the same rtp packets to file as per configuration.

nassah221 commented 1 year ago

On further deliberation, I came up with this. It's a simulated example of implementing periodic notification wake-up for the thumbnailer which seems much less hacky and probably a more efficient way to do it.

This is not a good way to do notification type periodic wake-up since the if condition will be evaluated a bajillion times on arrival of every rtp packet.

clone1018 commented 1 year ago

I like the solution that uses the sync cond -- however I do think some documentation will be critical around this as it's easy to get confused on what exactly is happening.