Commit Graph

11578 Commits (2bb0818fb407f47700344e2394b3984361a1aea8)

Author SHA1 Message Date
PatTheMav 2bb0818fb4 libobs: Use system header notation for pthread.h include
Using a relative path for the pthread.h header by w32-pthreads breaks
compilation of plugins which include threading.h from libobs (as
w32-pthreads will exist at a different location relative to the
libobs header).

As w32-pthreads (and its include directory) is added to the libobs
target by CMake, the pthread.h header will be found even when using
system header notation.

Fixes https://github.com/obsproject/obs-studio/issues/7155
2022-08-24 05:40:37 -07:00
Chris 7c36cba065 obs-ffmpeg: Change AMF bitrate to kbps
Move multiplication to when its passed to the encoder, so that bitrate
is kept in kbps. Changed for both for H264 and HEVC. Other encoders
(x264 and NVENC) already display bitrate in kbps in the log,
so it makes sense to mimic this with AMF. It's difficult to tell the
exact bitrate with bps.
2022-08-24 05:34:21 -07:00
Richard Stanway ac55328e7f UI: Simplify multiview projector removal 2022-08-24 05:33:47 -07:00
Richard Stanway 5e6cbebcb9 UI: Remove allProjectors list
Seems like this wasn't used anywhere and projectors were not being
removed on destruction, resulting in a memory leak.
2022-08-24 05:33:47 -07:00
cg2121 a9ae9ca123 UI: Fix extra browsers trash icon
The trash icon in the extra browsers dock would be rendered
incorrectly with the Yami based themes.
2022-08-24 05:15:44 -07:00
Richard Stanway c64997ed80 UI: Fix crash when toggling volume control mode
The toggleControlLayoutAction (change between horizontal and vertical
display mode) deletes and re-recreates the volume controls, meaning we
were writing to freed memory. This is a kind of hacky fix but it's the
only action we need to be concerned with for now.
2022-08-24 05:14:56 -07:00
jpark37 2c7ef7d682 libobs-opengl: Fix Mac projector color space
Use sRGB instead of native display color space for correctness.
2022-08-24 05:08:26 -07:00
derrod 44eb8ffbb6 libobs: Fix Windows 10/11 Gamemode/HAGS detection
It seems that the older key still exists on Win 11 and 10 but is always
set to 0, so use the newer to start with and fall back to the old one if
necessary.

Additionally, if the key for HAGS and GameMode do not exist assume
they're on as this is the default on Win 11. On Windows 10 game mode is
also on by default in recent versions.

Also changes "10" to "10/11" just for correctness.
2022-08-24 05:08:04 -07:00
jpark37 f88300a613 libobs: Emulate clear with draw for displays
Laptops that render OBS displays on NVIDIA, and display through Intel
have been seen flickering, and we think the driver is not properly
handling swap chain buffers that have been cleared but not drawn to. To
work around this, we use a draw to simulate a render target clear. This
is not as efficient, so hopefully NVIDIA will fix this soon.
2022-08-24 05:01:08 -07:00
cg2121 0061d95483 UI: Fix color select buttons with Yami
The color select buttons would not be rendered properly with the
Yami based themes.
2022-08-24 20:42:40 +10:00
Matt Gajownik 0e7f69ee31 CI: Bump Linux CEF build to disable GTK
Fixes #7146

Normally, Qt and CEF each run their own version of GTK, often causing
conflicts. This commit introduces a build of CEF where GTK has been
disabled using `use_gtk=false` as we do not require the Chrome runtime.
This is an experiment and may end up being the safest long-term solution.

Note: This does introduce potential quirks/incompatibilities, such as
browser sources no longer being able to display alert() dialogs, and
potentially file browser dialogs not working from CEF.
This is better than the alternative. If necessary, such dialogs can be
reimplemented using Qt at a later date, and would likely provide a more
consistent user experience.
2022-08-23 19:47:41 +10:00
cg2121 ed32dcc677 UI: Force fixed font in plain text edits
Since the Yami QSS changes the default font for widgets, we need
to force the system fixed font for plain text edits.
2022-08-22 17:26:50 -07:00
jpark37 38d8a844de mac-capture: Use cleaner render patterns
Render code seems unnecessarily custom. Use normal patterns.
2022-08-22 16:38:50 -07:00
cg2121 a92c439af9 UI: Fix scripts dialog buttons
The tool buttons would be rendered incorrectly in the Yami based
themes.
2022-08-22 16:33:31 -07:00
cg2121 f7d815b79b UI: Fix disabled sliders color
The disabled sliders would be the same color as the window background.
2022-08-22 15:42:19 -07:00
jp9000 7b3ae0b03c UI: Fix fields not growing in FFmpeg output settings
Wasn't consistent with how it is with the rest of the user interface

