3147 Commits
Author SHA1 Message Date
derrodandRyan Foster 78bc3300c0 libobs: Remove obs_volmeter_{get,set}_update_interval()
Deprecated in 27.2.
2024-08-28 19:10:27 -04:00
derrodandRyan Foster a4f5a33b14 libobs: Remove obs_proprety_text_type()
Typoed function name, deprecated in 21.1.
2024-08-28 19:10:27 -04:00
derrodandRyan Foster bda463932e docs,libobs: Remove obs_render_main_view()
Deprecated since 21.0
2024-08-28 19:10:27 -04:00
derrodandRyan Foster 07aa98ab34 libobs: Remove obs_get_default_rect_effect()
Originally removed in 0.12.1 but "temporarily" brought
back, then never removed.
2024-08-28 19:10:27 -04:00
derrodandRyan Foster 1703361dba libobs: Remove obs_{duplicate,free}_encoder_packet
Deprecated in 0.2.4(!) over 10 years(!!) ago.
2024-08-28 19:10:27 -04:00
Ryan FosterandPatTheMav f0d619521b libobs: Fix Windows x86 CMake when using reduced obs-deps package
A recent obs-deps change removed all non-essential x86 deps. This caused
the x86 subproject(s) on Windows to fail to configure due to being
unable to find x86 dependencies that do not exist.

Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
2024-08-28 18:26:47 -04:00
tytan652andRyan Foster 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
derrodandRodney ddd586ae03 libobs: Allow scene items to use legacy absolute mode
This is to keep old collections running in relative mode until they
can be migrated.
2024-08-27 23:58:51 +02:00
derrodandRodney 1565ca8eb1 libobs: Change scene items to using relative coordinates 2024-08-27 23:58:51 +02:00
derrodandRodney a50320464a libobs: Force sceneitem transform update if scene dimensions change 2024-08-27 23:58:51 +02:00
tt2468andRyan Foster 16f0bb68ae libobs: Add OBS_ENCODER_CAP_SCALING
Adds a new encoder cap which tells libobs that rather than scaling
video frames in software, the encoder is capable of scaling them via
its own (presumably more efficient) means.

An encoder may implement this cap by comparing the VOI of its assigned
`video_t` and the results of `obs_encoder_get_width/height()`. If the
width/height values differ, then the encoder is being asked by libobs
to self-scale, and the resolution in VOI will be the raw frame size,
with the `...get_width/height()` being the intended output resolution
of the encoder.

It is important to note that GPU rescaling mode will take priority
over self-scaling. If GPU rescaling is enabled, the encoder will never
be asked to self-scale.

This is useful for discrete hardware encoders, where they might have
fixed-function video scaling logic that is highly efficient and fast.
Additionally, this feature allows a hardware device which is encoding
a full ABR ladder of tracks to be smart and only copy a video frame
from GPU -> Host -> Device once for the entire ladder, rather than
once for every track.
2024-08-23 14:20:53 -04:00
tt2468andRyan Foster 92b5643081 libobs: Remove broken rescale modification logic
This logic would previously have written any changed scale resolution
set by the encoder in the `.get_video_info` callback back to the
encoder, however this functionality was "broken" by
20d8779d30. In reality, this would have
never worked with texture encoders or with GPU rescaling enabled, and
probably would have had odd side effects for CPU rescaling, too. It's
best just to remove this functionality.
2024-08-23 14:20:53 -04:00
derrodandRyan Foster f07004c3b7 libobs: Remove compatibility with FFmpeg < 6.1 2024-08-23 13:44:04 -04:00
PatTheMavandRyan Foster d81fcd70e0 cmake: Update cross-platform build project management for Windows
Enables creation of x64 and x86 child projects when building on ARM64
and decouples functionality from legacy_check function
2024-08-20 16:00:21 -04:00
derrodandLain c422a336fc libobs: Use weak reference for paired encoders 2024-08-18 22:35:34 -07:00
derrodandLain 2c57f4564c libobs: Switch to full reference counting for encoders
Removes the "destroy_on_stop" hack that predates refcounting.
Ensures outputs hold strong references to all their encoders.
2024-08-18 22:35:34 -07:00
derrodandLain d7adbf1e24 libobs: Add NULL check to encoder deprecation warning 2024-08-18 22:30:03 -07:00
qhy040404andLain 32b3517ef1 libobs: Also determine WinUI 3 Window 2024-08-17 17:16:06 -07:00
derrodandRodney dac13eb144 libobs: Add warning if created encoder is deprecated 2024-08-18 01:20:38 +02:00
PatTheMavandRyan Foster b8cfacaec3 Update formatting of CMake files 2024-08-14 12:07:47 -04:00
RodneyandLain 198581a475 libobs: Add source profiler 2024-08-10 23:51:39 -07:00
jcmandMatt Gajownik 66ff8cb6d3 libobs: Always explicitly check modifiers in macOS hotkey event handler 2024-08-11 09:44:28 +10:00
Norihiro KamaeandRyan Foster 9a9975890e libobs/callback: Remove unused static-inline function 2024-08-07 17:27:49 -04:00
Norihiro KamaeandRyan Foster 4837a3417f libobs/util: Remove unused static-inline function
The commit 862f16285f commented the function out and the function became
unused.
2024-08-07 17:27:49 -04:00
Norihiro KamaeandRyan Foster d76f4b3aad libobs: Remove unused static-inline functions 2024-08-07 17:27:49 -04:00
Norihiro KamaeandRyan Foster 71736ffb7d libobs/graphics: Add inline qualifier to functions in header files 2024-08-07 17:27:49 -04:00
derrodandLain 95a753b9d8 libobs: Fix buffer overrun in os_wcs_to_utf8() 2024-08-06 08:34:24 -07:00
Florian ZwochandLain e36352dadd libobs/util: Fix potential memory error in text parser
Fixes memory access when parsing '#' comment tokens when the file
immediately was EOF after this token.
2024-08-06 07:20:32 -07:00
Ryan Foster 5854f3b9e5 libobs: Update version to 30.2.2
I forgot to update this before tagging 30.2.1, so the updater won't stop
telling people there's an update available, even after updating.

