Commit graph

12150 commits

Author SHA1 Message Date
gxalpha 11e9291800 UI: Set macOS appearance on theme change
Makes macOS aware that we're using either light or dark theme to adjust
native dialog colors accordingly.

Co-Authored-By: Patrick Heyer <PatTheMav@users.noreply.github.com>
2023-01-31 18:50:56 +01:00
gxalpha 2272efc91f UI: Use native combobox popup on macOS
As recommended by Qt on QTBUG-106162, this fixes QComboBox popups not
working with VoiceOver.
2023-01-31 18:50:56 +01:00
derrod cd78ecae50 updater: Deduplicate delta patch downloads 2023-01-29 02:24:55 -08:00
derrod cbe3ef7e57 Revert "UI/updater: Fix files with similar hashes clashing"
This reverts commit 7396c211be.
2023-01-29 02:24:55 -08:00
cg2121 52045316b3 UI: Hide menu items if source is only audio
Hides the following items if source is only audio:
- Transform menu
- Resize output (size of source)
- Scale filter menu
- Blending mode menus
- Projector menus
- Screenshots
- Interact
2023-01-29 00:02:40 -08:00
tytan652 918c0c0aeb deps/media-playback: Fix deprecation warning 2023-01-28 23:20:41 -08:00
tytan652 e13e0937a2 obs-scripting: Fix compilation warnings on Clang and GCC
* Fix unused-parameter when Python is disabled
* Calm PySys_SetArgv deprecation since Python 3.11
2023-01-28 23:20:41 -08:00
tytan652 d7fade2c44 cmake: Allow disabling deprecation errors on GCC/Clang 2023-01-28 23:20:41 -08:00
Crocodile Gena a96211a0ee obs-vst: Add reporting of vendor name 2023-01-28 23:07:48 -08:00
Norihiro Kamae e7c40a1d29 obs-ffmpeg: Remove unused macro 2023-01-28 19:03:55 -08:00
Norihiro Kamae 2b4bc03b4c libobs/graphics: Remove unused macros for inputs 2023-01-28 19:03:55 -08:00
Norihiro Kamae 72e7437ce9 win-capture: Remove unused macros 2023-01-28 19:03:55 -08:00
Norihiro Kamae a4a85af787 obs-text: Remove unused macros 2023-01-28 19:03:55 -08:00
Norihiro Kamae d89ca58467 obs-outputs: Remove unused macro 2023-01-28 19:03:55 -08:00
Norihiro Kamae 1069d81019 obs-filters: Remove unused macro 2023-01-28 19:03:55 -08:00
Norihiro Kamae be2e082961 mac-capture: Remove unused macros 2023-01-28 19:03:55 -08:00
Norihiro Kamae 27c7dc9155 docs/sphinx: Add undocumented macros for darray 2023-01-28 19:03:55 -08:00
Norihiro Kamae d18a6f1039 libobs/graphics: Remove unused macros
The macros BOUNDS_MAX_X, BOUNDS_MAX_Y, and BOUNDS_MAX_Z are never used
and they are never defined how to use.
2023-01-28 19:03:55 -08:00
Norihiro Kamae cf2a9461a8 Remove OBSBasicSettings::VideoChangedRestart
The function `OBSBasicSettings::VideoChangedRestart` was never called,
hence remove it.
2023-01-28 19:03:55 -08:00
Norihiro Kamae c2f157470b UI: Remove unused macros
Also removes a translation string that was referred from the removed
macro.
2023-01-28 19:03:55 -08:00
tytan652 10880d6b21 UI: Unblock encoder comboboxes signals before change
Signals are blocked while encoder is enforced, those need to be
unblocked before setting the new encoder.
2023-01-28 15:50:41 -08:00
gxalpha b5b293fe72 UI: Re-raise properties window after picking files on macOS 2023-01-28 15:09:49 -08:00
Richard Stanway 668775f4f0
obs-ffmpeg: Use gai_strerrorA for error logging on Windows
Avoids wide characters in the format string which cause truncation.
2023-01-27 23:41:07 +01:00
Richard Stanway 062cfcf63d
obs-filters: Fix wrong number of arguments to error macro 2023-01-27 23:21:41 +01:00
Richard Stanway 9b1f7d6d21 virtualcam-module: Update filter size immediately when used in OBS
Fixes a crash due to the previous output size being used when scaling
the frame.
2023-01-27 13:03:22 -08:00
pkv 10e6d0fbd0 obs-filters: Improve upward compressor with soft knee
This adds a knee setting to the upward compressor.

