221 Commits

Author SHA1 Message Date
Matt Gajownik
a5f0988933 Update translations from Crowdin 2026-01-10 01:02:43 -05:00
Matt Gajownik
99c3a4b797 Update translations from Crowdin 2025-09-08 22:38:40 -04:00
Matt Gajownik
ffef7504ac Update translations from Crowdin 2025-06-09 14:55:50 -04:00
tytan652
1bf84a6901 cmake: Replace Xcb CMake finders with ECM 2025-04-28 13:30:26 -04:00
Translation Updater
0b2c85845e Update translations from Crowdin 2024-12-06 23:21:55 +00:00
Lain
5a1fca9347 linux-capture: Fix potential null pointer dereference
Use dstr_cmp() instead of strcmp() to prevent null pointer dereferences.

This code for this source has way too many pointers.
2024-10-05 16:49:23 -07:00
Translation Updater
e6d9f73736 Update translations from Crowdin 2024-10-05 05:02:27 +00:00
Ryan Foster
a1fbf1015f clang-format: Increase column limit from 80 to 120 2024-10-04 18:19:27 -04:00
PatTheMav
6c590805e8 cmake: Update supported CMake version range to 3.28 and 3.30 2024-09-13 14:42:32 -04:00
tytan652
31385006d5 Remove legacy_check CMake macro
The macro was not removed in 72428ccd97
waiting for submodules to be be updated to a commit where their legacy
code path is removed.
2024-09-11 13:24:39 -04:00
Lain
9107b90fb3 linux-capture: Fix xshm capturing first display on creation
Like xcomposite, this was programmed to select the first display by
default. Change it to not capture any display unless explicitly selected
by the user.
2024-09-03 13:28:18 -07:00
Lain
dd64fef084 linux-capture: Fix xcomp capturing random windows
There are two situations where xcomposite window capture will capture
random windows: on first creation, and when going to the properties when
the current window is invalid. The first happens because for whatever
reason someone decided to just make it capture the first top-level
window if there is no set value. The second happens because the
properties widget cannot find the value it's looking for and defaults to
the first one when the properties are opened, thus selecting and
capturing the first window in the list (which is probably something we
should fix in the properties view at some point but I don't want to dive
into code that's even *more* cursed than xcomposite code right now)

I think that this was a major oversight and that whoever wrote it
however many countless years ago did not realize that this is something
that maybe users don't want to have happen.

So instead, this diff makes it so that on first creation, it creates a
value that says "[Select a window to capture]" that keeps the capture
inactive until a user actually chooses a window rather than the
top-level window. It also makes it so that if the user has a window that
is no longer valid, it will keep that window in the list and as the
currently selected value, which prevents it from automatically selecting
the first window in the list when properties are opened.

(Have I mentioned xcomposite is cursed? Trying to debug xcomposite code
in a debugger freezes my window compositor and forces me to do a hard
restart of my entire computer, so I was forced to use printf debugging.
Absolute nightmare-inducing code in here.)
2024-09-03 13:28:18 -07:00
Lain
c36575774b linux-capture: Add xcomp func for comparing encoded window IDs
This is cursed. Window ID storage for xcomposite capture is absolutely
cursed. It should not be storing the window handle with this. I'm pretty
sure that whoever wrote it at the time decided to store the god-forsaken
window handle (which does not persist after the window closes) as part
of the ID because they were afraid it might capture the wrong window if
they close OBS and open it up again while the window still exists.

Again, xcomposite capture is absolutely cursed.
2024-09-03 13:28:18 -07:00
Lain
74e49272ba linux-capture: Fix potential null pointer dereference
I'm not happy.
2024-09-03 13:28:18 -07:00
Lain
4d7bc233d7 linux-capture: Move xcomp window ID decoding to its own func
Moves the window handle/name/class decoding code out of the
xcb_find_window() function and into its own dedicated function so it can
be used elsewhere. This s*** is cursed.
2024-09-03 13:28:18 -07:00
Lain
c837d3b533 linux-capture: Set xcomposite capture retry interval to 2sec
Half a second was a bit too often and was spamming the debug logging
when a window wasn't found.
2024-09-03 13:28:18 -07:00
tytan652
72428ccd97 Remove CMake legacy code path
Except submodules and legacy_check macro since the former depend on it.
2024-08-28 13:53:25 -04:00
PatTheMav
b8cfacaec3 Update formatting of CMake files 2024-08-14 12:07:47 -04:00
Translation Updater
e7d6707fa7 Update translations from Crowdin 2024-07-17 09:34:12 +00:00
Translation Updater
8999d9fef9 Update translations from Crowdin 2024-06-07 09:47:58 +00:00
tytan652
e4ae149278 linux-capture: Fix module prefix with CMake 3 2024-06-06 14:23:15 -04:00
tytan652
832ac4bfa8 linux-capture: Rename Screen Capture as Display Capture 2024-05-04 16:15:38 -07:00
PatTheMav
4ecfdb722f plugins: Add Linux-specific plugins for CMake build framework 3.0 2024-04-13 23:48:38 -04:00
PatTheMav
2bc4c69ee9 plugins: Fix compile errors introduced by CMake build framework 3.0 2024-04-13 23:48:38 -04:00
Vainock
7ae66c72fd Update translations from Crowdin 2024-02-28 14:20:05 -05:00
Translation Updater
ac484a066f Update translations from Crowdin 2024-01-29 20:47:38 +00:00
Translation Updater
f674d17168 Update translations from Crowdin 2023-12-05 22:04:31 +00:00
Translation Updater
0d450a34a0 Update translations from Crowdin 2023-10-10 13:34:41 +00:00
Norihiro Kamae
d35583dcc8 linux-capture: Remove an unused static function 2023-08-26 16:52:35 -07:00
Translation Updater
ecf914dd67 Update translations from Crowdin 2023-08-13 14:09:15 +00:00
Penwywern
e9c12b7d9d linux-capture: Add hook signal and proc for Xcomposite window capture 2023-07-30 14:06:53 -07:00
Norihiro Kamae
dcb5b0785b linux-capture: Remove obsolete property swap_redblue
The implementation to swap red and blue by the property was removed by
9b6d39299e but the property was left.
2023-06-22 09:26:27 -03:00
Norihiro Kamae
6815c09aba linux-capture: Remove obsolete translation
"LockX" was added by 15fb027647 and removed by later commit 1604400e4.
2023-05-20 16:35:05 -07:00
Translation Updater
7c5560bf1b Update translations from Crowdin 2023-03-27 13:39:03 +00:00
tytan652
1007a0cf42 linux-capture: Fix format-overflow warning 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
7de0bd350f libobs,plugins: Remove one-case switches 2023-01-16 11:43:47 +01:00
Translation Updater
783bd52197 Update translations from Crowdin 2023-01-08 04:10:37 +00:00
PatTheMav
ae01a626b6 linux-capture: Replace invocations of sprintf with snprintf
Fixes deprecation warnings in Xcode 14/clang on macOS and reduces
chance of buffer overflows.
2022-11-11 19:51:27 +01:00
Kurt Kartaltepe
1249ebe53d linux-capture: Fixup window name/class checking
There were a couple mistakes here that caused the fallback checks other
than window ID to fail to ever return valid results. This restores this
functionality that was broken since the c++/c transition.

fixes #7404
2022-09-24 20:42:57 -03:00
Kurt Kartaltepe
b1c65af2b1 linux-capture: Ensure name pixmap is checked
The void cookie will never return an error unless we use the explicitly
checked version of this function.
2022-09-12 12:50:53 -03:00
Translation Updater
cc2d0791ca Update translations from Crowdin 2022-08-30 09:00:44 +00:00
Translation Updater
4aaa07f93d Update translations from Crowdin 2022-08-17 04:22:50 +00:00
Translation Updater
81734be37c Update translations from Crowdin 2022-07-31 23:40:53 +00:00
Vainock
eb06594381 Use property suffixes for units everywhere 2022-07-22 08:24:51 -04:00
tytan652
8409f72f60 plugins: Replace OBS_UNUSED with UNUSED_PARAMETER
OBS_UNUSED is not portable to MSVC.
2022-07-20 08:22:08 +02:00
Norihiro Kamae
7e3656ab33 plugins: Cleanup unused-parameters
- Remove unnecessary UNUSED_PARAMETER
- Add OBS_UNUSED attribute to unused parameters
- Also removes unused variables
2022-07-19 11:01:00 -04:00
Kurt Kartaltepe
c6cb0838fd linux-capture: Silence log spam on xcomposite capture
It is expected that capture might fail, like when a window is minimized.
In these cases we dont want the log to be spammed by X11 errors so
install a noop error handler while we try to import.
2022-07-10 11:24:40 +10:00
Kurt Kartaltepe
e9076da901 linux-capture: Retry capture if texture not created
This prevented OBS from re-aquiring capture when windows were minimized
or fullscreened.
2022-07-10 11:24:40 +10:00
Georges Basile Stavracas Neto
ddb692ab2d linux-capture: Drop GLX code paths
Default to EGL and remove the sad amount of hacks from xcomposite.
2022-05-24 14:30:14 -03:00