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

12105 Commits

Author SHA1 Message Date
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
tytan652
ca896dbce7 media-io: Fix FF_API_BUFFER_SIZE_T not being defined on Ubuntu 20.04 2023-01-19 13:08:46 -05:00
tytan652
e4f004cdf8 mac-syphon: Fix unused parameter warning 2023-01-19 13:08:46 -05:00
tytan652
e58a2d49e0 obs-filters: Fix unused parameter warnings 2023-01-19 13:08:46 -05:00
tytan652
c6a8b03719 obs-scripting: Fix compilation warnings on Clang and GCC
- Fix Python deprecation warnings
- Fix maybe uninitialized warning (GCC only)
2023-01-19 13:08:46 -05:00
tytan652
2839837ed6 plugins: Fix -Wsign-compare on Linux 2023-01-19 13:08:46 -05:00
tytan652
b0c1c9c86c libobs,plugins: Remove individual -Wno-switch 2023-01-19 13:08:46 -05:00
John Bradley
61284cf9ba libobs: Refactor obs-output encoded use of mixes
There was quite a bit of conflated usage of mixes (which refers
to raw audio) and encoder counts. This fully separates the two
and makes a distinct separation when iterating over mixes vs
encoders.
2023-01-18 11:54:20 -08:00
John Bradley
d70171daa6 libobs: Make internal version of remove encoder 2023-01-18 11:54:20 -08:00
tt2468
5a68d3aaf5 UI: Remove extra encoder function calls
The audio_t and video_t objects are already applied in the parent
functions already.
2023-01-18 12:17:35 -06:00
tt2468
8f0e5a72d6 UI: Fix logging of output ID when start fails + code cleanup
Previously, an output that does not implement `info.get_output_type`
would result in these log messages saying `(null)`. This uses the actual
ID directly from the output itself instead.

Also removes two extra calls to `obs_encoder_set_video()` as they are
redundant and unnecessary.
2023-01-18 12:17:35 -06:00
tt2468
25df3e183e libobs: Fix logging of remaining views
OBS has been logging `1 views remain at shutdown` when in reality there
are not technically any views remaining. When views are removed, the
view itself is destroyed immediately, but the mix remains, to be
garbage collected by the graphics thread.

In this case, the view has already been removed, but the graphics
thread has not run an interation and cleaned up the mix, so this
log message appears.

Fixes the issue by checking if a mix actually has an assigned view,
instead of blindly logging existing mixes.
2023-01-18 12:17:35 -06:00
tt2468
c69e40734d libobs: Prevent encoders from initializing/starting if no media is set
This fixes a case of undefined behavior, where encoders can try to init
or start without actually having any video_t or audio_t object
assigned.
2023-01-18 12:17:35 -06:00
tt2468
7e30d3f8a2 libobs: Remove unused internal encoder util function
Was previously introduced in a0f679bc40,
but has since been made unused.
2023-01-18 12:17:35 -06:00
tt2468
eb0d9dc5d2 libobs: Allow sending NULL to obs_encoder_set_video/audio()
There is currently no way to clear a video_t or audio_t object from an
encoder once applied. `audio_t`/`video_t` objects can be destructed at
any time, and it is dangerous to prevent these object references from
even being cleared.

This does not fix the issue where destroying an audio/video object does
not clear the reference from all subscribed encoders.
2023-01-18 12:17:35 -06:00
tt2468
dfc20bbb31 libobs: Protect some encoder functions from being used while active
Protect `obs_encoder_set_video()` and `obs_encoder_set_audio()` from
being used if the encoder is active. Changing these values while active
is undefined behavior.
2023-01-18 12:17:35 -06:00
PatTheMav
447adfbe38 mac-virtualcam: Fix memory access issues for shared IOSurfaces
The DAL plugin-based virtualcamera shares data between OBS and the
plugin using an IOSurface. IOSurface locks are necessary to ensure
race conditions between data generation (OBS side) and consumption
(virtual camera side) and also that an IOSurface is not offloaded to
GPU memory when it is indeed needed in CPU memory.

Also moves the invalidation of the NSMachPort for the frames to after
the IOSurface data has been converted into a pixelbuffer and added to
the frame queue of the virtual camera, as an early invalidation will
cut off access to the pixel data shared with the DAL plugin.
2023-01-16 12:16:16 -05:00
tt2468
f6d0c63b1e
Merge pull request #6960 from tytan652/fix_switches
Switch clean up (remove one-case switch and switch warning workaround)
2023-01-16 03:55:48 -08:00
tytan652
8fad36868e UI: Refactor Windows taskbar switch 2023-01-16 11:52:26 +01:00
tytan652
107b2a8f27 libobs-d3d11,libobs-opengl,plugins: Remove unneeded cast in switches
Those casts were usually used to workaround switch warnings.
2023-01-16 11:52:26 +01:00
tytan652
cf5c68b773 UI,libobs,libobs-opengl,obs-ffmpeg: Remove unneeded cast in switches
Those casts were usually used to workaround switch warnings.

Also adds default to OBS frontend event switches that had this
workaround.
2023-01-16 11:52:26 +01:00
tytan652
9cde3c302c libobs: Fix all-except-one switches 2023-01-16 11:52:17 +01:00
tytan652
7de0bd350f libobs,plugins: Remove one-case switches 2023-01-16 11:43:47 +01:00
tt2468
78d31322b2 libobs: Remove extra space in output reconnect log message
It has been bothering me to no end.
2023-01-15 22:59:59 -08:00
tt2468
24e9f82f87 docs: Document a few missing obs_output_t function calls
- `obs_weak_output_references_output`
- `obs_output_get_id`
- `obs_output_output_caption_text[1/2]`
2023-01-15 22:09:23 -08:00
Exeldro
eb35b07f44 libobs: Fix stopping transitions that are not active 2023-01-14 15:54:48 -08:00
jpark37
22ea8f4e1f libobs-winrt,win-capture: Add Force SDR for WGC display
Leverage existing window capture support for display capture.
2023-01-14 15:49:43 -08:00
jpark37
fb58f60ae4 win-capture: Show Force SDR setting on Windows 10
Was using wrong bool for visibility.
2023-01-14 15:49:43 -08:00
Richard Stanway
bf00ef1ea3 obs-outputs: Improvements to Windows interface logging
Now uses GetIfEntry2 which supports 64-bit values for reporting speed, so
10+ gbps adapters are now reported correctly in the log. Also added an
additional log line if the interface error counters are non-zero to possibly
help identify physical faults. Finally the transmit and receive speeds are
logged independently so that asynchronous mediums such as Wi-Fi that might
have good RX but poor TX can be better diagnosed.
2023-01-14 15:48:43 -08:00
Kurt Kartaltepe
599b017881 libobs-opengl: Drop gl pointers on device_leave_context
Mac was already dropping a most of these when leaving contexts,
this patch brings the same drops to linux and also drops vertex/index
buffers that were noticed as leaking across contexts and resulting in
invalid bindings by later draws. Especially with the new spacing labels.
2023-01-14 15:33:18 -08:00
derrod
143877c8ff updater: Fix portable OBS not being relaunched correctly 2023-01-14 15:30:58 -08:00
Norihiro Kamae
1805712f46 libobs/util: Fix text-lookup not always case-insensitive
Convert `lookup` to upper-case before creating the tree so that later
code does not need to consider the case-insensitivity.
When converting to upper-case, use `toupper` instead of adding 0x20 so
that the behavior is consistent with `astrcmpi_n`.
2023-01-14 15:09:25 -08:00