Signed-off-by: pkv <pkv@obsproject.com>
2023-01-26 23:23:45 -08:00
Norihiro Kamae 50db09760c obs-filters: Make continuous gain on upward compressor
The upward compressor has a -60 dB threshold to stop increasing the
gain. At the threshold, the gain was not continuous, which is not ideal.

Co-authored-by: pkv <pkv@obsproject.com>
Signed-off-by: pkv <pkv@obsproject.com>
2023-01-26 23:23:45 -08:00
pkv f625bb579f obs-filters: Fix expander and upward compressor above threshold
Fixes behaviours above threshold for expander and upward compressor.
Fixes issues #8052 & #8030 .

Signed-off-by: pkv <pkv@obsproject.com>
2023-01-26 23:23:45 -08:00
columbarius e0a4d8628d linux-pipewire: Reject invalid buffers
PipeWire supports two flags to signal an invalid buffer:
SPA_META_HEADER_FLAG_CORRUPTED signals that the whole buffer is invalid
and should not be used
SPA_CHUNK_FLAG_CORRUPTED signals that one single buffer plane is invalid

Skipping a buffer because of size 0 was moved to only the SHM case.
For DMA-BUFs the size of a single plane is not relevant and should be
ignored [1].

Compatibility note:
GNOME pre 43 sets the chunk size to 0 when a buffer copy failed.
Luckily GNOME doesn't use the META_Header and thus we can detect if we
should use the new or old style of invalid buffer detection.
This workaround should be dropped when reasonable.

[1] https://docs.pipewire.org/page_dma_buf.html
2023-01-26 21:40:05 -03:00
Barnabás Pőcze 8e96d47cd3 libobs-opengl: Close display when destroying X11/EGL platform
Currently, the X11 display may be leaked when the X11/EGL
platform is destroyed. Fix that by calling XCloseDisplay()
to free it.

Fixes: 2fd8a6df55 ("libobs-opengl: Introduce the X11/EGL winsys")
2023-01-25 13:56:50 -05:00
Barnabás Pőcze dee7ef8512 libobs-opengl: Do not close X11 platform display on error
The platform display is not owned by libobs, it should not
be closed. Doing so results in heap use-after-frees when
Qt components try to use it while trying to show
a message box about the failure:

  info: Initializing OpenGL...
  error: Failed to initialize EGL: EGL_BAD_ACCESS
  error: Failed to create context!
  error: device_create (GL) failed
  error: Failed to initialize video.  Your GPU may not be supported, or your graphics drivers may need to be updated.
  =================================================================
  ==2320345==ERROR: AddressSanitizer: heap-use-after-free on address 0x621000018668 at pc 0x7fcb75e20d6e bp 0x7ffe88d0e910 sp 0x7ffe88d0e900
  READ of size 8 at 0x621000018668 thread T0
      0 0x7fcb75e20d6d in XInternAtom /.../libx11/src/IntAtom.c:175
      1 0x7fcb6bf5edfd in Kvantum::ThemeConfig::getCompositeSpec()
      2 0x7fcb6bf0eb19 in Kvantum::Style::setSurfaceFormat(QWidget*) const
      3 0x7fcb6bf11bae in Kvantum::Style::styleHint(QStyle::StyleHint, QStyleOption const*, QWidget const*, QStyleHintReturn*) const
      4 0x5585cbce70b8 in OBSIgnoreWheelProxyStyle::styleHint(QStyle::StyleHint, QStyleOption const*, QWidget const*, QStyleHintReturn*) const /.../obs-studio/UI/obs-proxy-style.cpp:88
      5 0x7fcb85826515  (/usr/lib/libQt6Widgets.so.6+0x226515)
      6 0x7fcb859dbf1d  (/usr/lib/libQt6Widgets.so.6+0x3dbf1d)
      7 0x7fcb859dc5f0 in QMessageBox::QMessageBox(...)
      8 0x7fcb859dc6b1  (/usr/lib/libQt6Widgets.so.6+0x3dc6b1)
      9 0x5585cbd2fb31 in OBSErrorBoxva /.../obs-studio/UI/qt-wrappers.cpp:48
      10 0x5585cbd2fd34 in OBSErrorBox(QWidget*, char const*, ...) /.../obs-studio/UI/qt-wrappers.cpp:55
      11 0x5585cbcc3f36 in run_program /.../obs-studio/UI/obs-app.cpp:2475
      12 0x5585cbcc52b4 in main /.../obs-studio/UI/obs-app.cpp:3358
      13 0x7fcb82e3c28f  (/usr/lib/libc.so.6+0x2328f)
      14 0x7fcb82e3c349 in __libc_start_main
      15 0x5585cbbd2f54 in _start

