Commit Graph

2488 Commits (a196fc7824a7b7e4bbf3f4f725a41a2a7787a6e6)

Author SHA1 Message Date
Tommy Vercetti 90b705fcbc libobs: Rename "Mac OS X" to "macOS" in log 2022-07-28 14:04:01 -04:00
Richard Stanway ad11ae2f5c
libobs: Remove redundant get_data calls in obs_data functions 2022-07-27 21:58:16 +02:00
gxalpha 9d68c8a848 libobs: Fix crash handler noreturn compiler warning
Maybe not the most correct solution since it never gets hit but much
less code and ifdefs compared to what we'd have else wise.
2022-07-27 12:05:16 -04:00
Norihiro Kamae 106f5f9ace libobs: Remove unused cmake configure files
These files replaces the old input files for `configure_file` in cmake.
- `libobs/cmake/libobsConfig.cmake.in`
- `libobs/pkgconfig/libobs.pc.in`
2022-07-27 10:35:31 -04:00
jp9000 8a698e863d libobs: Add func to get supported service codecs
Allows a service to return a list of codecs that are currently supported
2022-07-26 09:23:35 -07:00
jp9000 cc242ada58 libobs: Remove trailing whitespace 2022-07-26 09:23:35 -07:00
Theodore Dubois 0032d349c9 libobs: Rewrite macOS hotkeys implementation
Co-authored-by: Sebastian Beckmann <beckmann.sebastian@outlook.de>
2022-07-26 14:21:21 +02:00
Anastasiia Sidorovskaia ef9c99f5f4 libobs: Set coefficients with higher precision 2022-07-25 17:41:26 -04:00
PatTheMav ab62c9c615 libobs: Trigger bindings injected by Qt directly
Instead of lettings the hotkey thread handle bindings triggered by Qt,
call the callback directly.

By this point, Qt has resolved the modifier state (so no need for the
hotkey thread to do the same), the pressed state is set as well,
the branch takes care of matching the pressed keys.

This also fixes the issue with the hotkey changes introduced by #3914,
which only inject key events when OBS is _not_ in focus (and as such
modifier states are never updated).
2022-07-25 17:33:40 +02:00
tududweb 25d84f40d6 libobs: Fix audio monitor output error in macOS 2022-07-25 17:28:42 +02:00
jpark37 0d129988a9 libobs: Allow Chrome class executable matching
Lets OBS find Spotify.exe even if the window title changes.
2022-07-23 17:41:34 -07:00
jpark37 69ff026647 libobs, win-capture: Share window helper code
Add "ms_" prefix as makeshift namespace.
2022-07-23 17:41:34 -07:00
jpark37 9b46795d57 libobs, UI: Add OBS_ICON_TYPE_PROCESS_AUDIO_OUTPUT 2022-07-23 17:41:34 -07:00
jpark37 7864c8649a libobs/util: Add WinModule RAII wrapper 2022-07-23 17:41:34 -07:00
tytan652 17ba8359e4 deps,libobs,plugins: Fix discarded-qualifiers warnings with FFmpeg 5 2022-07-22 08:50:36 -04:00
tytan652 447f2869ab libobs: Remove OBS_UNUSED 2022-07-20 09:03:31 +02:00
tytan652 12657e4fcc libobs: Replace OBS_UNUSED with UNUSED_PARAMETER
OBS_UNUSED is not portable to MSVC.
2022-07-20 08:22:08 +02:00
tytan652 348cf1b872 libobs: Remove unused parameters 2022-07-20 08:21:20 +02:00
Norihiro Kamae af3890a4a9 libobs: Cleanup unused-parameters
- Add OBS_UNUSED to unused function parameters
- Remove unnecessary UNUSED_PARAMETER
Also update libobs-opengl/
2022-07-19 11:01:00 -04:00
Norihiro Kamae 4f49968f92 libobs: Remove set but not read variable 2022-07-19 11:01:00 -04:00
PatTheMav 4252c8a069 cmake: Fix pkgconfig generation
Existing code didn't check for possible "empty" linked libraries
(e.g. Threads::Threads when compiler has built-in pthreads support).
Also adds support for compile options defined on linked dependencies.
2022-07-19 09:28:51 -03:00
bin c19946d7e8 libobs: Fix pulseaudio crash. 2022-07-16 16:25:47 -07:00
Richard Stanway c5965c8605 libobs: Log errors for bmalloc(0)
malloc(0) is implementation defined and almost always a mistake. I
believe we should be more like malloc and treat bmalloc(0) as an error
instead of tying to handle it. For now we can log an error in case 3rd
party plugins are broken, in the future I would suggest this becomes a
crash-worthy error.
2022-07-16 15:20:55 -07:00
Richard Stanway dbdbfe79d2 libobs: Deprecate base_set_allocator and make it no-op
Hopefully nothing is actually using this in the first place. As a
library libobs has alignment requirements so we should probably not
allow an application to replace our aligned mallocs with something else.
This also allows more aggressive optimizations inside libobs as the call
can be completely inlined into a libc malloc.
2022-07-16 15:20:55 -07:00
jpark37 92d1ca41cc libobs: Fix warnings about type usage 2022-07-11 22:07:10 -07:00
PatTheMav ff7f756886 libobs: Explicitly mark variables as unused 2022-07-10 09:59:55 +10:00
PatTheMav 91c915e4e9 libobs: Disable compiler warnings about non-exhaustive switch cases 2022-07-10 09:59:55 +10:00
tt2468 b56196dcf7 libobs: Remove newlines on ends of fixed audio buffering message 2022-07-02 13:19:45 -07:00
tytan652 bf985946a4 libobs,UI,docs: Add info as text property sub-type in the property API 2022-06-26 17:31:59 +10:00
tt2468 bb55cfbc05 libobs: Improve exponential backoff functionality
- Changes the default base exponent value to 1.5 from 2.0
- Applies a random skew of +-0.05 to the exponent to lessen the
"water hammer" effect caused by predictable backoff techniques
- Fixes the logging associated with exponential backoff to log the
true reconnect delay value
2022-06-25 17:06:00 -07:00
Tommy Vercetti 3b64e74660 libobs/util: Add function to get Rosetta translation status 2022-06-19 01:37:15 +02:00
Jim 29782cd594 libobs: And fix area scaling effect with RGBA 2022-06-04 19:54:52 -07:00
Jim a33a5d2151 libobs: Fix bilinear lowres RGBA as well 2022-06-04 19:03:20 -07:00
Jim 4a2a06b22f libobs: Fix RGBA format output not working
Due to a bug in shader parsing, it thinks that because the token
"multiplier" is used here, that the "multiplier" uniform is being used.

