Commit graph

12369 commits

Author SHA1 Message Date
Richard Stanway 9d4a7f01dd UI: Add DLL blocking functionality for Windows
Adds a NtMapViewOfSection hook which we can use before DLLs are loaded
to decide whether to abort the process. This is useful for blocking
known problematic DLLs that cause crashes. In addition, the PE timestamp
can be checked to block only older DLLs such as older versions of Vtuber
virtual cameras with known deadlock bugs.

A simple counter of each DLL is used for logging purposes. Since DLLs
can be blocked at any time, the output is only logged on exit of OBS.
2023-03-09 14:16:34 -05:00
Mathijs Kadijk 970c284a65 mac-virtualcam: Prevent PTS rounding
All presentation time stamps are rounded to whole seconds during the
conversion from nanoseconds to seconds, because of the immediate cast
to `int64_t`. This results in the same presentation time stamp being
send to consumers for a whole second.

In previews/live streams this isn't super visible as last frame is
often assumed to be the newest and the stream is updated. It's more
problematic when recording since APIs like Apple's AVFoundation don't
allow duplicate presentation time stamps or it can look like frames are
produced in huge bursts once per second.

In this PR `CMTimeMakeWithSeconds` is used instead of `CMTimeMake` to
make sure the conversion is done correctly and simplify the calculation
we have to do a little.
2023-03-09 15:45:48 +01:00
Mathijs Kadijk ecaa5466cb mac-virtualcam: Fix incorrect PTS on Apple Silicon
The `fillFrame` method of the mac-virtualcam plugin is creating samples
directly using the value from `mach_absolute_time()` as `hostTime`.
This assumes this value is in nanoseconds, while it is in fact in mach
tick units. On Intel Macs mach tick units will be exactly 1 nanosecond
resulting in valid values, but on Apple Silicon macs this is no longer
the case.

This results in sample buffers with the placeholder image that have
much lower presentation time stamps than the samples containing content
produced by OBS. In previews/live streams this shows due to the last
content sample being shown frozen until the whole buffer is filled with
samples containing the placeholder image. Applications recording the
video stream are even more confused and crash or record videos with
wildly incorrect lengths.

In this PR `clock_gettime_nsec_np` is used to convert from mach tick units
to nanoseconds. This will make sure the `hostTime` value is correct on
both Apple Silicon and Intel macs. Making sure we produce stable
presentation time stamps from the virtual camera plugin at all times.
2023-03-09 15:45:48 +01:00
derrod f3b1a1cf1f UI: Use bilinear scaling for YT thumbnail 2023-03-08 18:41:20 -05:00
derrod c99256cf21 UI: Do not set default locale 2023-03-08 18:06:51 -05:00
Ryan Foster 002bd0b5a4 win-capture: Suppress LNK4098
Suppress LNK4098 to allow building against pre-built Jansson for now.
2023-03-08 17:14:11 -05:00
derrod c55fcbbb12 UI: Use binary mode for QuickReadFile
When not using binary mode (i.e. text mode) CRLF will be converted to
LF, which means that the size provided by tellg() is no longer correct,
and reading prematurely hits an EOF and sets the fail bit.
2023-03-08 22:50:49 +01:00
derrod 5dd1d00a03 UI: Add mutex to reading public key file 2023-03-08 22:50:49 +01:00
derrod 2c48e61207 UI,obs-vst: Set Qt RCC format to 1
v2 introduces last-modified timestamps that ruin reproducibility.
2023-03-07 18:13:24 -05:00
derrod f06b2ccf55 cmake: Set PDBALTPATH manually 2023-03-07 18:13:24 -05:00
derrod d2f0dfa341 cmake: Set /Brepro compiler/linker options 2023-03-07 18:13:24 -05:00
derrod 75693a6682 libobs: Write default values to config 2023-03-07 17:44:19 -05:00
tytan652 278973576e obs-outputs: Fix RTMP undefined symbols if built without Mbed TLS 2023-03-07 17:01:49 -05:00
derrod 3fd7216661 CI: Validate compatibility schema 2023-03-07 16:03:18 -05:00
derrod 2e57e09036 win-capture: Display compatibility information 2023-03-07 16:03:18 -05:00
derrod 0ece23dff2 updater: Bump version 2023-03-07 15:34:27 -05:00
derrod 2790e1ab1b updater: Use native WinHTTP decompression (remove zlib) 2023-03-07 15:34:27 -05:00
derrod fc5a84ed5d updater: Use zstd for patch manifest request 2023-03-07 15:34:27 -05:00
derrod 3eff81207e deps: Remove lzma 2023-03-07 15:34:27 -05:00
derrod f29e1fdee4 updater: Switch to Zstandard for delta updates
zstd is faster, less resource intensive, and produces smaller
files than bsdiff + LZMA.

