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

13608 Commits

Author SHA1 Message Date
xlinshan
542cb876dc obs-vst: Fix incorrect VST window size on HiDPI display
On Windows, the VST plugins' window sizes are rendered larger than the
actual content on displays that have UI scale factor. The sizes are
larger by the scale factor, for example, 100x100 content will have a
200x200 window on a 200% scaled screen, and 150x150 on a 150% scaled
screen. This change adjust the window size to fit the content size.
2023-12-09 11:30:39 +11:00
Norihiro Kamae
cedf0ace53 CI: Add further packages for build-requirements on Linux
Some more packages are required to build deb package by the script
`.github/scripts/package-linux`.
2023-12-08 18:47:21 +01:00
sora-blue
8fc0489e4a
libobs: Fix scene_enum_sources skipping some active sources
If an item's show/hide transition was active the underlying source
would not previously not be enumerated, resulting in reference leaks by
the UI or other components waiting for the source to be deactivated to
release it.
2023-12-08 14:10:12 +01:00
PatTheMav
e27b013d47 aja: Disable deprecated declarations warnings on macOS and Linux
Deprecation warnings have been investigated and have been deemed
non-malicious for the time being.
2023-12-06 17:27:12 +01:00
PatTheMav
40124892cf CI: Add github-actions renderer options to xcbeautify 2023-12-06 17:27:12 +01:00
Translation Updater
f674d17168 Update translations from Crowdin 2023-12-05 22:04:31 +00:00
derrod
ca865f80cc libobs: Pair video encoder with all audio encoders 2023-12-05 15:36:37 -06:00
derrod
b680700bba libobs: Remove unused wait_for_video flag 2023-12-05 15:36:37 -06:00
Ryan Foster
689daf57dc obs-websocket: Update version to 5.3.4
Fix a crash on shutdown.
2023-12-05 14:20:29 -05:00
Ryan Foster
eca9cd2bc4 obs-browser: Update version to 2.23.1
36508a9 - Don't allow browser docks to arbitrarily close OBS
f877e55 - Fix handling OBS_FRONTEND_EVENT_TRANSITION_CHANGED
2d374a3 - Fix handling frontend JS events
2023-12-05 14:18:42 -05:00
Penwywern
3cc7dc0e7c UI: Fall back in case of invalid scene name on load 2023-12-04 05:06:42 -06:00
prgmitchell
0f498133a4 win-wasapi: Ignore timestamp errors
Only log packets with timestamp errors rather than resetting the device.
2023-12-04 02:25:43 -06:00
derrod
5177a593af libobs: Remove module UI functions 2023-12-02 18:09:20 -06:00
derrod
3f7133b2c7 docs: Add obs_view_enum_video_info and deprecate obs_view_get_video_info 2023-12-02 18:05:55 -06:00
derrod
fc891295b6 libobs: Deprecate obs_view_get_video_info 2023-12-02 18:05:55 -06:00
derrod
5ea9fcc951 libobs: Add obs_view_enum_video_info 2023-12-02 18:05:55 -06:00
derrod
7c36257cc0 libobs: Fix obs_view_remove only resetting the first matching mix 2023-12-02 18:03:11 -06:00
CodeYan01
f5fe9999b4 docs: Add info on obs_frontend_source_list 2023-12-02 18:01:55 -06:00
PatTheMav
63a131ce22 mac-videotoolbox: Fix handling of unsuccessful encoder creation
When an encoder was not created in create_encoder, the appropriate
OSStatus value is returned but the calling code expects a boolean
return value.

The negative OSStatus code sent on error is thus interpreted as a
truthy value and the error is not detected. Changing the call signature
to correctly return an OSStatus (and change the caller to detect
error situations) fixes this.
2023-12-02 17:49:24 -06:00
derrod
859321b767 obs-ffmpeg: Add missing header to CMakeLists 2023-12-02 17:48:12 -06:00
derrod
49e796c6fc libobs: Fix GPU scaling always using the main mix 2023-12-02 17:47:33 -06:00
Stephen Seo
758b47d4ed obs-ffmpeg: Use new side-data FFmpeg 6.1 API
Fixes for using FFmpeg 6.1 due to deprecations. Uses `#if` macros to
allow builds for using older versions of FFmpeg.

This commit replaces usage of `av_stream_add_side_data(...)` with
`av_packet_side_data_add(...)`, as the former was deprecated in favor of
the latter.

The FFmpeg commit that deprecated `av_stream_add_side_data(...)` is [1].

The FFmpeg commit that introduced `av_packet_side_data_add(...)` is [2].

