Fix an issue in the way AVFrames were handled in the FFmpeg
encoder plugin, which could lead to tearing in the encoded
video due to data races in the AVFrame and AVBuffer.
This is fixed by calling av_frame_make_writable which ensures
the frame and its associated buffer are writable. If its not,
it will copy the AVFrame, create a new AVBuffer for it and
decrease the refcount of the old AVFrame and AVBuffer.
This way OBS always ends up with a usable buffer to write into
which is not still used by the encoder while avoiding a copy
when unnecessary.
This implements OSS audio input capturing support for OSS-capable OSes.
FreeBSD and DragonFly (not yet tested on) supports are added as a
starting point.
The error message in the process_packet function was prefixed with
"receive_audio" because it was previously from code in the encode_audio
function which was called from the receive_audio function. This is just
a string change to avoid being misled to believe that the error is
always audio related.
If we fallback to ffmpeg NVENC, the error from new NVENC might still be
present in the encoder structure. Given that this provides a lot more
actionable information to the user, let's use it if possible.
While discussing the Flatpak RFC [1], it was spotted that the
LUT filter couldn't open the file selection dialog. It was
explained, then, that the proper formats were either composed
of "User Label (file extensions)", or "file extensions", and
the LUT filter was setting "(file extensions)" without the
actual user label.
While this works on a standard Qt file selection dialog, it
cannot be properly formatted as a set of D-Bus filters, thus
breaking the sandbox integration.
Add a simple user label to the LUT file filter.
[1] https://github.com/obsproject/rfcs/pull/21#issuecomment-619106757
Enables a pipeline for texture-based encoding with QSV. Utilizes OBS
NV12 output for encode to avoid offloading them from GPU, which will
increase performance. The option to select old QSV pipeline still
remains and will fallback if new pipeline fails.
add_control_property() was previously static inline bool, but did not
return a value and failed to build on FreeBSD-CURRENT with Clang 10.0,
with:
error: non-void function 'add_control_property' should return a value