0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

2765 Commits

Author SHA1 Message Date
derrod
117534368b libobs: Profile graphics initialisation and shader compilation 2023-08-02 04:48:43 -07:00
jpark37
7669da1ea8 libobs: Add VIDEO_FORMAT_R10L
Support 10-bit packed format that DeckLink uses.
2023-07-29 16:41:31 -07:00
tytan652
c6ce50c9a3 deps,libobs,plugins: Remove in-tree Jansson
Jansson is provided by other means on any supported platform.
2023-07-29 16:37:14 -07:00
Ryan Foster
f7d3ba7b1b libobs: Check if adapter can safely fast clear 2023-07-29 16:34:47 -07:00
Ryan Foster
e5d5df879c libobs: Add function to check fast clear capability 2023-07-29 16:34:47 -07:00
CodeYan01
a494cf5ce4 libobs: Add obs_source_info.filter_add
If there is filter_remove, it is reasonable to expect that there is also
filter_add. filter_add also enables filters to attach signal handlers
on the parent, and disconnect them in filter_remove.
2023-07-29 16:15:21 -07:00
Ruwen Hahn
ac8ccf4027 libobs: Fix GPU scaled video encoder media not being cleared
During encoder shutdown `maybe_clear_encoder_core_video_mix` is
called to clear created mixes that are no longer needed; at that
time `obs_encoder_set_video` rejects changes to `media` since
the encoder is still active, so we bypass those checks

This is an issue e.g. when a rtmp stream disconnects (and thus
all encoders are cleared) and subsequently reconnects
2023-07-26 05:03:12 -07:00
Penwywern
23ca4cf704 libobs: Fix flip calculations in bounding box
This fixes flipping behaviour when positional alignement inside the
bounding box is other than centered, bringing it in line with the
behaviour when centered, i.e. flip the item in-place in the bounding
box.
2023-07-25 16:01:04 -07:00
derrod
d90bfc5e0b libobs: Add obs_add_safe_module() 2023-07-21 23:22:07 +02:00
cg2121
cb8b5ba9cd libobs: Change return type for getting filter index
This changes the return type for getting the filter index from a
size_t to an int. This makes it easier for developers to use,
as an invalid index just returns a -1.
2023-07-20 13:21:14 -07:00
gxalpha
5ed0b8a0b8 libobs: Assume Qt 6, always warn about Qt 5 plugins 2023-07-19 11:56:54 -04:00
Chensiyy
41e2791f27 libobs: Fix PROPVARIANT variable has not be freed
The PropVariantClear function frees all elements that can be freed in a given PROPVARIANT structure.
2023-07-15 16:38:24 -07:00
Richard Stanway
4118fa7ac1 libobs: Don't defer encoder updates if not necessary
When #5169 implemented deferred encoder updates, it did not account for
the case when the encoder hadn't started yet. This means the encoder would
start and then immediately call update with the same settings it was
started with, which in the case of some hardware encoders would trigger
a reconfiguration request to the driver.
2023-07-15 16:31:19 -07:00
gxalpha
55237ab2ef libobs: Export more libobs/util headers 2023-07-15 16:17:42 -07:00
derrod
dcc07cfe4e clang-format: Set AllowAllConstructorInitializersOnNextLine to false 2023-07-15 16:14:55 -07:00
derrod
1739272c44 clang-format: Set AllowAllArgumentsOnNextLine to false 2023-07-15 16:14:55 -07:00
Clayton Groeneveld
e121ac1587 UI, libobs: Add RAII wrappers for faders/volume meters
They can now be automatically deleted.
2023-07-15 16:06:36 -07:00
Ryan Foster
80864197fb libobs: Fix back-to-back GPU encoder sessions breaking
Reset frame_rate_divisor_counter to 0 on encoder shutdown.

After starting and stopping a GPU encoder session, obs_encoder_shutdown
would set frame_rate_divisor_counter to 1. When the next GPU encoder
session was started, in libobs/obs-video-gpu-encode.c, gpu_encode_thread
would set skip to this value (1), and increment
frame_rate_divisor_counter to 2. This causes the next check to fail, as
frame_rate_divisor is 1 by default (2 == 1 is false), so
frame_rate_divisor_counter retains its value. Since skip is non-zero,
the next check, if(skip), passes, and skip to the next loop iteration.

This will continue forever, because frame_rate_divisor_counter will
continue to increment, so it will never hold the same value as
frame_rate_divisor. This means that send_off_encoder_packet is never
called, so the muxer never receives encoded packets.