Fixes obsproject/obs-studio#7147
2022-08-22 14:40:59 -07:00
jp9000 b4b01e2054 UI: Use bigger default size for button dock
Due to the new virtual camera button set being ridiculously large, the
main window needs a larger default dock size for the button dock.
Annoyingly.
2022-08-22 14:07:00 -07:00
jp9000 6dc8897e79 obs-ffmpeg: Fix AMF encoder lockup with older AMD cards
This goes back to a slightly older variant of the
SubmitInput/QueryOutput handling that doesn't use AMF's timeout
property. Older devices do not like it when you change the query timeout
on the fly and will lock up. So instead, wait one millisecond when the
AMF input is full, which appears to fix the issue according to testers.

Also adds a loop timeout in case it goes in an infinite loop (which it
shouldn't anymore, but still)

Big thanks to Flaeri for testing the old code, and Yukari for patiently
testing a whole bunch of builds.
2022-08-22 11:20:51 -07:00
Jim a6c2bb1294 obs-ffmpeg: Use AMD example PTS/DTS offset
All this does is it uses the same exact code AMD uses with their own
example FFmpeg muxer code. Although instead of adding to the PTS, it
subtracts from the DTS.
2022-08-22 11:15:23 -07:00
derrod d1a1a2c060 cmake: Set RELEASE_CANDIDATE/BETA based on git describe 2022-08-22 14:55:27 +02:00
Jim 9b087d15fc ffmpeg-mux: Do not output error if non-fatal error
Fixes a case where stderr can fill up and cause a freeze on Windows
2022-08-22 03:30:10 -07:00
Jim d95ebc6294 Revert "ffmpeg-mux: Disable stdout/stderr on Windows"
This reverts commit 332dd00089.
2022-08-22 03:28:38 -07:00
Jim 332dd00089 ffmpeg-mux: Disable stdout/stderr on Windows
These server no purpose unless the ENABLE_FFMPEG_MUX_DEBUG flag is
enabled, and will ultimately just cause problems.
2022-08-22 02:50:17 -07:00
Richard Stanway ef48f5b28d
UI/installer: Update references to dependencies for 28.0.0 2022-08-21 17:26:27 +02:00
gxalpha 97f76f99e5 UI: Remove separate trash icon themeID
The removeIconSmall is now also a trash icon, so we don't need a
separate (now duplicate) themeID for it anymore.
The icon itself of course needs to stay as it's still needed.
2022-08-20 16:46:02 -07:00
gxalpha 8cf46ca68c UI: Properly register VoidFunc in Meta Object System 2022-08-20 16:45:07 -07:00
jpark37 270d299258 mac-capture: Clip gamut to sRGB
Mac likes P3, but OBS only supports sRGB for SDR.
2022-08-20 16:39:37 -07:00
cg2121 0afcb71122 UI: Reset volume/media sliders on theme change
Since volume/media sliders are using QProxyStyle, they are not
updated when themes are changed, so re-initialize them.
2022-08-20 16:29:16 -07:00
tytan652 23f910c149 Revert "flatpak: Install CMake config files"
This reverts commit 43867ce93c.
2022-08-20 20:11:51 -03:00
tytan652 c1e8797009 flatpak: Avoid cleaning all pkgconfig files
Plugins could happen to require libobs, FFmpeg and PipeWire pkgconfig
files.
2022-08-20 20:11:51 -03:00
tytan652 2407c873db CI: Update Flatpak image to KDE 6.3 2022-08-20 20:11:51 -03:00
PatTheMav 6c2860a4ec cmake: Fix missing interface include directory on Framework export
For exported targets `INCLUDES DESTINATION` behaves in a specific way
when running `install`: It sets the `INTERFACE_INCLUDE_DIRECTORY` for
the target (relative to the `INSTALL_PREFIX` when a relative path is
given).

This is not implicitly done by CMake, which resulted in the exported
libobs Framework to miss the variable and as such targets linking to
libobs were not able to find the necessary headers anymore.
2022-08-20 22:02:41 +02:00
gxalpha a7419a9809 UI: Use backspace icon to indicate "Clear" in hotkey-edit 2022-08-20 02:02:21 -07:00
shiina424 d056dce428 mac-capture: Add missing locale text 2022-08-20 01:34:03 -07:00
Service Checker 9bdb136cd4 rtmp-services: Remove defunct servers/services 2022-08-20 01:30:29 -07:00
Richard Stanway 8227dccf77 libobs: Initialize main_view video mix before video thread
Fixes a race condition where the video thread would exit because it sees
no active mixes, causing OBS to freeze on startup.

Fixes #7095
2022-08-20 01:27:47 -07:00
fuyingqi f5be6f5fdd obs-ffmpeg: Fix ffmpeg_output memory leak
The memory leak was introduced by a commit ba68eda59 to use
av_packet_alloc because av_init_packet got deprecated.

Also removes a boolean flag `new_packet` and use the pointer `packet`,
which is introduced by ba68eda59, to indicate there is a new packet.

Co-authored-by: Norihiro Kamae <norihiro@nagater.net>
2022-08-18 11:07:17 -07:00
jp9000 6abf89af21 Revert "libobs: Correctly set texture size"
This reverts commit 90a409fe58.

Reverts #7077 for now. This really shouldn't be done so close to
release. This crash technically only happens under very niche scenarios,
and the fix seems to have some other potential issues. Prematurely
merged by Jim.
2022-08-18 11:04:11 -07:00
jpark37 87a69f7623 win-dshow: Incorporate Elgato submodule
Add automatic tonemap toggle for HD60 S+ as well.
2022-08-18 10:44:59 -07:00
tytan652 5d5ecf17b4 UI: Check for virtual camera enablement before loading config 2022-08-18 06:47:42 -07:00
tududweb 90a409fe58 libobs: Correctly set texture size
Correctly set texture size according to the frame to be rendered this time.
Fixes the mismatch between frame and texture when async-delay-filter on.
2022-08-18 03:43:22 -07:00
Matt Gajownik c7da23bf96 UI: Remove spaces from translation keys
Qt translation strings use the full English string as an identifier,
rather than a standardised key. Meanwhile, .ini files aren't designed
for keys with spaces, so a translation string for "Restore Defaults"
won't match unless the ini line is
"Restore Defaults"="Defaults"
which is inconsistent, unpleasant and harder to read.
2022-08-18 03:35:51 -07:00
jp9000 3ae1c1470f Revert "UI: Don't set theme if it didn't change"
This reverts commit b4a2eacba7.
2022-08-18 03:21:49 -07:00
tududweb a772e74286 UI: Correctly draw sub-item SpacingHelper on group 2022-08-18 02:35:34 -07:00
tududweb 122b83f4c1 UI: Don't show sub-item SpacingHelper on locked group 2022-08-18 02:35:34 -07:00
tytan652 f41404528a UI: Save virtual camera outside of the modules object
Save the configuration outside of the modules object meant for plugins
in the scene collection.
2022-08-18 02:35:13 -07:00
cg2121 ccfe300f72 UI: Reintroduce faster theme switching
Based on (was reverted):
08cee21158

This simplifies the faster switching code, as setting an empty
stylesheet resets it to default.
2022-08-18 02:34:47 -07:00
cg2121 5412b000ab UI: Remove unused stylesheet code
This code is from before custom stylesheets were introduced.
2022-08-17 23:22:05 -07:00
Chip Bradford 590fa1ffe6 UI: Free virtual cam memory on shutdown 2022-08-17 23:21:28 -07:00
jpark37 57a24c540f obs-x264: Remove unused HDR code
We don't allow HDR for x264, so remove dead code.
2022-08-17 23:20:29 -07:00