This is a workaround for the issue because fixing the parser is probably
going to be much more annoying than just working around the issue for
now.
2022-06-04 17:47:47 -07:00
gxalpha d093128935 libobs: Deprecate obs_hotkey_enable_strict_modifiers
In bb6787968, we changed the default behaviour to be strict modifiers
and we consider this to be the correct way. There is no need to change
this from code either, since if someone really needs non-strict
modifiers, they can work around it by setting multiple hotkeys.
Having this option in code just means a bigger maintenance cost, so
we'll deprecate the function and remove it in the future.
2022-06-04 16:03:23 -07:00
jpark37 bacd4713da libobs: Clear low bits when writing P010
Don't want to rely on consumer to ignore those bits.
2022-06-04 01:00:21 -07:00
jpark37 1ac758a2ef libobs: Ensure active copy surfaces are active
Stale surfaces can cause improper downloads from GPU, and lead to video
corruption in certain cases.
2022-06-03 01:17:07 -07:00
OldBaldGeek bb6787968c libobs: Fix issue 4408 (hotkey logic)
If obs_core_hotkeys.strict_modifiers is true (new default),
hotkey is triggered only if current key modifiers exactly match
the hotkey definition. If false, legacy behavior is selected.
2022-05-28 17:13:03 -07:00
Jim 1705edf8f9
Merge pull request #6475 from GeorgesStavracas/gbsneto/drop-glx
Au revoir, GLX
2022-05-28 17:04:17 -07:00
Norihiro Kamae 8a4b765c9c libobs: Fix rendering null sprite
When rendering an async-source that does not have a frame yet, massive
error `A sprite cannot be drawn without a width/height` was logged.
2022-05-28 16:05:29 -07:00
tytan652 9a33e49087 cmake: Fix enabling PulseAudio monitoring
Also adds a warning if null monitoring is "enabled".
2022-05-28 18:36:36 -04:00
tt2468 f6a77ec0a6 libobs/util: Add %s string replacement for unix time
Adds %s which replaces the keyword with the current unix epoch time.

The %s keyword is common in languages like PHP and Python, and even
some C implementations, but it is not standard so this is a fallback.
2022-05-28 18:30:41 -04:00
jpark37 11da542a0d libobs: Add max_luminance to obs_source_frame
Used in situations where source luminance is greater than HDR nominal
peak setting to avoid clipping by applying BT.2408 maxRGB EETF.
2022-05-27 14:56:47 -07:00
Georges Basile Stavracas Neto ca2d02c2ce Drop GLX renderer
"They must often change, who would be constant in happiness or wisdom"

 - Confucius
2022-05-24 14:31:48 -03:00
Norihiro Kamae 3099b59c2c libobs: Fix hotkey with right-side modifiers
However the hotkeys can be configured with right-side modifiers in UI,
the right modifiers did not work when hitting the hot keys.
This is because `query_hotkeys` in `obs-hotkey.c` was querying states of
only left modifiers.
2022-05-21 16:32:22 -07:00
tt2468 a8c481a80e libobs: Only warn when releasing non-NULL source
Only warn when the pointer provided to obs_source_release() is
non-NULL. In some custom usages of libobs, libobs may be freed before
OBS* smart pointers (like OBSSource) are destructed, leading to a
misleading warning if the pointers have already been cleared with
nullptr.

Previous behavior is basically:
- Clear OBS* pointers with nullptr
- Unload libobs
- Those smart pointers that were cleared will still call
obs_source_release() on destruct
- Warning appears
2022-05-21 15:33:39 -07:00
Claude Heiland-Allen 06f66f3120 libobs: Clamp audio NaN to 0.0f
Add comparison check so that NaN is caught.
Comparisons with NaN always result in false.
NaNs cause problems later in audio encoder.

Note: may break with -ffast-math compiler flag.

Fixes #4885.
2022-05-21 02:24:43 +02:00
jpark37 d233065d60 libobs: Default 10-bit video to sRGB instead of PQ
Matches how VLC operates. HDR is only in effect with proper metadata.
2022-05-17 02:46:52 -07:00
jpark37 4304329d0c libobs: Ignore lower six bits for P010 sources 2022-05-17 02:46:41 -07:00
pkv e66542075d libobs: Fix missing include due to FFmpeg 5 changes
Since [1], avcodec/version.h is not included anymore in codec.h and
therefore is not included any more  in avformat.h.
As a result, LIBAVCODEC_VERSION_INT is no longer defined. This commit
fixes the include.
Since obviously we can't ifdef the avcodec include by referring to an
avcodec version, we ifdef it with the avformat version which was bumped
at the same time [2].

[1] libavcodec: Split version.h
f2da2e1458
[2] doc: Add an entry to APIchanges about changes to version.h and
 version_major.h
f3a0e2ee2b

Signed-off-by: pkv <pkv@obsproject.com>
2022-05-16 16:17:32 -04:00