Commit Graph
11796 Commits
Author SHA1 Message Date
Stefan Hoffmeister fca624ea4f linux-v4l2: Send STREAMON/STREAMOFF on vcam start/stop
This implements a suggestion made in
https://github.com/floe/backscrub/issues/133#issuecomment-1085598710 to
address what appears to be a problem in the v4l2loopback driver.
And better aligns OBS' usage to the v4l2 kernel interface.

fixes #4808
Co-authored-by: Norihiro Kamae <norihiro@nagater.net>
2022-10-20 18:35:35 -07:00
PatTheMav 89eeeb9c65 docs: Fix sphinx import error on Python 3.10+ 2022-10-20 21:26:52 +11:00
jp9000 556ef40529 obs-ffmpeg: Fix NVENC "mq" to use P6 rather than P4 2022-10-19 17:52:30 -07:00
jp9000 70c5f6c24a UI: Change "hq" to use P5 when upgrading NVENC 2022-10-19 17:51:07 -07:00
tytan652 15689fd4bd UI: Fix stats widget appearance on Yami themes
- QSS changes fix background color on the stats dialog.
- Making OBSBasicStats derive from QFrame fixes the background color
and round bottom corners on the stats dock.
2022-10-19 15:02:25 -04:00
tytan652 0a12d6728c UI: Fix stats widget status font size 2022-10-19 15:02:25 -04:00
tytan652 9bd34fe0cc UI: Fix theme if apply and cancel in settings
Cancel after apply in settings will set the old theme.
2022-10-19 15:01:37 -04:00
derrod 03490a4a12 CI: Fix Steam launching x86 version under Rosetta
Apparently Steam running the OBS launch script makes it run
inside Rosetta as well, so it ended up launching the x86 version
even on arm64 systems.

Explicitly detect Rosetta translation and set arm64 in those cases.
2022-10-19 11:26:06 -04:00
Ryan Foster beb649c06d Merge pull request #7581 from PatTheMav/virtualcam-fixes
mac-virtualcam: Fix crashes in apps loading virtual camera and performance fixes
2022-10-18 20:25:25 -04:00
PatTheMav 0b0ac1b958 mac-virtualcam: Remove unnecessary IOSurfaceLocks in Mach Server
IOSurface locks are only necessary when any processing with the data
contained in the surface is done and an explicit copy of data from GPU
memory back to CPU memory is needed.
2022-10-19 01:59:11 +02:00
PatTheMav 558c2a7074 mac-virtualcam: Remove unnecessary use of NSAppleEventDescriptor 2022-10-19 01:59:11 +02:00
PatTheMav a754cacc7f mac-virtualcam: Use IOSurfaceLock on Intel-based Macs only
Apple Silicon-based Macs have a unified memory architecture, as such
an IOSurface will always be available in memory accessible to the CPU
and GPU (and an off-load of the IOSurface will not take place).

eGPUs are not supported on Apple Silicon-based Macs either, so an
IOSurface lock to ensure data is copied back to CPU memory is not
necessary.
2022-10-19 01:59:11 +02:00
PatTheMavandSteven Michaud 36a86f5217 mac-virtualcam: Fix random crashes in applications loading VirtualCam
Without invalidating the mach port used for sharing the IOSurface
between OBS and the application displaying the virtual camera output,
IOKit seems to run into the issue of receiving "shared" mach ports,
possibly because of port exhaustion. IOKit requires a "new" port
however and crashes upon that error otherwise.

Co-authored-by: Steven Michaud <smichaud@pobox.com>
2022-10-19 01:59:11 +02:00
derrod c9b82da5a5 CI: Fix services check using deprecated GHA output
Also fixes an invalid type annotation.
2022-10-18 18:41:12 -04:00
Ryan Foster 7c66b125ae CI: Update GitHub Actions for set-output deprecation
GitHub Actions has deprecated set-output. Replace usages of set-output
in stdout with the new syntax to save the output to the new environment
variable.

