avcodec.h stopped including channel_layout.h per FFmpeg commit
1be3d8a0cb77 [1]. Fixes compilation error on macOS against
FFmpeg later than the mentioned commit.
[1] 1be3d8a0cb
NVIDIA drivers appears to have a bug where binding would be excessively
slow. Apply a workaround similar to what [KWin] does to prevent the issue.
Also performs a refactor so that the code paths with and without the
workaround can be shared.
[KWin]: 4f2c3a00c4/src/libkwineffects/kwinglplatform.cpp
Fixes: 316f858c6 ("linux-capture: Fix capturing on software rasterization setups")
Closes: https://github.com/obsproject/obs-studio/issues/5685
Tested-By: univrsal <uni@vrsal.xyz>
We've been listing the supported formats in place whenever we
needed so far, but now we're doing it in too many different
places, which is getting confusing.
Move all these sparsely written rules into one single table
of formats, and adjust the code to lookup data on it.
Choice pods are built with the first element being the
preferred choice, followed by a list of possible choices.
We add the preferred choice inside the loop, which makes
the code slightly harder to follow.
Factor this out of the loop, into a separate step.
From Windows 7 onwards, dynamic send buffering is enabled. By setting
SO_SNDBUF explicitly, we actually disabled the dynamic send buffering
feature which results in reduced throughput. Thankfully this did not
affect the majority of users since the default send buffer is usually
already 64k.
This commit replaces the setting of SO_SNDBUF with log output showing
the current value of SO_SNDBUF at stream start and end. This will aid in
debugging throughput issues caused by a buffer that isn't big enough,
perhaps as a result of the user disabling dynamic send buffering
system-wide.
This commit fixes an issue that the last audio packet is sometimes not
written into mp4 format. Since libavformat internally calculates the
packet duration from the frame_size specified in the codec parameter, it
is necessary to set frame_size.
Ubuntu 21.10 provides PipeWire 0.3.32 which is missing the
`SPA_POD_PROP_FLAG_DONT_FIXATE` required for proper DMA-BUF negotiation.
Since this isn't implemented in the DE's of this Ubuntu version just
defining this flag won't have any impact.
Revert after support for Ubuntu 21.10 ended.
Proper DMA-BUF format and modifier negotiation is possible with PipeWire
0.3.40. This commit adds checks for older versions and allows to build
against them.
These are classified as follows:
* PipeWire server older than 0.3.24: Restrict to SHM only
* PipeWire server between 0.3.24 (incl.) and 0.3.40: Announce modifiers
along with the old method. On failed import drop all modifiers.
* PipeWire server 0.3.40 and newer: Announce modifiers along with the
old method. On failed import drop only a single modifier.
We require PipeWire 0.3.33 or later to make use of the introduces flags
`SPA_POD_PROP_FLAG_MANDATORY` and `SPA_POD_PROP_FLAG_DONT_FIXATE`,
which are required for the negotiation process introduced in the
following commits.
It was naive to add these defines here to avoid a direct include when
the entire platform already depends on the DRM subsystem. Just include
it and let it provide the image formats.
On source destroy, the browser source should not wait for other threads
if it's avoidable, as this could cause hard locks. Instead, mark the
source for destruction, destroy any obs/graphics data, and let the CEF
queue delete the what's left of the pointer at its leisure.
Fixes a hard lock on macs due to the browser source destructor having to
wait for the UI thread (due to USE_QT_LOOP), which may already have been
waiting for the source.
New features:
- Expose Scene controls to sources
- Pass on JS function arguments to BrowserClient
- Add Browser Source Refresh Hotkey
- Render JavaScript dialogs using Qt
- Improve performance of CEF 4638 browser sources
- Set window title for web popups using X11
- Add TypeScript definitions information
Bug fixes/cleanup:
- Don't call WasHidden on browser panels
- Use mutex when accessing BrowserSource::cefBrowser
- Correct JSDoc definitions
- Remove old CEF ifdefs
- Cleanup EditorWidget.h
- Modify log in obs-vst, fix compile error
- Update effect name even effect is unavailable
- Fix crash caused by unsupported interface
- Use deleteLater on editorWidget to prevent crash
- Check result after creating vst plugin
- Fix button states on properties refresh
- Replace QMacCocoaViewContainer with QWidget::createWindowContainer
- Modify incorrect code about mallocing memory