VLC Lua TCP - poll for incoming text?
Chris Angelico <[email protected]> Mon, 19 Jun 2023 12:46:13 +1000
| Newsgroups | gmane.comp.video.videolan.vlc.devel |
|---|---|
| Message-ID | <CAPTjJmrAr=wPAg_3sBkOzve-ByuZJKkQgSOsmY_3qMaU_mkYBA@mail.gmail.com> |
Currently, the vlc.net.poll() function always and only has an infinite timeout. In an extension, this will result inevitably in a watchdog timer expiration if the other end of the socket takes more than 10 seconds to respond. In order to allow an extension to react to signals from another application, it would be extremely useful to be able to either: 1) Poll without fear of timeout - while inside vlc.net.poll(), the watchdog is disabled; or 2) Poll with a limit of (say) 5 seconds, resulting in a zero return and a chance to call vlc.keep_alive(); or 3) Have an extension request notification on fd readability. Would there be value in having a second parameter to poll() that sets a timeout, or alternatively, could the poll() function always disable the watchdog? Lua code runs in its own thread so it shouldn't cause issues. I've mainly been testing with VLC 3.0.18 from the Debian repositories, but just pulled a fresh clone and am tinkering with the sources. Would be prepared to prepare a patch if approved. Is there interest in this? Chris Angelico _______________________________________________ vlc-devel mailing list To unsubscribe or modify your subscription options: https://mailman.videolan.org/listinfo/vlc-devel