[FFmpeg-devel] [RFC] Event loop

Nicolas George george at nsup.org
Thu Dec 31 15:37:21 EET 2020


This mail is about a project I have to make FFmpeg's API and
infrastructure more convenient. For a common introduction, see this thread:
https://ffmpeg.org/pipermail/ffmpeg-devel/2020-December/274167.html

The API to access our protocols, in particular network protocols, is copied
from the Unix file descriptor API, basically read() and write(). While this
API is very simple and convenient when it works, it works mostly only with
simple applications that do with only one input or output at a time. Extra
features like timeouts or handling several streams simultaneously are
complex to add.

Furthermore, timeouts and non-blocking mode are currently done with a
periodic polling, which makes the application always active and can prevent
embedded devices from going into deep sleep, draining the battery.

I want to replace it with an event loop. That means that instead of reading
on a protocol context, we would register a callback for when data is
available, and then let the loop run.

Of course, a compatibility layer will still allow to read directly.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20201231/7a97f36d/attachment.sig>


More information about the ffmpeg-devel mailing list