See:
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2022-10-18 17:48:22 -04:00
gxalpha 4d4a888f8e UI: Use correct title for failed replay buffer start 2022-10-15 16:35:20 -07:00
cg2121 3c7b1c8297 obs-frontend-api: Add theme functions
This adds a frontend function to check if a theme is dark and also
adds an event for when the theme is changed.
2022-10-15 16:21:34 -07:00
Richard Stanway 2ad517e91e obs-filters: Remove unused assignments 2022-10-15 16:17:46 -07:00
Richard Stanway 1d044db4f6 UI: Check return value of ConvertResText before accessing results 2022-10-15 16:17:46 -07:00
Richard Stanway a282b1c64d libobs: Add ifdef for Windows-only variable assignment 2022-10-15 16:17:46 -07:00
Richard Stanway cba81638b5 UI: Fix potential memory leak when parsing OBSThemeMeta 2022-10-15 16:17:46 -07:00
Richard Stanway f021da2afa UI: Copy result of getenv before use
Another call to getenv, as well as a call to the POSIX functions
setenv(), unsetenv(), and putenv() may invalidate the pointer
returned by a previous call or modify the string obtained from a
previous call.

https://en.cppreference.com/w/c/program/getenv
2022-10-15 16:17:46 -07:00
Richard Stanway daee83373c UI: Remove unused assignments 2022-10-15 16:17:46 -07:00
PatTheMav e2db9b7f70 UI: Fix possible crash due to UI property access from graphics thread
Selection state can change by main thread while UI thread (which
calls DrawSpacingHelpers) tries to evaluate the amount of selected
items. Get amount of selected items by enumerating over the scene data
instead (which stays within the graphics thread).
2022-10-15 16:06:50 -07:00
jp9000 feda64e9c6 virtualcam-module: Fix crash on resolution change
Certain programs can start the virtualcam filter, then they may choose
to call `Stop()` on the filter, call `SetFormat()` to change the
resolution, then call `Run()` again to start the filter again. The
Windows virtual camera filter did not account for this, thus if the
resolution was different, it had potential to cause a crash.

To fix this, store the last filter resolution, then check the resolution
every frame, and if it changes, reset the scaling information.

(Author note: This code is unclean. What we need to do with the virtual
camera filter is make it only create the thread on `Run()`, then join
the thread on `Stop()`. It's currently a bit complicated to make it do
that at the moment, so this code is a kind of an annoying stopgap for
now.)
2022-10-15 01:42:07 -07:00
jp9000 bc9ed5062d virtualcam-module: Clarify resolution variables
The `cx`/`cy`/`interval` variables specifically specify the
OBS/placeholder resolution/interval. The resolution may not be the same
as the filter's resolution (when scaling is used).

Instead, prefix these variables with `obs_` to improve clarity.
2022-10-15 01:29:05 -07:00
jp9000 e18acb57af obs-ffmpeg: Clarify name of NVENC preset 2022-10-14 16:25:22 -07:00
jp9000 bcb73cb599 virtualcam-module: Don't send frames on initial pause
Sending frames on initial pause seems to cause an odd crash on
subsequent frame calls.

