Commit graph

10 commits

Author SHA1 Message Date
derrod 9bc3082402 libobs: Add os_process_pipe_create2
This new API uses the os_process_args_t object rather than a string for
more safe and sane command line argument handling.
2024-04-20 18:30:46 -07:00
Exeldro 65295eaf93 libobs/util: Prevent leaking pipe file descriptors to subprocesses 2024-04-20 16:57:01 -07:00
Eric Lindvall 71d963a755 libobs/util: Implement error reader for ffmpeg posix pipe
Transition from using popen() to using fork()/dup2()/execl() to provide
a way to read stderr from ffmpeg.

Co-Authored by: PatTheMav <PatTheMav@users.noreply.github.com>
2024-01-13 18:20:26 -06:00
Lain 106c7aa61f Update copyrights/names 2023-05-20 01:31:18 -07:00
Chris Angelico 664acef494 libobs/util: Retry pipe writes to avoid short-write failures
Previously, any short write would be treated elsewhere as a failure. The
easiest solution is to have pipe_write() automatically retry until either
it's written everything, or it couldn't write anything at all.
2020-02-24 12:29:54 +11:00
jp9000 f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
Richard Stanway f52d8bddcc libobs: Allow Win32 pipes to pass STDERR for logging of errors 2019-04-19 05:45:38 -07:00
jp9000 6587b18d59 libobs: Add return code to process pipe destroy 2015-06-21 22:34:44 -07:00
jp9000 43956388b2 libobs: Fix bug with process piping
The size parameter is the size of the elements, not the size of the
data.  The size parameter should be 1, and the elements should be the
number of bytes.

The reason why I'm making this change is because the fread/fwrite would
fail when the parameters were swapped.
2015-06-21 22:34:43 -07:00
jp9000 225f597379 libobs: Add process piping functions
This adds functions for piping a command line program's stdin or stdout.
Note however that this is unidirectional only.

This will be especially useful later on when implementing MP4 output,
because MP4 output has to be piped to prevent unexpected program
termination from corrupting the file.
2014-11-27 00:07:48 -08:00