The gs_texture_create_from_dmabuf function is able to create textures
from multiplanar DMA-BUF data. However, the only in-tree consumer of
this function - the PipeWire capture - does not use that.
Make PipeWire create textures from multiplanar buffers.
Unfortunately these encoders tend to crash or freeze after after
multiple bitrate changes. Users with dynamic bitrate enabled
experience a random encoder freeze which manifests as OBS dropping to
0kb/sec and disconnecting and it's not at all obvious that dynamic
bitrate is the cause. Disable it for now until we can figure out if
there is any workaround or bug on our end.
Doesn't make sense to grab the oldest frame when not capturing overlays,
because the overlay was already rendered in it. This will grab the
latest frame (before the overlay is rendered).
This commit adds the stream key link URLs to services that have them
from UI/window-basic-auto-config.cpp and
UI/window-basic-settings-stream.cpp. This will enable querying these
values from services.json and remove service-specific code from UI code.
This change is to be consistent with an upcoming commit where
"stream_key_link" is used for the key. While the JSON spec allows spaces
in keys, it isn't widely exercised. Having spaces in keys may introduce
other issues if the JSON data were processed in JavaScript (e.g., dot
notation vs. bracket notation), so let's just replace the spaces with
underscores.
Use D3D12_RESOURCE_STATE_PRESENT for CreateWrappedResource arguments. We
should assume the application will set the backbuffer to PRESENT, and
expect that to be preserved across the Present() call.
Remove unnecessary calls to ReleaseWrappedResources.
Clean up (void**) casts with modern patterns.
Fix inet_ntop()/inet_pton() being called with an incorrect argument for
IPv6 addresses.
On Linux, the offset of the sin_addr and sin6_addr fields differ and
the confusion on the inet_ntop() call produces an erroneous IPv6 string
representation such as "0:0:2001:db8::". This is visible on the UI,
Settings -> Advanced -> Network -> Bind to IP.
The same goes for the inet_pton() call.
Unlike Xcomposite, the XSHM plugin does not use GLX code, and thus
can be used on when EGL renderer is used. It still is X11-specific
though, and shouldn't be used on Wayland.
Rework the obs_module_load() function of linux-capture to use a
switch statement, and load XSHM both on EGL/X11 and GLX/X11.
Fixes https://github.com/obsproject/obs-studio/issues/5122
Although obs_source_add_active_child indicates to a child source that a
child source needs to activate, sources will not activate until the next
tick. However, because the transition start call is made from within the
UI thread, the time in which the media source renders is not guaranteed
to be activated by the time the stinger renders due to a potential race.
Thus he media source of a stinger is not guaranteed to be activated,
causing a brief flash. This also applies when stopping a stinger.
This problem normally doesn't really affect normal stingers; instead, it
affects track matte stingers because it is critical for them to be on
time in order to have the mask data.
In order to solve this, check to see if the underlying media source is
actually active and able to render when performing the masking.
- Simplify JS function registration/definition
- Enable Ctrl+R on Linux and Cmd+R on macOS for Browser Panels
- Fix keyboard support in Interact dialog on macOS
- Remove fractional scaling ifdefs
- Remove unused variable definition
- Remap semi-transparent colors for linear blend
- Set user_agent_product in CEF >=91
- browser-panel: Manually unset XdndProxy
On my system with ~250 processes running, this loop has to run over 500
times before allocating enough memory. Use better initial and increment
values to avoid thrashing the heap.
Changes the formats dropdown for decklink output to only show formats
using the same framerate as OBS does. OBS cannot perform framerate
conversions, meaning that if OBS's framerate is set to 45fps, and
decklink output is set to 60fps, the output will either lag heavily
or simply not function.
Update window, display, and game capture to always bilinear filter in
linear space, even if the source texture is not SRGB typed. This helps
resolve confusion in situations where we were filtering in nonlinear
space vs. linear space, like when toggling an empty crop filter.
The gs_draw_sprite_subregion() function is used when a cropping
rectangle is received from PipeWire. It is usually used by
compositors to implement window screencast - where a large and
mostly empty frame is sent, the window contents are only a small
part of it, and the crop rectangle tells us that.
Recently the wlroots implementation of portals started to use it
to implement cropping, and it exposed a bug in the PipeWire code
in OBS Studio. The gs_draw_sprite_subregion() function takes a pair
of integers representing position (x, y) and a pair of integers
representing size (width, height). The PipeWire code, however,
passes a second pair of positions (x2, y2) instead of sizes, and
it causes overrendering the crop area.
This bug wasn't hit yet because both GNOME and KDE implementations
always send (0, 0) as position, which practically never trigger
this condition.
Pass only width and height to gs_draw_sprite_subregion(), instead
of adding x and y to them.
Fixes https://github.com/obsproject/obs-studio/issues/4982