To the end-user, this manifests as their second encoder session being
impossible to stop. They then have to force quit OBS and the
obs-ffmpeg-mux process. This change prevents that from occurring and
allows multiple back-to-back GPU encoder sessions to be completed.
2023-07-14 11:56:28 -04:00
derrod
c939525f77 libobs: Remove legacy FFmpeg compatibility 2023-07-12 15:57:43 -04:00
Norihiro Kamae
bc6cfab615 libobs/util: Remove outdated comment 2023-07-12 13:54:50 -04:00
Penwywern
8789c43959 libobs: Fix flip not working with stretch to bounds 2023-07-08 16:42:15 -07:00
Sergo
e4a3f80f9f libobs: Add use of pause callbacks to CoreAudio monitoring 2023-07-06 15:24:12 +02:00
Sergo
9eea0d8921 libobs: Add pause callback support for sources 2023-07-06 15:24:12 +02:00
Ruwen Hahn
6cdfb0a8b9 libobs: Allow configuring frame rate divisor for encoders
This allows encoders/outputs to output at a frame rate that is lower
than the configured base frame rate
2023-07-03 09:35:06 -07:00
Norihiro Kamae
8169188f89 libobs: Define DARRAY macro types
To avoid passing `struct darray *` type, which cannot hold the type
information, this commit defines array types and uses that types on the
function parameters.
2023-07-01 00:39:13 -07:00
Norihiro Kamae
c8e3794a35 libobs/graphics: Remove undefined function declarations
These functions were declared but never defined. Let's just remove them.
- effect_upload_shader_params
- ep_param_writevar
- effect_upload_params
2023-07-01 00:39:13 -07:00
Norihiro Kamae
fa02582db6 libobs/graphics: Define DARRAY macro types used in effect 2023-07-01 00:39:13 -07:00
Norihiro Kamae
a4ddaf528a libobs/util: Use defined array types on function parameter lists
To avoid passing `struct darray *` type, which cannot hold the type
information of the array element, use defined array types on the
function parameter lists.
2023-07-01 00:39:13 -07:00
Norihiro Kamae
03b679d68e libobs/util: Remove unnecessary parentheses
The previous commit added parentheses inside the macros so that the
parentheses is unnecessary when using the macros.
2023-07-01 00:39:13 -07:00
Norihiro Kamae
6425d53ff0 libobs/util: Fix operator precedence in dyamic array macros
Passing DARRAY with an operator such as dereference (`*`) sometimes
caused a compile error. To avoid the error, introduced parentheses
inside the macros.
2023-07-01 00:39:13 -07:00
PatTheMav
89625715fc cmake: Fix configuration errors with Windows legacy path
By default Windows builds use the legacy CMake code paths, which ideally
work as-is with existing build directories.
2023-06-30 11:56:57 -04:00
PatTheMav
db895092ed cmake: 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.
2023-06-29 10:11:32 -04:00
derrod
0cb812251c libobs: Add scene uuid to transform state data 2023-06-28 11:04:56 -07:00
Ruwen Hahn
03fa9acc7f libobs: Add obs_encoder_enable_gpu_scaling
Allows rescaling resolution for GPU encoders and allows moving
rescaling for CPU encoders from CPU to GPU

Rescaling is implemented via core video mixes; encoders create
their own core mix with matching width/height/format/colorspace/
range when gpu scaling is enabled and no matching core video
mix exists
2023-06-26 13:32:25 +02:00
gxalpha
f37876a941 libobs: Fix obs_output_get_height2 returning width 2023-06-25 16:06:49 -07:00
Richard Stanway
896cd4adb2 libobs: Detect and log presence of Lenovo Vantage on Windows
This software seems to be pre-installed on many Lenovo systems and has a
"Network Boost" feature that restricts data usage of background apps,
causing throughput issues when streaming with OBS.
2023-06-24 16:31:21 -07:00
cg2121
243d4d42e9 libobs: Add functions to get/set the index of filters 2023-06-21 15:33:48 -07:00
PatTheMav
59904a66a3 cmake: Update Framework link definition for macOS builds 2023-06-17 12:23:33 -04:00
PatTheMav
50a4e83251 cmake: Remove Info.plist template files for macOS builds
Creation of Info.plist files through Xcode is more canonical and
future-proof, as it will automatically pick up changes/updates
introduced by Apple. Non-standard keys can still be added via a
template file, which will then be extended by Xcode with the default
keys.
2023-06-17 12:23:33 -04:00
Lain
1bbb3fa773 libobs: Update version to 29.1.3 2023-06-17 00:44:00 -07:00
PatTheMav
3ca56fee84 libobs: Silence clang warnings for empty prototypes without void
clang expects an empty prototype to explicitly use `void`.

Also silences the warning in `libobs-opengl`, `obsglad`, `caption`,
`mac-syphon` and `obs-x264-test`.
2023-06-16 14:12:58 -04:00
John Bradley
8981afe5b4 libobs: Set video thread qos class to user interactive on macOS 2023-06-15 15:25:47 +02:00
Ruwen Hahn
9b5ce9fcec
libobs: Fix null pointer access for video packets
Initialize arrays to 0, as otherwise these can get initialized with 
garbage data or potentially Visual Studio's default debug marker,
which is a problem if they're being checked against `NULL` later.
2023-06-14 19:52:05 +02:00
John Bradley
6ec0b2db11 libobs: Add support to obs-outputs for multi video encoders
This adds support in outputs to handle multiple video encoders
and their interleaving with the encoded audio.
2023-06-14 02:24:54 -07:00
PatTheMav
f8e00d6071 clang-format: Update formatting of all ObjC and ObjC++ files 2023-06-11 14:56:45 +02:00
derrod
263781c6c6 libobs: Fix crash when properties are deleted in callback
(cherry picked from commit 447710ab2c)
2023-06-11 02:18:17 +02:00
gxalpha
79822a58c3 libobs,plugins: Remove new obs_output_*2 functions
Effectively reverting parts of d314d47, this commit removes the new
functions that got added to remove the flags parameter. Instead, it just
marks the parameter as unused and documents this. Having what is
effectively an API break just to remove a parameter is a bit overkill.
The other parts of d314d47 which cleaned up the usage of the flags
parameter are untouched here.
2023-06-10 16:13:05 -07:00
Lain
1aed7ed114 libobs: Use da_clear() to clear obs_core_data::sources_to_tick
Makes it a bit more clear what's going on
2023-06-10 14:30:44 -07:00
Lain
85ca5a25be libobs/util: Add da_clear()
Adds a bit more of an explicit function for clearing dynamic arrays
2023-06-10 14:29:33 -07:00
Exeldro
a77789b266 libobs: Don't keep the sources mutex in tick_sources
Allow other threads to use sources while the graphics thread does
video_tick, update, activate and deactivate on sources
2023-06-10 14:20:13 -07:00