social.metadata.moe/lib/pleroma/helpers
Mark Felder 0ac010ba3f Replace custom fifo implementation with Exile
This is for streaming media to ffmpeg thumbnailer. The existing implementation relies on undocumented behavior.

Erlang open_port/2 does not officially support passing a string of a file path for opening. The specs clearly state you are to provide one of the following for open_port/2:

    {spawn, Command :: string() | binary()} |
    {spawn_driver, Command :: string() | binary()} |
    {spawn_executable, FileName :: file:name_all()} |
    {fd, In :: integer() >= 0, Out :: integer() >= 0}

Our method technically works but is strongly discouraged as it can block the scheduler and dialyzer throws errors as it recognizes we're breaking the contract and some of the functions we wrote may never return.

This is indirectly covered by the Erlang FAQ section "9.12 Why can't I open devices (e.g. a serial port) like normal files?"
https://www.erlang.org/faq/problems#idm1127
2024-01-22 10:13:17 -05:00
..
auth_helper.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
inet_helper.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
media_helper.ex Replace custom fifo implementation with Exile 2024-01-22 10:13:17 -05:00
qt_fast_start.ex Change QTFastStart to recover gracefully if it encounters an error during bitstring matching 2023-12-29 14:12:44 -05:00
uri_helper.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00