[FFmpeg-devel] [RFC] Event loop

Nicolas George george at nsup.org
Thu Feb 18 22:55:51 EET 2021


Mark Thompson (12021-02-18):
> If the existing remote-socket-only poll is sufficent (so no local
> events), then I think I have misunderstood your original definition of
> the event loop because I was expecting that other threads would be
> able to interact with it.

Threading is one of the goals, but not the main one. If it is available
on Unix only until somebody writes a little Windows code or unless one
use the external library, that is not an issue.

> Would it be possible to add an example what you intend API use to
> actually look like to your design summary?  (In loose pseudocode.)

	loop = create_event_loop()
	vid_st = create_rtp_stream(...)
	aud_st = create_rtp_stream(...)
	attach_to_loop(loop, vid_st)
	attach_to_loop(loop, aud_st)
	connect_callback(vid_st, video_callback)
	connect_callback(aud_st, video_callback)
	run_loop(loop)

> libev does not implement enough Windows support to be used generally,
> though it is sufficient if you know the event loop will never want to
> interact with anything which is not a socket (it hacks up self-pipes
> by connecting TCP sockets to random ports on localhost).

If it works...

> I believe that libuv and libevent both implement it properly

That would be an argument for it. I am waiting for Lynne answer to my
request for details.

> (Note in particular that this means essentially everything dealing
> with sockets has to be delegated to the event library so that it can
> deal with asynchronous calls internally, especially send()/recv()
> calls.)

Using non-standard IO code and tying to the library is completely out of
the question.

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/20210218/5a446549/attachment.sig>


More information about the ffmpeg-devel mailing list