Overall, it's a significant improvement for our workflow.
2023-03-07 15:34:27 -05:00
derrod 787c5f67a8 updater: Add Zstandard for compressed downloads
Using zstd reduces the download size for updates by about 2/3.
2023-03-07 15:34:27 -05:00
tytan652 f4e90a5bd7 obs-ffmpeg,cmake: Add a finder for AMF headers 2023-03-07 14:55:03 -05:00
tytan652 6db418fb3f obs-ffmpeg: Replace external/AMF folder by obs-deps headers 2023-03-07 14:55:03 -05:00
derrod cb475718bd CI: Create Sparkle appcast and deltas on tag 2023-03-07 14:18:32 -05:00
gxalpha 78d195a5df UI: Make T-Bar unclickable
The T-Bar should only be draggable and not act on clicks.
2023-03-07 13:47:51 -05:00
PatTheMav 0fe28e9ceb mac-syphon: Fix warnings in ObjC code for CMake rework
Removes unused functions and explicitly casts higher-precision
CoreFramework data types into lower precision obs-module types.
2023-03-07 19:23:35 +01:00
shiina424 2eb10cd94e UI: Fix disabled text color in dark theme 2023-03-06 19:02:38 -03:00
cg2121 b464ba8129 UI: Set min/max zoom levels for preview
Prevents the preview from zooming in or out too far.
Min zoom: 10%
Max zoom: 1000%
2023-03-04 16:31:49 -08:00
cg2121 03a94aee41 UI: Fix wrong program scene if tbar is aborted
The program scene would be incorrect if the tbar was released
at its original position.
2023-03-04 16:31:37 -08:00
cg2121 6e22af932d UI: Fix preview disabled in studio mode
If OBS is set to minimize to system tray on startup and studio mode is
enabled, the preview would be disabled when showing OBS, if the preview
in non studio mode was disabled.
2023-03-04 16:24:22 -08:00
pkv a0a23e8a18 libobs: Fix leak with empty path in stats
If the recording path is left empty in Settings, a leak can occur in
window-basic-stats.cpp because a bmalloc is called for a size 1.
This fixes the leak by checking against the path in the
os_get_free_disk_space function.

Signed-off-by: pkv <pkv@obsproject.com>
2023-03-04 16:23:07 -08:00
cg2121 290c1569a9 UI: Don't hardcode properties label colors
Makes the label have colors based on themes, instead of hard coding.
2023-03-04 16:21:01 -08:00
cg2121 a3defd4f58 UI: Fix spacing helpers when rotated and flipped
If the scene item was rotated greater than 45 degrees, and flipped
vertically or horizontally, the spacing helpers would be drawn
incorrectly. This fixes the issue by checking the scale before
the rotation, instead of after.
2023-03-04 16:18:38 -08:00
Ryan Foster dfc8c29cea CI: Update deps to 2023-03-04 release
Notable changes:
 * deps.windows: Add Zstandard
 * deps.windows: Add nlohmann JSON
 * deps.windows: Add WebSocket++
 * deps.windows: Add Asio
 * deps.windows: Add VLC
 * deps.macos: Add nlohmann JSON
 * deps.macos: Add WebSocket++
 * deps.macos: Add Asio
 * deps.macos: Add Sparkle
 * deps.macos: Add VLC
 * deps.macos: Ready macOS deps for new CMake
