10496 Commits
Author SHA1 Message Date
jpark37andjp9000 5bd791dea6 UI: Remove conflicting setlocale call
Qt already sets LC_ALL to "" for non-Windows. We set LC_NUMERIC to "C"
afterward for sanity, and we don't want that setting to get smashed.
27.2.2
2022-03-01 12:54:25 -08:00
jpark37andjp9000 b5f85bc788 UI: Restore LC_NUMERIC to C locale on Mac/Linux
Recommended by QCoreApplication doc for Unix.

Fixes CUBE LUT load, and FFmpeg output args for foreign locales.
2022-03-01 12:54:25 -08:00
jp9000 34b55180ab libobs: Update version to 27.2.2 2022-03-01 11:40:46 -08:00
jp9000andMatt Gajownik c1ff655dfe virtualcam-module: Remove unnecessarily inlines 2022-03-01 23:29:04 +11:00
jp9000andMatt Gajownik 91759c2a2e virtualcam-module: Stop thread on Stop call
This causes the thread to only start when the IMediaFilter::Run/Pause
calls have been made, and stop whenever either the IMediaFilter::Stop
call has been made, or on destruction, whichever comes first.

This potentially will work around a suspected race condition that
appears to be in the WebRTC library where the filter's library will be
released while the filter is in the process of being destroyed, which
can take longer than usual if the join takes too long. Basically, fixes
a reported crash (that doesn't appear to technically be our fault) when
the filter is used with browsers when the virtualcam is deactivating in
web browsers.
2022-03-01 23:28:59 +11:00
jp9000andMatt Gajownik d23cb52796 win-dshow: Ensure thread is joinable before joining
This may have been the issue behind the reported firefox crashes, but
strangely, the thread should always be joinable here because it's
explicitly always created in the constructor and joined in the
destructor.
2022-03-01 23:28:37 +11:00
jp9000 1acc6c69da obs-scripting: Make callback "removed" variable atomic
Makes the callback variable "removed" atomic, and on script unload,
first sets all callbacks to removed before actually unloading the script
out of a safety precaution. (See note at the bottom for further details)

This minimizes the possibility of a race condition where the script
callback could be called while those callbacks were being removed.

Big note for this change, this change should eventually be replaced with
a reference counting ownership method where script callbacks can hold a
reference and share ownership of the script if it's still alive while
the script callback is being called. That way the script callbacks can
safely execute. May require a fair amount of reworking of the script
object.
2022-03-01 04:06:33 -08:00
jpark37andMatt Gajownik fea9281a1f libobs/util: Use integer math for Windows timing
Cleaner and faster than double math.
2022-03-01 17:03:31 +11:00
jpark37andMatt Gajownik 2e1a6c9c64 libobs: Clamp video timing for safety
os_gettime_ns and os_sleepto_ns may not match up exactly.
2022-03-01 17:03:27 +11:00
jp9000andMatt Gajownik 2d7cda18e9 libobs/util: Fix rounding error with os_sleepto_ns()
os_sleepto_ns() can occasionally return false on times that the
processor may not have reached yet. The reason is because the
count_target, which converts time_target into a QPC counter, is subject
to a rounding error.

Using numbers I generated from an actual clock cycle on my own CPU, I
can show an example of this occurring: if the clock frequency value is
10000000.0, and you call os_sleepto_ns(42164590320600), it will convert
that number first to a double floating point of its QPC value:
421645903205.99994. Then, because it converts that to a LONGLONG
integer, it of course strips off the decimal point. If you convert
421645903205 *back* to a time value, the new value will be
42164590320500, which is lower than the original value by approximately
100 nanoseconds. While this may seem insignificant, it was apparently
enough to cause the os_sleepto_ns() call in video_sleep() to sometimes
return false despite the current time being lower than the target time,
which would cause it to incorrectly calculate how many frames were
duplicated by subtracting the frame time from the current system time,
divide that by the current frame interval, set the vframe_info.count
value to 0, and thus cause an infinite loop in the encode_gpu()
function because queue_frame now starts returning negative numbers in
perpetuity.

This change fixes some rare reports of users having their video lock up
and disconnect, forcing the user to have to forcibly shut down the
program.

Thanks to Twitch user SNLabat for having the patience to kindly provide
us with a dump file from the freeze, and to Matt for coordinating with
that user to obtain it from them.
2022-02-28 22:22:29 +11:00
Kevin DegelingandMatt Gajownik db3cee0868 UI: Additional product details
Based on the product description from the main website
2022-02-28 22:22:09 +11:00
obiwacandMatt Gajownik c09429aa8c linux-v4l2: scandir with alphasort on non-Linux
Sort video device entries with `alphasort` on non-Linux platforms,
as opposed to `versionsort` on Linux.
(`versionsort` is a GNU extension, unavailable on e.g. FreeBSD.)

UI: Fix call to `to_string` on FreeBSD
2022-02-28 22:21:46 +11:00
obiwacandMatt Gajownik cedd8b9d15 libobs/graphics: gs_query_dmabuf_* on FreeBSD too 2022-02-28 22:21:41 +11:00
gxalphaandMatt Gajownik 46f9a5a8b9 UI: Refresh edit menu on item locked signal 2022-02-28 22:21:30 +11:00
Kurt KartaltepeandMatt Gajownik eff0148dd7 linux-v4l2: Fix warnings in mjpeg
Previously the switch did not catch all cases issuing a quite large
warning. Also there was a const-ness warning for codecs on ffmpeg 5.0
that this addresses.
2022-02-28 22:21:14 +11:00
Richard StanwayandMatt Gajownik bad7edd051 win-wasapi: Fall back to old code if RTWQ fails
Fixes a crash if RTWQ is unavailable, e.g. if the mmcss service is not
running.
2022-02-28 22:20:45 +11:00
Ryan Foster cc1395857a CI: Update workflow to copy SOVERSION symlinks
Commit 7a5bffc0a6 applied a fix to the
macOS build script. This applies the same fix to the GitHub Actions
workflow that is actually currently used on CI.
2022-02-22 17:17:25 -05:00
Julian OrthandRyan Foster 68a8264197 libobs: Map wayland keymap with MAP_PRIVATE
Wayland clients are required to use MAP_PRIVATE starting with version 7
of the wl_seat protocol.

Signed-off-by: Julian Orth <ju.orth@gmail.com>
2022-02-21 14:10:36 -05:00
jp9000 acad9dbaf7 libobs: Update version to 27.2.1 27.2.1 2022-02-20 16:35:43 -08:00
Richard StanwayandMatt Gajownik bfcc066099 obs-outputs: Set a fixed size socket buffer on Windows 7
Auto tuning apparently doesn't work very well on this version and
af6844f5c2 caused throughput
regressions.
2022-02-21 11:21:20 +11:00
Matt Gajownik 2f48733f3c CI: Bump Windows CEF cache to fix reported version
While the previous cache had the correct changes, the version was
reported incorrectly. This will avoid confusion.
2022-02-21 10:32:40 +11:00
Matt Gajownik c9dfad7340 CI: Bump Windows CEF cache for new OnAcceleratedPaint2
See https://github.com/obsproject/cef/commit/36fdac16a7 for more info.

This only bumps the cache on Windows as the changes are currently
Windows-specific.
2022-02-21 10:32:36 +11:00
jp9000 0f97427ef2 obs-browser: Add support for custom OBS CEF
Our version fixes the system freeze issue, reduces resource usage, and
improves performance back to 3770 levels.

See obsproject/cef@36fdac16a7 for detailed information.
2022-02-20 13:31:05 -08:00
jp9000 3eec65d127 obs-browser: Fix texture recreating every frame 2022-02-20 13:31:05 -08:00
Matt Gajownik a0c37e7aa9 obs-browser: Fix issues with rendering on Linux/macOS 2022-02-20 17:33:02 +11:00
Kurt KartaltepeandMatt Gajownik 8ad7d1b08d linux-v4l2: Use decoded MJPEG pixel format
Previously we assumed mjpeg was always decoded to 422 but it seems some
cameras provide frames that decode to different pixel formats such as
420.

This change delays setting the obs frame pixel format until after we
have decoded the v4l2 frame.

fixes #5821
2022-02-20 14:40:20 +11:00
Matt GajownikandMatt Gajownik d1f8caeb8d UI: Log 'Hide OBS from capture' on startup & settings change 2022-02-20 13:40:34 +11:00
derrodandMatt Gajownik 94016b459f libobs: Adjust path for legacy browser source block
The current path would prevent the browser source from loading if OBS
itself is in the "Application Support" folder, where it might end up
when being installed via certain distribution platforms.
This adjusts the existing hack to specifically check for the obs-studio
subfolder where the old browser source library would reside.
2022-02-20 12:06:03 +11:00
gxalphaandMatt Gajownik 5f7c4329b2 UI: Refresh edit menu on item select/deselect 2022-02-20 12:05:59 +11:00
PatTheMavandMatt Gajownik a75687abec CI: Ensure SOVERSION symlinks exist in created App Bundle
Bundles libraries are available via their specific versioned filename
as well as SOVERSION and versionless symlinks. Dylibbundler does _not_
include these symlinks when copying linked libraries into the bundle.

This change ensures that all libraries and their SOVERSION symlinks
exist in the created App Bundle.
2022-02-20 12:05:54 +11:00
PatTheMavandMatt Gajownik c4455d4de0 CI: Update main workflow file to use fixed obs-deps
Prior version was linked against libxcb, because it was present on
Github Actions macOS runners. Consequently builds on CI will succeed
as the library is always present, will fail on user's machines though.
2022-02-20 12:05:50 +11:00
Matt GajownikandMatt Gajownik 9c42e9f752 win-wasapi: Only enable work queue on Windows 10+
Fixes #5967
2022-02-20 12:04:56 +11:00
pkvandMatt Gajownik 92bf2ebe93 obs-ffmpeg: Force mpegts format & disable restart on activate for srt & rist
This fixes crashes in media Source when :
- the user forgets to set the input format for srt or rist URLs;
- disabling / enabling / disabling etc Media source with a rist URL.

Signed-off-by: pkv <pkv@obsproject.com>
2022-02-20 12:04:48 +11:00
Florian ZwochandMatt Gajownik b6366757c0 linux-capture: Fix for pipewire capture leaking texture handles
Enter the graphics context before calling gs_texture_destroy() or
else the call will fail causing the texture handles to leak.
2022-02-20 12:04:41 +11:00
Matt GajownikandMatt Gajownik 59a675738f UI: Don't collapse preview in Filters splitter view
Fixes #5959
2022-02-18 20:37:47 +11:00
jp9000 5643e9cbbf obs-browser: Fix sRGB rendering 2022-02-15 23:52:44 -08:00
jp9000 e43f75fc92 obs-browser: Update version to 2.17.10 2022-02-15 23:21:59 -08:00
jp9000 f2628de7f2 obs-browser: Acquire, copy, and release immediately
Instead of holding onto an acquire over the duration of an entire frame,
acquire, copy to a texture, and immediately release the lock.

(Note from Jim: When it comes to synchronization, the idea of acquiring
a lock, and then releasing all the way in the next frame just feels a
bit worrisome. Especially when it's a GPU object. But at this point, I'm
just making shots in the dark in an attempt to eliminate any possible
things that might even have a remote chance to trigger latent bugs in a
GPU driver or the kernel. You know, that whole system freeze thing. This
probably doesn't have anything to do with it, at this point I have
nothing but wild geese to chase. Whatever.)
2022-02-15 23:21:59 -08:00
ThulinmaandJim 9c504f4d35 rtmp-services: Update Picarto ingests 27.2.0 2022-02-12 15:02:10 -08:00
jp9000 b68ee1ccae libobs: Update version to 27.2.0 2022-02-10 16:43:18 -08:00
Translation UpdaterandTranslation Updater 25b58f0417 Update translations from Crowdin 2022-02-11 00:34:08 +00:00
derrodandRyan Foster 09e7d5d1a5 CI: Specify Windows Server 2019 2022-02-10 02:03:53 -05:00
Richard Stanway aa73de952b UI: Fix uninitialized memory access in OBSPropertiesView
Bug introduced in b0528e0cf7. Closes
https://github.com/obsproject/obs-studio/issues/5934.
27.2.0-rc4
2022-02-08 21:57:08 +01:00
jp9000 b0528e0cf7 UI: Fix properties view crash with non-obs objects
The properties view incorrectly assumed that it was being used with obs
objects only.

(Jim note: I'm annoyed.)
27.2.0-rc3
2022-02-08 11:07:23 -08:00
RodneyandGitHub b7a24d54c9 UI: Add warning on startup for running in Wine 27.2.0-rc2 2022-02-07 14:16:59 -08:00
jp9000 109b54fd66 obs-ffmpeg: Fix svt-av1 rate control settings
For SVT-AV1, rate control is explicitly set via an "rc" option, so set
those options manually for SVT-AV1. CBR doesn't seem to be fully
supported, but it's sort of supported via CVBR (constrained variable
bitrate), which seems to be specific to each GOP size, which is about as
close to CBR as we can get.
2022-02-07 13:11:34 -08:00
Translation UpdaterandTranslation Updater ac8dbf67be Update translations from Crowdin 2022-02-06 02:24:08 +00:00
Cenk UluisikandGeorges Basile Stavracas Neto f52f34b614 linux-capture: Fix missing parameter for pipewire capture
Commit a3a6710 introduced the obs_pipewire_save() function in the
PipeWire code, but only set it to the monitor capture source. This
was an oversight, it should have been set to the window capture
source as well.

Set the .save vfunc of the window capture source as well.

Closes obsproject/obs-studio#5906
2022-02-04 13:09:12 -03:00
jp9000 c71abfbd8c UI: Fix clang-format specifier 2022-02-02 22:39:24 -08:00
jp9000 4f09cac7af UI: Remove unnecessary call 2022-02-02 22:37:41 -08:00