(Note by author: I do not know why the crash happened because code
beyond OBS is a proprietary black box. I suspect it's just a bug in
WebRTC or something, but I can't know for sure. This is incredibly
frustrating. But at least this particular crash seems to be fixed.
...for now.)
2022-10-14 00:14:54 -07:00
Richard Stanway e93ad13529 UI: Don't offer current resolution in auto config if < 240p
Fixes #3612.
2022-10-13 23:13:27 +02:00
Ryan Foster b2ff22a587 UI: Swap mq and hq NVENC Preset mappings
The old preset "mq" was "Max Quality", which used the old HQ preset with
two-pass enabled. The old preset "hq" was "Quality", which used the old
HQ preset without two-pass. Of the two, "mq" would have been considered
"slower" or "higher quality" than "hq", so let's swap these entries.
2022-10-12 21:21:03 -07:00
jp9000 3dfcdb8c07 Revert "libobs: Update version to 28.1.0"
This reverts commit 9baf7f4a8f.
28.1.0-beta1
2022-10-11 19:37:32 -07:00
jp9000 9baf7f4a8f libobs: Update version to 28.1.0 2022-10-11 17:11:47 -07:00
Chip Bradford 5054e5739a UI: Use transform to fit vcam source to canvas 2022-10-11 15:38:30 -07:00
Chip Bradford 2af28d62e9 Revert "UI: Remove individual sources (for now) from vcam config"
This reverts commit 7c8995c20f.
2022-10-11 15:38:30 -07:00
PatTheMav 9b317edb22 docs: Add obs_sceneitem_group_enum_items API call to scripting docs 2022-10-11 15:19:41 +02:00
PatTheMav d9f89be35a obs-scripting: Add obs_sceneitem_group_enum_items function call
Adds function call to enumerate over items contained in a source group.
2022-10-11 15:19:41 +02:00
gxalpha 277dafab98 mac-capture: Log CoreAudio device sample rate 2022-10-09 17:09:07 -07:00
Patrick HeyerandNorihiro Kamae 49b4ba8ed9 obs-scripting: Fix block comment formatting
Co-authored-by: Norihiro Kamae <norihiro@nagater.net>
2022-10-10 02:07:02 +02:00
PatTheMav 0af8bdb350 obs-scripting: Fix script state variable being reset by tick callback
When loading a new Python script, the GIL might be released while
importing the module, allowing the tick to run and change and reset the
cur_python_script state variable. Use the busy_script variable to save
and restore the value if not null.
2022-10-10 02:07:02 +02:00
gxalpha dd06fe44ad mac-videotoolbox: Remove "None" profile
Selecting this would actually fall back to "main", so we should just use
main as the default.
2022-10-09 16:58:30 -07:00
Service Checker 98199315e0 rtmp-services: Remove defunct servers/services 2022-10-09 16:54:48 -07:00
gxalpha 767d6dafd0 UI: Move "Always On Top" into View menu 2022-10-09 16:53:54 -07:00
gxalpha e4a9c7da9c UI: Add multiview menus to UI file 2022-10-09 16:53:54 -07:00
Norihiro Kamae ba77ca6592 vlc-video: Fix crash at removing files from missing-file dialog
The callback missing_file_callback will get an empty string when a user
decided to remove the file on the missing file dialog.
Avoid the empty string to be held in files array and remove it.
Also avoid passing an empty file name from the property to internal
functions.
2022-10-09 16:40:06 -07:00
Alex Kosenko 39111dab3d rtmp-services: Update ingest list for Restream.io 2022-10-09 16:38:05 -07:00
PatTheMav e76fbaa016 obs-vst: Toggle properties button visibility upon VST selection
A prior patch made the button to show/hide a VST check the current
status of a loaded VST. This lead to situation where upon first
selection a VST might be loaded but the button's visibility is not
changed.

This change will reevaluate the status of a loaded VST upon selection
in the drop-down menu and trigger button visibility accordingly.
2022-10-09 16:33:27 -07:00
Kurt Kartaltepe 84687813e3 linux-pulseaudio: Use DONT_MOVE for non-default devices
Ask the PA server to kindly not migrate our streams to the default
device unless the user chose the default device for input/output
captures.

Fixes #3211
2022-10-09 16:31:00 -07:00
tytan652 47fcaed8d3 UI: Fix NVENC AV1 preset while resetting encoders 2022-10-09 16:26:29 -07:00
derrod a372c1c0b3 win-capture: Update D3D9 signature for Win 11 22H2 2022-10-09 16:21:02 -07:00
PatTheMav 8f362fe508 UI: Clamp float values possibly representing infinity to integer size
Casting a floating point type to an integer type has undefined behaviour
if the value does not fit into the destination type.

As the volume meter is initialized with floats values representing +inf
(as makes sense for a dB meter), values should be explicitly clamped
to integer boundaries.
2022-10-09 16:20:03 -07:00