0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

12136 Commits

Author SHA1 Message Date
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
tytan652
6dd99e3a9f UI: Fix implicit conversion warning on Linux with Clang 2023-01-19 13:08:46 -05:00
tytan652
323d2f60da obs-outputs: Calm some warnings if FTL on Clang and GCC
-Wenum-conversion is only available with GCC from the version 10.
2023-01-19 13:08:46 -05:00
tytan652
1007a0cf42 linux-capture: Fix format-overflow warning 2023-01-19 13:08:46 -05:00
tytan652
77a174ddac aja,aja-output-ui: Calm deprecation warnings on Clang and GCC 2023-01-19 13:08:46 -05:00
tytan652
678b0287e6 libobs: Calm stringop-overflow warning on GCC
Those warnings appeared with GCC 12 with -O2, those are potentially
created by regression from GCC.
2023-01-19 13:08:46 -05:00
tytan652
c648222332 libobs,libobs-opengl,obs-ffmpeg-mux: Calm deprecation warnings on *nix
Calm libobs-opengl deprecation warnings on macOS.

Calm FFmpeg deprecation warning with LIBAVFORMAT_VERSION_MAJOR < 59.
2023-01-19 13:08:46 -05:00
tytan652
541b3292e9 cmake: Add workaround for GCC on aarch64
GCC on aarch64 seems to found type-limits issue in the code where GCC
x86_64 does not.
2023-01-19 13:08:46 -05:00
tytan652
189c6939d1 cmake: Treat warnings as errors on Clang and GCC
-Wformat-security is enabled, some Linux packages build system have it
enabled.
https://github.com/obsproject/obs-studio/pull/5766

-Wunused-parameter is enabled too.

Also ensure that null conversion (C++ only for GCC) is enabled because its
enablement by default can depend on the CMake generator.

-Wswitch is enabled but it is kept as a warning. It was already enabled
with Clang.

If Clang has -Wshorten-64-to-32 enabled, keep it as warnings.
2023-01-19 13:08:46 -05:00
tytan652
2f11151056 obs-filters: Disable RNNoise warning on Clang 2023-01-19 13:08:46 -05:00
tytan652
f147be2d68 obslua: Ignore maybe-unitialized warning with SWIG and GCC
Only with SWIG version earlier than 4.1 because it is fixed upstream.
fa2f9dc5da
2023-01-19 13:08:46 -05:00
tytan652
2d7e854476 deps/jansson: Disable warnings on Clang and GCC 2023-01-19 13:08:46 -05:00
tytan652
d473c9416f obs-ffmpeg: Fix compilation warnings on Clang and GCC
- Fix format warnings
- Fix unused-parameter warnings
2023-01-19 13:08:46 -05:00
tytan652
ba92da8d74 aja: Fix compilation warnings on Clang and GCC
- Fix format warning
  On Linux uint64_t is a unsigned long and on macOS it is
  a unsigned long long.
- Fix macro-redefine warning on macOS
2023-01-19 13:08:46 -05:00
tytan652
90c49c7af1 UI: Fix shadow-ivar warning on macOS 2023-01-19 13:08:46 -05:00