Fixes: 137966e01f ("libobs-opengl: Try to use the platform display if available")
2023-01-25 13:56:50 -05:00
Barnabás Pőcze 5810571e53 libobs: Close display when destroying X11 hotkey platform
Currently, the X11 display is leaked when the X11 hotkey
platform is destroyed. Fix that by calling XCloseDisplay()
to free it.

Fixes: bcb04bb800 ("libobs: Open a separate X11 connection for hotkeys")
2023-01-25 13:56:50 -05:00
tytan652 ee144377dc cmake,obs-ffmpeg: Refactor Libva finder
This refactor adds Libva DRM, required for obs-ffmpeg
2023-01-25 13:14:41 -05:00
derrod 778cf5a96a updater: Pass AppData path to elevated process 2023-01-25 12:32:41 -05:00
jpark37 0b30ff1deb win-capture: Support EnumDisplayDevices failure
Seeing EnumDisplayDevices fail in the wild, so use GetMonitorInfo name
when the persistent name is unavailable.
2023-01-25 10:44:10 -05:00
derrod ffd7202168 updater: Add additional status messages 2023-01-24 20:14:40 -08:00
jpark37 792f8473ee libobs: Fix SDR async video on non-SDR targets
Bug was seen when projecting SDR video capture on WCG displays.
2023-01-24 19:39:42 -08:00
jpark37 2e7f7acfeb libobs-d3d11: Log monitor color depth 2023-01-24 19:39:42 -08:00
derrod 3dcf68f8ed UI: Work around Qt dock restore crash 2023-01-24 18:43:38 -08:00
jpark37 3462ea3fda obs-ffmpeg: Tell FFmpeg that BGRA uses alpha
Prevents alpha from getting dropped with custom encoders.
2023-01-24 18:39:12 -08:00
WarmUpTill 7d26721be5 frontend-tools: Fix crash on non X11 windowing systems 2023-01-24 16:43:52 -03:00
Kurt Kartaltepe 4216991413 libobs-opengl: Fixup dmabuf queries on X11
Previously we passed the wrong display and formats/modifiers could not
be queried. This prevented pipewire sources from negotiating texture
sharing on x11.
2023-01-24 16:28:51 -03:00
Richard Stanway 5a4283816d obs-filters: Improve NVIDIA effects SDK version checks
- Don't repeatedly query version at runtime in case a user installs the
  SDK while OBS is running
- Restore default DLL search directory
- Don't show outdated SDK message if the SDK is not found
- Protect minimum version macro with brackets
2023-01-24 12:53:15 -05:00
Jan Beich c082c4a74d libobs/graphics: Enable DMABUF on FreeBSD and DragonFly
Required under Wayland (wlrobs) on FreeBSD and DragonFly. DMABUF was
already partially exposed after c50c625555.
2023-01-24 11:50:13 -05:00
cg2121 d08ede33cd UI: Disable screenshot action if item has no video
This disables the source screenshot action in the context menu
if the source has no video.
2023-01-23 18:10:59 -03:00
derrod edcb80ae8b updater: Hash files with multiple threads 2023-01-22 23:58:56 +01:00
cg2121 610a2171a2 UI: Don't open properties dialog if item is scene
This disables opening of the properties dialog if a scene is double
clicked in the source tree.
2023-01-22 10:45:25 +11:00
tt2468 018ce16703 libobs: Fix loading of custom_size for empty scenes
Previously, `custom_size` was checked at the end of the `scene_load`
function. If the scene contained no "items" array, the `custom_scene`
loading code would never be run.

This moves the `custom_size` code above the return statement.
2023-01-22 10:26:47 +11:00
Ryan Foster af59a903e1 CI: Revert Qt to 6.3.1 on Windows 2023-01-19 16:08:02 -05:00
tytan652 aa97b7f1f1 cmake: Add workaround for GCC 12.1.0
Freedesktop Flatpaks 22.08 provide this version of GCC.
2023-01-19 13:08:46 -05:00