2023-03-04 19:15:02 -05:00
Richard Stanway 2468268569 libobs: Hold async mutex when calling set_async_texture_size
Calling set_async_texture_size without holding async_mutex is dangerous
as cur_async_frame could be changed / freed by another thread.
2023-03-04 16:10:19 -08:00
Kurt Kartaltepe 0fb89dc9a1 obs-ffmpeg: Fix crash during ratecontrol check
When iterating over an array of structs we incorrectly check for a null
pointer, but the actual sentinel value is the empty struct.
2023-03-04 16:07:12 -08:00
Richard Stanway bb7ca3c2c3 UI: Add mutex for writing to the log file
fstream is not thread-safe and the act of writing the string and the
newline are two separate operations which could execute concurrently in
multiple threads, resulting in lines joining together followed by two
newlines. Due to the presence of a static mutex, this also removes
inline on the function.
2023-03-04 15:34:17 -08:00
gxalpha ffd6ae699c obs-transitions: Add long description for full decode option 2023-03-04 15:33:17 -08:00
Richard Stanway 01786a3f11 libobs: Disable encoder scaling request if it matches output size
It was possible to set the encoder to scale the video to the same size
as the output, resulting in unnecessary passes through swscale and
skipping hardware encoders. This was a common user error in Advanced
Output mode where they would tick the rescale box but leave it at the
same resolution as their main output.
2023-03-04 15:14:42 -08:00
Chris (Flaeri) e7cd29bbe5 obs-ffmpeg: Implement QVBR for AMF encoders
Makes QVBR rate control usable. Fix wrong rate control check on line
1457. Switch from bitrate to CQ/QP value (no bitrate needed).
2023-03-03 21:48:59 +00:00
Chris (Flaeri) 0eb496e8cf libobs/media-io: Add color range and space to conversion
By adding the range data we can get successful handling of full range
color via custom FFmpeg output. Previously it would always default to 0
which would yield partial/limited output. Without the colorspace info
the output file is correctly tagged, but not undergone the actual
conversion.
2023-03-03 21:48:09 +00:00
derrod 8ba646c842 updater: Check if awaited instance matches current install
Also replaces any secondary usages of GetCurrentDirectory with cached
static variable.

Co-Authored-By: Richard Stanway <r1ch@r1ch.net>
2023-03-03 21:47:56 +00:00
Ricardo Tavares 0516371823 deps/media-playback: Enable CUDA HW decoder 2023-03-03 21:47:40 +00:00
Mico Häsänen d33abf68e5 rtmp-services: Add Enchant.events to service list 2023-03-02 18:00:52 -05:00
Richard Stanway 5b193bca55
libobs/util: Fix typo in curl revocation support check 2023-03-02 19:36:31 +01:00
Ryan Foster 681014bec2 rtmp-services: Fix whitespace issues in services.json
* Remove trailing whitespace
 * Use spaces instead of tabs for indents
2023-03-02 13:24:39 -05:00
derrod 08733a0e1a updater: Remove 32-bit Support 2023-03-01 20:18:03 -05:00
Georges Basile Stavracas Neto f62f370edd linux-pipewire: Remove unnecessary variable
No functional changes. The code is just ever so slightly easier to
read now.
2023-03-01 20:47:49 -03:00
Georges Basile Stavracas Neto 436787c1f4 linux-pipewire: Check for effective crop region
Some compositors send buffer crop information even when the crop
matches the buffer size. It doesn't really matter in practice,
but it's good hygiene to check for the effective crop instead of
simply checking if crop exists.
2023-03-01 20:47:49 -03:00
Georges Basile Stavracas Neto d68b061d57 linux-pipewire: Adjust cosmetics
Move code into auxiliary functions, to improve the legibility of the
draw function. It also gets rid of these pesky switch fallthroughs.
No functional changes.
2023-03-01 20:47:49 -03:00