Reverts much of PR #11906 in favor of a different way to detect whether
or not the output capabilities must be reset.
The new approach will contain false positives for which the workaround
is not needed but it won't have negative side effects.
When a new device is selected, a best-possible frame rate is chosen
for the initial configuration of the device. This has to be set in the
source settings, as those are the "source of truth" for the properties
and the device configuration.
The object has to be created explicitly first before setting the
frame rate value. The source then has to be updated explicitly as well
to ensure that the change will be picked up by the next iteration
of the render thread to "tick" the source and thus make it configure
a capture session with the fallback framerate set.
v1 of obs_properties_add_button will be deprecated soon.
Also fixes UNUSED_PARAMETER calls in the callbacks for parameters that
are not actually unused, and moves the other ones to the top (as in most
of the rest of the project).
Make sure to use the invalid fd -1 when the output is not opened, and
only close valid fds. If fd 0 is closed, then this closes stdin. The
second time this happens, some other important fd will have become fd 0,
breaking something.
This causes random things to break (browser/CEF in reports, but really
it could be anything) as the wrong fds get closed.
The use of `SPA_POD_OPT_Rectangle()` means that if the rectangle cannot be
parsed, then no error will be returned. In that case uninitialized variables
will be used. This can happen if the pod object contains e.g. a list of
resolutions (`SPA_CHOICE_Enum`).
Fix that by using `SPA_POD_Rectangle()`, which enforces successful parsing.
New Features:
- Added Canvas support [exeldro]
- `GetCanvasList` request
- `CanvasCreated` event
- `CanvasRemoved` event
- `CanvasNameChanged` event
Bug Fixes:
- Fixed a possible crash on OBS shutdown [exeldro]
Changes:
- Updated translations [WizardCM]
- Various fixes and improvements to Canvas support [tt2468/Warchamp7]
The SPA format (pixelformat) was compared with a libobs video format
value.
Also removes the SPA format support check since at this point it already
has been done while listing formats.
The resolution and aspect ration should be added to the description of
the format even if there are no available frame rates.
The code is restructured a bit to avoid having to call `dstr_free()`
before each `continue`.
Fixes: 4cfcfc8c35 ("linux-pipewire: Make camera framerate non-mandatory")
The HDR support is removed from the full blur FX but kept for Background
Blur and Greenscreen FX.
The Blur FX is SDR only but for Background Blur it can be tolerated
since the foreground is not touched.
Signed-off-by: pkv <pkv@obsproject.com>
We were giving images to the Blur effect in linear color space.
This caused a darkening of colors with banding effects.
This fixes the issue.
For Background Blur FX, we composite the original texture with the
blurred one using the mask provided by AI Greenscreen.
This means the non blurred area will look the same whether the filter is
applied or not, irrespective of OBS settings and the nature of the
source. For both HDR & SDR this preserves the colours in non blurred
zones.
Signed-off-by: pkv <pkv@obsproject.com>
Chapters take their timestamp from the total video frame time. With
file splitting enabled in recording settings, the time offset since
the start of the current split was made needs to be considered before
submitting chapters to the muxer.
Change to subtract start_time of the current output from the chapter
timestamp.
The enum members being getting the bitwise or here are from different
enums, and bitwise operations on members from different enums are
deprecated in C++20. kAudioFormatFlagsNativeFloatPacked is the
equivalent value (see its defintion), but removes the manual bitwise or.
std::find is used in enumerate_frame_rates already, so the equality
operator is needed there. Until C++17 this is defined implicitly, but
since C++20 it's needed explicitly.
efca325 already increased the default bitrate for various encoders.
However, some were missed and this commit fills the gap:
* Mac-VT
* OpenH264
* Texture AMF
* VAAPI
For 'pulse_output_capture', calls are added when devices are either
changed, started or removed.
The calls trigger a check against the monitoring device.
Signed-off-by: pkv <pkv@obsproject.com>
For 'coreaudio_output_capture', calls are added when devices are either
changed, started or removed.
The calls trigger a check against the monitoring device.
Signed-off-by: pkv <pkv@obsproject.com>
For 'wasapi output capture', calls are added when devices are either
changed, started or removed.
The calls trigger checks against the monitoring device.
Signed-off-by: pkv <pkv@obsproject.com>