Note that the deprecation commit is after the new API function. The
commit in between [3] appears to be changes that migrates to the usage
of the new API function.

[1]: avformat/avformat: use the side data from AVStream.codecpar
5432d2aaca

[2]: avcodec/packet: add generic side data helpers
74279227dd

[3]: avcodec/codec_par: add side data to AVCodecParameters
21d7cc6fa9
2023-12-02 17:43:18 -06:00
Stephen Seo
cd784644f5 libobs: Fence off unnecessary code due to FFmpeg v6.1 changes
Fixes for using FFmpeg 6.1 due to deprecations. Uses `#if` macros to
allow builds for using older versions of FFmpeg.

This commit prevents obs from using the "fenced" code if using FFmpeg
6.1, since in FFmpeg commit [1] the "side_data" is added to
`AVCodecParameters`, and therefore the existing/following
`avcodec_parameters_copy(...)` will account for the metadata.

[1]: avcodec/codec_par: add side data to AVCodecParameters
21d7cc6fa9
2023-12-02 17:43:18 -06:00
Stephen Seo
6e080a6806 deps/media-playback: In check for key-frame, use new FFmpeg 6.1 API
Fixes for using FFmpeg 6.1 due to deprecations. Uses `#if` macros to
allow builds for using older versions of FFmpeg.

AVFrame.key_frame was replaced with a flag in AVFrame.flags. The commit
adding the flag is [1] in FFmpeg's repository, and the deprecation is in
commit [2].

In summary of the "key_frame" change, AVFrame.key_frame is deprecated,
and AVFrame.flags indicates with a bit flag if it is a key frame (with
the enum/defined AV_FRAME_FLAG_KEY).

[1]: avutil/frame: add a keyframe flag to AVFrame
cc11191fda

[2]: avutil/frame: deprecate key_frame
3e06f6f040
2023-12-02 17:43:18 -06:00
Stephen Seo
4b5be75c7e deps/media-playback: Use new (nb_)coded_side_data FFmpeg 6.1 API
Fixes for using FFmpeg 6.1 due to deprecations. Uses `#if` macros to
allow builds for using older versions of FFmpeg.

The change in deps/media-playback/media-playback/decode.c is due to
FFmpeg moving "side_data" into AVCodecParameters which is mentioned in
commit [1] in FFmpeg's repository.

In summary of the "side_data" change, AVStream.side_data is deprecated
and replaced with AVStream.codecpar->coded_side_data, and
AVStream.nb_side_data is replaced with
AVStream.codecpar->nb_coded_side_data.

[1]: avcodec/codec_par: add side data to AVCodecParameters
21d7cc6fa9
2023-12-02 17:43:18 -06:00
derrod
f5b7c98d2d libobs: Reuse matching mix's render texture if possible
Avoids re-rendering a view if a previous mix with identical settings
has already rendered it
2023-12-02 17:36:48 -06:00
Nikola Jovic
21a906d7d9 UI: Fix checkbox misalignment on macOS in properties view 2023-12-02 21:18:36 +01:00
tt2468
05d52ee3a7 libobs: Fix PTS incrementation when FPS divisor is enabled
When using a PTS divisor, OBS would still increment the PTS by only the
original `fps_den` value, not considering that PTS values should be
multiplied by the divisor.

For example, `60/1` increases like `0,1,2,3`. `60000/1001` increases
like `0,1001,2002,3003`.

Without this fix, `60/1` main OBS framerate with a divisor of `2`
produces `0,1,2,3`, while the correct pattern would be `0,2,4,6`
2023-11-29 16:23:24 +01:00
gxalpha
e9ecb6c565 UI: Make replay buffer settings always visible in Simple Mode
Instead of a checkbox in the recording group that reveals the replay
buffer group when pressed, the replay buffer group now has its own
toggle that enables or disables the replay buffer.
2023-11-27 15:29:57 -06:00
gxalpha
7d55229bef UI: Add to lossless warning that replay buffer is unavailable 2023-11-27 15:29:57 -06:00
Lain
e358244521 libobs: Fix possible minor memory leak
If this array reserves memory, but doesn't end up pushing any sources
back to the array, then it'd result in a memory leak.
2023-11-26 20:06:51 -06:00
Ryan Foster
87c88ef983 obs-ffmpeg: Initialize stopping member variable to false
If an output has already stopped, but its StopRecording function was
called again, then ffmpeg_mux_stop would be called and set stopping to
true. On the next output start, OBS would output 1 frame, see that
stopping is true, and then stop the output.