Update this for real now to 30.2.2.
2024-07-23 11:56:59 -04:00
Ryan Foster 4f7be9b84b libobs: Update version to 30.2.1
I forgot to update this before tagging 30.2.1, so the updater won't stop
telling people there's an update available, even after updating.
2024-07-23 11:56:19 -04:00
Ryan Foster 02c1742b30 libobs/graphics: Prevent heap overflow in libnsgif
See upstream commit:
https://source.netsurf-browser.org/libnsgif.git/commit/?id=a268d2c15252ac58c19f1b19771822c66bcf73b2
2024-07-18 14:34:31 -04:00
ExeldroandRyan Foster 1cb1864cc0 libobs: Fix crash when mix is NULL 2024-07-11 17:24:55 -04:00
Kurt Kartaltepeandtt2468 8c71b0b586 libobs: Fix plane heights for odd values 2024-07-03 02:11:48 -07:00
tt2468andRyan Foster 8892edde05 libobs: Merge obs_encoder_stop() and ..._stop_internal()
There is no longer any need for them to be separate functions. This is
just code cleanup.
2024-06-26 16:42:05 -04:00
tt2468andRyan Foster 06291c7201 libobs: Fix race when to-be-destroyed encoder group finishes stopping
Fixes a crash when the following steps occur:
- Encoder group created and then started with encoders, only the group
owning encoder refs
- Encoder group destroy called: group has `destroy_on_stop` set
without actual destroy
- Outputs holding encoders from stopping are stopped
- `remove_connection()` function destroys encoder group, releasing
encoders and causing the currently processed encoder to be destroyed
early
- parent scopes try to access destroyed encoder pointer and crash

This change moves some logic around to improve the release/destruct
order of `obs_encoder_stop()` to fix the race above.

Note: Cases of encoder errors will not destruct the group if it has
`destroy_on_stop` set, as the encoder is also not destroyed if it also
is set to destroy on stop. This part of the code should be revisited
at a later date and fixed up to prevent memory leaks.
2024-06-26 16:42:05 -04:00
tt2468andRyan Foster fb5bbc8575 libobs: Set encoder initialized call closer to shutdown
This is mainly code cleanup.
2024-06-26 16:42:05 -04:00
gxalphaandRyan Foster 92352f18b8 cmake: Add obs-config.h to libobs headers
Adds the header to make it findable in IDEs
2024-06-19 13:08:30 -04:00
tt2468andLain e215502b62 libobs, UI: Normalize encoder group API
Modifies the encoder group API added previously to better follow the
existing libobs API naming paradigms. This also produces much more
readable code, and allows a few small benefits like only needing to
hold a reference to the encoder group, instead of every encoder.
2024-06-17 08:20:01 -07:00
tt2468andLain 751dbdad10 libobs: Update video encoder group struct member names
Updates the struct member names of the video encoder group to be more
like what is commonly seen in OBS elsewhere.
2024-06-17 08:20:01 -07:00
Ryan Foster 5ef97920c3 libobs: Update version to 30.2.0 2024-06-07 17:55:37 -04:00
jcmandRodney bd36daa395 UI: Address logging buffer size discrepancies 2024-06-07 17:38:06 +02:00
derrodandRyan Foster efd0e6d0bd libobs: Add buffered file serializer to legacy cmake 2024-06-05 19:25:14 -04:00
Warchamp7 52ae5fc4bd UI: Update volume meter appearance 2024-06-03 17:20:21 -04:00
derrodandLain 94d158c425 libobs: Add functions to serialize JSON with default values 2024-05-25 17:29:28 -07:00
derrodandLain 79632f96dd libobs: Fix buffer overrun in video_frame_init 2024-05-25 17:12:34 -07:00
gxalphaandLain a1e0626c14 libobs: Add global source filter add/remove signals
Adds global signals for when a filter is added to or removed from a
source. These will be helpful for listening for changes to a sources
filters without having to attach and detach a signal handler, which
would be annoying in the context of for example context menus which
change sources rapidly.
2024-05-25 17:08:42 -07:00
derrodandLain 72924ac1f3 libobs: Deduplicate audio for nested scenes/groups if not transitioning 2024-05-18 16:44:45 -07:00
derrodandLain 8a38e3375b libobs: Mix audio of each source in a scene only once 2024-05-18 16:44:45 -07:00
derrodandLain adf744e6f0 libobs: Ensure audio offsets are positive 2024-05-18 16:29:01 -07:00
89c7a9608b libobs/util: Add buffered file serializer
Adapted from 898256d416

Co-authored-by: Richard Stanway <r1ch@r1ch.net>
2024-05-18 16:15:41 -07:00