2921 Commits
Author SHA1 Message Date
Ryan Foster 144599fbff libobs: Update version to 30.2.3 2024-08-15 17:53:35 -04:00
derrodandRyan Foster ba91aa87c6 libobs: Ensure encoder is not destroyed prematurely 2024-08-15 13:33:48 -04: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
derrodandLain dc4cba7427 libobs/util: Add seeking support to array serializer 2024-05-18 16:10:42 -07:00
derrodandRyan Foster 279e9424c0 libobs: Fix obs_parse_avc_header missing high profile parameters 2024-05-10 18:14:27 -04:00
pkvandRyan Foster 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
tt2468andLain 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 KamaeandLain 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 BoWeRsandLain 3ab71a9f90 libobs: Use bmalloc/bfree for caption data 2024-04-26 18:17:34 -07:00
John BowersandLain 5c8be1de22 libobs: Add caption support for AV1
Extract the itut_t35 caption data buffer from existing caption data
and repackage in a metadata OBU instead of an AVC/HEVC SEI.
2024-04-26 18:17:34 -07:00
JoHn BoWeRsandLain 33eb95c274 libobs: Add caption support for HEVC
Add embedded caption support for HEVC by slightly modifying the H.264
SEI to be an HEVC SEI (2 byte SEI NAL header).
2024-04-26 18:17:34 -07:00
John BowersandLain f9bc9a8b12 libobs: Avoid adding captions on non H.264 streams
The existing caption insertion implementation is to add H.264 specific
SEI NALs, because of this we will skip caption insertion unless the
video stream is H.264. This prevents corruption of AV1/HEVC/etc.
2024-04-26 18:17:34 -07:00
John BowersandLain 849c1180ac libobs: Insert captions on all video tracks
We will now keep a per track list of caption data. When caption
insertion is triggered we will add that to the list for each actively
encoding video track. When doing interleaved send, we pull the data
from the caption data for the corresponding video. This ensures that
captions get copied to all video tracks.
2024-04-26 18:17:34 -07:00
tt2468andLain 2fc13540f0 libobs: Rewrite video-frame
Rewrites the `struct video_frame` implementation, resolving a few
hidden bugs, and improving memory alignment reliability. Should also
make it much easier to implement and maintain texture formats in this
part of the codebase.
2024-04-26 08:25:26 -07:00
derrodandLain 9bc3082402 libobs: Add os_process_pipe_create2
This new API uses the os_process_args_t object rather than a string for
more safe and sane command line argument handling.
2024-04-20 18:30:46 -07:00
derrodandLain e885d25f5b libobs: Add os_process_args_t and associated functions 2024-04-20 18:30:46 -07:00
ExeldroandLain 65295eaf93 libobs/util: Prevent leaking pipe file descriptors to subprocesses 2024-04-20 16:57:01 -07:00
Ruwen HahnandLain 2edc555af7 libobs: Fix grouped encoders never starting again after disconnect
(based on <https://github.com/amazon-contributing/upstreaming-to-obs-studio/commit/340c205ce28adad2de103fa99276b9182ce28c38>)
2024-04-20 16:54:26 -07:00
Ruwen HahnandLain d966742a63 libobs: Fix highest_video_ts tracking
Calling `set_higher_ts` before offsets are known pollutes
`highest_video_ts` with timestamps that are out of range of actual
timestamps. They're generally somewhere high above 0 until an
offset for all streams is found, where they are then reset to 0 or
slightly below 0 in the presence of b-frames.

`highest_video_ts` also needs to start below 0 for the same reason.
Even with timestamps being reset to close to 0, b-frames will
cause initial DTS to drop below 0, thus we need a value that should
"always" be below any "real" timestamps observed.

`highest_video_ts` tracking now only starts once all input streams
are ready, and is computed based on all buffered packets at that
point.
2024-04-20 16:41:55 -07:00
Norihiro KamaeandLain b4a061dcd8 libobs: Remove unused variable in obs_source 2024-04-20 16:07:37 -07:00
Kurt KartaltepeandRyan Foster 10bfa99365 libobs: Export NV12/P010 functions
NV12 and P010 device functions were not exported on all platforms.
Windows was exporting from C files instead. After CMake 3.0 we started
hiding symbols and resolution failed.
2024-04-19 15:23:56 -04:00
PatTheMavandRyan Foster cb1a4c1c61 libobs: Fix relocatable Linux builds using legacy portable build flag 2024-04-16 12:46:51 -04:00
PatTheMavandRyan Foster 0af0de26eb libobs: Add changes for CMake build framework 3.0
New code path only taken if OBS_CMAKE_VERSION is set to 3.0.0 or
greater, old functionality remains unchanged.
2024-04-13 23:48:38 -04:00
Ruwen HahnandLain 5e1909d54f libobs: Track keyframe alignment for keyframe aligned encoder groups 2024-04-12 14:52:32 -07:00
Ruwen HahnandLain c288d42cfd libobs: Add obs_encoder_group_keyframe_aligned_encoders
Ensures grouped encoders start on the same input frame
2024-04-12 14:52:32 -07:00
tytan652andMatthew Gajownik e032c2d0c9 deps,libobs: Replace uthash with prefix/system install 2024-04-07 10:01:25 +10:00
Ryan Foster 01610d8c06 libobs: Update version to 30.1.2 2024-04-05 15:32:10 -04:00
Ryan Foster 69e7eb2c7d libobs: Update version to 30.1.1 2024-03-21 17:58:44 -04:00