This was most easily observed using an Output Timer to record prior to
93f5b45be8.

Initialize stopping to false with the other state flags to ensure that
the output has a clean starting state.
2023-11-25 21:07:56 -06:00
Exeldro
1265950eaf libobs: Don't keep filter mutex in obs_save_source
While filters are saved using obs_save_source other mutex are used.
To prevent a deadlock, don't keep the filter mutex iterating the filters.
This fixes #9893
2023-11-25 20:49:50 -06:00
Susko3
f173650103 docs: Fix missing accessor in example
Tested this in code, and it makes sense from the way
`scenes.sources.array[i]` is accessed.
2023-11-25 17:29:21 -06:00
derrod
2385a3f0f8 libobs/util: Remove unused struct member from text-lookup 2023-11-25 17:09:47 -06:00
Norihiro Kamae
16fed06927 libobs/media-io: Fix link error including a header file from C++ 2023-11-25 17:04:47 -06:00
Norihiro Kamae
2c4d54dd1b libobs/util: Fix link error including header files from C++ 2023-11-25 17:04:47 -06:00
Matt
93f5b45be8 frontend-tools: Fix multiple signal-slot connections on Output Timer
When running an Output Timer multiple times, multiple signal-slot
connections would be made with the corresponding output stop event
functions. This would cause later Output Timers to terminate
unexpectedly early, due to the stop functions having been called
repeatedly on previous Output Timer runs while outputs were stopping.

There may still be an underlying bug with calling stop on outputs
repeatedly, but this change at least ensures that Output Timers only
call their stop functions once.
2023-11-20 17:02:14 -05:00
derrod
cfd8d4c993 updater: Clear shader cache after updating 2023-11-20 04:32:56 -06:00
Richard Stanway
1641812580 libobs-d3d11: Add checksum to shader cache
A few reports came in of cache files with the correct size but full of
null bytes, presumably from a system crash and an SSD lying about buffer
flushes. This commit adds a checksum at the end of the compiled bytecode
so we don't try to use invalid data.

Co-Authored-By: derrod <dennis@obsproject.com>
2023-11-20 04:32:56 -06:00
PatTheMav
9f66c23825 cmake: Align Product Name and Bundle Name on macOS 2023-11-19 15:04:28 +01:00
tt2468
76f332a379 libobs: Consolidate scene item remove code
Removes the internal helper `remove_without_release()` and branches
`obs_sceneitem_remove()` into public and internal versions.

The `obs_sceneitem_set_transition()` calls were missing from the
`remove_without_release()` function, so this resolves that issue
implicitly. Code cleanup mentioned above is done to hopefully avoid
these mistakes again.
2023-11-18 17:30:11 -06:00
jpark37
972e24df79 libobs-d3d11: Use OS D3DCompiler_47.dll
OBS needs Windows 10 minimum these days, so the DLL will be there.
2023-11-18 17:17:25 -06:00
PatTheMav
4a765d3bf0 libobs: Use macOS specific APIs to report free disk space 2023-11-18 17:16:16 -06:00
derrod
ba25bc65c9 UI: Disable safe mode when --multi is used 2023-11-17 15:31:36 -05:00
derrod
845a4a6f64 libobs: Remove superfluous NULL checks 2023-11-17 11:04:33 -05:00
derrod
40e4f789c8 cmake: Enable /GL and /LTCG for non-Debug configurations 2023-11-17 11:04:33 -05:00
PatTheMav
7ae1c35fcb obs-filters: Remove LTCG linker flag for SpeexDSP builds on Windows
Flag was added in CMake 2.0 update and is incompatible with incremental
linking enabled by default for Debug configuration (MSVC default).

The original error that necessitates adding LTCG is not present with
current obs-deps anymore, so remove it instead and disable the
hard-coded default library directive in Debug configuration.
2023-11-16 23:24:41 +01:00
Norihiro Kamae
9391ab305e libobs: Fix memory leak when migrating from legacy scene item data
Before the commit 763dddbbaf, hotkeys to show and hide scene items are
distinguished by source name instead of ID. When migrating from the
legacy data structure, the pointer to the data was not released.
2023-11-16 16:27:23 -05:00
tt2468
3e6797ca5b libobs: Fix crash in obs_sceneitem_remove() when already removed
An already-removed item has a NULL `item->parent`, meaning that calling
`full_lock(scene)` results in undefined behavior. This makes the method
return earlier if the specified item is removed instead of attempting
to lock the scene.

No thread safety is changed, because it wasn't thread-safe to begin
with.
2023-11-13 22:37:42 -08:00