0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-19 20:32:15 +02:00
Commit Graph

2940 Commits

Author SHA1 Message Date
derrod
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
derrod
1565ca8eb1 libobs: Change scene items to using relative coordinates 2024-08-27 23:58:51 +02:00
derrod
a50320464a libobs: Force sceneitem transform update if scene dimensions change 2024-08-27 23:58:51 +02:00
tt2468
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
tt2468
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
derrod
f07004c3b7 libobs: Remove compatibility with FFmpeg < 6.1 2024-08-23 13:44:04 -04:00
PatTheMav
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
derrod
c422a336fc libobs: Use weak reference for paired encoders 2024-08-18 22:35:34 -07:00
derrod
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
derrod
d7adbf1e24 libobs: Add NULL check to encoder deprecation warning 2024-08-18 22:30:03 -07:00
qhy040404
32b3517ef1 libobs: Also determine WinUI 3 Window 2024-08-17 17:16:06 -07:00
derrod
dac13eb144 libobs: Add warning if created encoder is deprecated 2024-08-18 01:20:38 +02:00
PatTheMav
b8cfacaec3 Update formatting of CMake files 2024-08-14 12:07:47 -04:00
Rodney
198581a475 libobs: Add source profiler 2024-08-10 23:51:39 -07:00
jcm
66ff8cb6d3 libobs: Always explicitly check modifiers in macOS hotkey event handler 2024-08-11 09:44:28 +10:00
Norihiro Kamae
9a9975890e libobs/callback: Remove unused static-inline function 2024-08-07 17:27:49 -04:00
Norihiro Kamae
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 Kamae
d76f4b3aad libobs: Remove unused static-inline functions 2024-08-07 17:27:49 -04:00
Norihiro Kamae
71736ffb7d libobs/graphics: Add inline qualifier to functions in header files 2024-08-07 17:27:49 -04:00
derrod
95a753b9d8 libobs: Fix buffer overrun in os_wcs_to_utf8() 2024-08-06 08:34:24 -07:00
Florian Zwoch
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
Exeldro
1cb1864cc0 libobs: Fix crash when mix is NULL 2024-07-11 17:24:55 -04:00
Kurt Kartaltepe
8c71b0b586 libobs: Fix plane heights for odd values 2024-07-03 02:11:48 -07:00
tt2468
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
tt2468
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
tt2468
fb5bbc8575 libobs: Set encoder initialized call closer to shutdown
This is mainly code cleanup.
2024-06-26 16:42:05 -04:00
gxalpha
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
tt2468
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
tt2468
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
jcm
bd36daa395 UI: Address logging buffer size discrepancies 2024-06-07 17:38:06 +02:00
derrod
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
derrod
94d158c425 libobs: Add functions to serialize JSON with default values 2024-05-25 17:29:28 -07:00
derrod
79632f96dd libobs: Fix buffer overrun in video_frame_init 2024-05-25 17:12:34 -07:00
gxalpha
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
derrod
72924ac1f3 libobs: Deduplicate audio for nested scenes/groups if not transitioning 2024-05-18 16:44:45 -07:00
derrod
8a38e3375b libobs: Mix audio of each source in a scene only once 2024-05-18 16:44:45 -07:00
derrod
adf744e6f0 libobs: Ensure audio offsets are positive 2024-05-18 16:29:01 -07:00
derrod
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
derrod
dc4cba7427 libobs/util: Add seeking support to array serializer 2024-05-18 16:10:42 -07:00
derrod
279e9424c0 libobs: Fix obs_parse_avc_header missing high profile parameters 2024-05-10 18:14:27 -04:00
pkv
5b2e2a9c68 libobs/media-io: Fix media-remux channel layout for 5 channels
FFmpeg has 5.0 as default layout for 5 channels.
But obs-studio uses 4.1. This is a fix when remuxing.

Signed-off-by: pkv <pkv@obsproject.com>
2024-05-09 10:27:20 -04:00
tt2468
fa482b6b49 libobs: Fix I40A plane height calculation for fourth plane
The commit 2fc13540 introduced a typo bug causing the defined height of
the fourth plane in I40A to be 0, instead of the original frame height.

This changes a 0 to a 3, in order to populate that value correctly.
2024-05-03 21:05:13 -07:00
tt2468
d584aed501 libobs: Add obs_encoder_parent_video() method
Allows parent video object of an encoder with an FPS divisor to be
fetched.
2024-05-03 10:33:46 -07:00
Norihiro Kamae
d81dd24f38 libobs/media-io: Fix copying different line-size video frame
The commit 2fc13540f implemented to copy a video frame into a different
line-size video frame.
However, when the line-size was different, the frame was not correctly
copied.
2024-04-28 09:58:40 -07:00
JoHn BoWeRs
3ab71a9f90 libobs: Use bmalloc/bfree for caption data 2024-04-26 18:17:34 -07:00