Commit Graph

10555 Commits (b7ab8cf838a9913ba55251b620217ab38ccea70f)

Author SHA1 Message Date
jpark37 b7ab8cf838 libobs-d3d11: Simplify duplicator formats
Remove DXGI_FORMAT_R10G10B10A2_UNORM since it can be ambiguous whether
it is Rec. 2020 PQ, or high-precision sRGB. We can revisit later.
2022-03-09 23:05:45 -08:00
Richard Stanway da4d98d0e4
UI: Remove some globals in AAC bitrate population 2022-03-09 22:54:22 +01:00
jp9000 89881147c7 UI: Fix deferred source properties not updating 2022-03-09 13:12:17 -08:00
jp9000 e5f57a1e03 UI: Rename visual update callback variable
Having both a "callback" and "cb" doesn't make sense. One is
specifically for visual updates only, the other is for actual updates,
so use an appropriate name for both
2022-03-09 13:11:38 -08:00
gxalpha 45f737fb30 UI: Add undo/redo to dropfiles 2022-03-08 13:25:38 -08:00
cg2121 24e4cd1717 UI: Fix mixer hide toggle in studio mode
If the user would toggle hide in mixer in studio mode,
the source would show up in audio mixer, even if it
wasn't active.
2022-03-08 13:18:05 -08:00
jpark37 ed70de55cf libobs-d3d11: Relax minimum Windows for flip model
We'll need flip model swap chains in the future for HDR, and we don't
want to limit HDR to WIndows 11. The new test is the existence of
IDXGIFactory5, which was introduced in Windows 10 1607. This should be
enough for HDR, for which we use APIs in Windows 10 1703.

Hopefully having SetMaximumFrameLatency(40) this time will make enough
of a difference to not bring back reports of degraded performance when
using flip model on Windows 10.
2022-03-08 13:01:09 -08:00
jpark37 1982ee2597 libobs: Handle filter_texrender format mismatch
This is a possibility in the future where a target might switch between
SDR and HDR.
2022-03-08 12:56:35 -08:00
jpark37 16637baf88 libobs/graphics: Add gs_texrender_get_format 2022-03-08 12:56:35 -08:00
jpark37 d528f6cafa deps/media-playback: New AVPacket pattern
FFmpeg has deprecated stack-allocated AVPacket objects, so make a pool
and use the new pattern instead.
2022-03-08 12:39:04 -08:00
Matt Gajownik 372b54ca7a UI: Display dock-relevant context menu on titlebar 2022-03-08 12:36:19 -08:00
cg2121 8c732d31a7 UI: Disable replay save button when paused
Another indicator to the user that replays can't be saved
when recordings are paused.
2022-03-08 12:32:27 -08:00
Exeldro 0751416db0 libobs: Fix overflow subtracting unsigned numbers
When offset_size is greater than size, size would overflow
2022-03-08 12:31:43 -08:00
Exeldro f8c2ccc2c3 UI: Add mulitiview layout options without program 2022-03-08 12:30:19 -08:00
Florian Zwoch 8886091793 obs-ffmpeg: add NVENC blacklist check for Linux
Similar to the Windows counter part. Check the PCI bus for
installed cards. When found at least one VGA compatible adapter
from NVIDIA that is not in the blacklist we pass the check.
2022-03-08 12:16:07 -08:00
Tim Cooper bf09a70a09 UI: resolve .url, .lnk shortcuts during drag-and-drop
On applies to Windows.

Suggested here: https://ideas.obsproject.com/posts/1636
2022-03-08 11:58:55 -08:00
cg2121 748cf32a43 UI: Add events for renaming profiles/collections
The events make it more clear when profiles or scene
collections are renamed.
2022-03-08 11:17:59 -08:00
Misutaa Asriel 4afafaac6d UI: Fix unorthodox macOS Dock icon behavior
Fixes overriding of macOS dock icon behavior.

macOS sets the icon on launch based on:
- The Information PLIST
- A user provided icon by Finder

setWindowIcon overrides this behavior.

Therefore, this commit resolves this issue,
by doing nothing if target is macOS.
2022-03-08 08:50:34 -08:00
Kurt Kartaltepe ec05e1ff57 UI: Avoid calling obs_source_update multiple times
When we added undo/redo in 86eb7aeb a distinction between Updates and
Visual updates was made, presumably for filters which need special
handling of the update case. These functions were also added to regular
source properties, but didnt use any special code instead calling
obs_source_update an additional time after a short time.

Instead lets remove the 2nd delayed call and only call obs_source_update
once per settings change.
2022-03-08 08:35:02 -08:00
cg2121 efce0f41d0 decklink: Use ComPtr for variables
This makes sure Decklink variables are automatically released.

Closes https://github.com/obsproject/obs-studio/pull/5508
2022-03-08 03:36:01 -08:00
Clayton Groeneveld 3df2f3e069 libobs: Add function to load private sources
If a private source is loaded with the obs_load_source function,
it is loaded as a normal source, so add a new function
to load private sources.
2022-03-08 01:49:24 -08:00
jp9000 61cbfb3b9a UI: Use get_new_source_name instead of strprintf
Remove a bit of duplicated code, and fix non-Windows compilation. This
is a bit of a workaround to not have to modify cmake, but might as well
reuse a function that already exists anyway rather than duplicate the
code.
2022-03-08 01:27:20 -08:00
jp9000 6dd65c8d13 UI: Fix duplicated source names in audio settings
When you add an audio capture source and use the "use existing" feature
in the source selection dialog, and then recreate the same audio source
again in audio settings, it will result in two sources using identical
names, which although relatively harmless can cause issues when doing
things such as trying to find sources by their name.

Fixes obsproject/obs-studio#5621
Closes obsproject/obs-studio#5947
2022-03-08 01:05:27 -08:00
Devon Vitkovsky 3e9a3d995b UI: Change 'Last Log' to 'Previous Log' in order to disambiguate things 2022-03-05 16:01:09 -08:00
cg2121 1a2e5035c3 UI: Remove OBSSceneItem QDataStream
Since the source list is a custom list model, the
QDataStreams for OBSSceneItem are not needed.
2022-03-05 15:59:30 -08:00
gxalpha 6d86b58ed7 UI: Simplify multi-instance check 2022-03-05 15:21:11 -08:00
jpark37 c7c52a59f9 win-dshow: Fix hwdevice_ctx leak 2022-03-05 15:02:23 -08:00
jp9000 490c6214f0 virtualcam-module: Revert changes since 27.1.3 (for now)
This reverts commit 4b0767741a,
3f3f9ed7e6,
0e7c17bd6e, and
865eecb739.
2022-03-02 17:35:36 -08:00
jp9000 4b0767741a virtualcam-module: Prevent placeholder memory leak 2022-03-02 05:06:12 -08:00
jp9000 2026270b65 virtualcam-module: Only initialize placeholder once 2022-03-02 05:06:12 -08:00
jp9000 c5dabb805f libobs: Update version to 27.2.3 2022-03-02 04:25:58 -08:00
jp9000 3f3f9ed7e6 virtualcam-module: Fix incorrect correct res/fps
Apparently the testing that was done was not sufficient enough or did
not check all test cases, so resolution/fps does not get set properly on
the virtualcam.
2022-03-02 04:19:02 -08:00
jpark37 f186b8c304 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.
2022-03-01 12:53:51 -08:00
jpark37 fa5a05f188 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:53:51 -08:00
jp9000 a8fd2e42df libobs: Update version to 27.2.2 2022-03-01 11:40:16 -08:00
jp9000 6d3b1998ef 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 03:04:37 -08:00
jpark37 fbcb053cfa libobs/util: Use integer math for Windows timing
Cleaner and faster than double math.
2022-02-28 10:11:03 -08:00
jpark37 4e5906d2b0 libobs: Clamp video timing for safety
os_gettime_ns and os_sleepto_ns may not match up exactly.
2022-02-28 10:11:03 -08:00
Matt Gajownik 7409496c14 obs-browser: Log CEF version *after* library is loaded on macOS 2022-02-28 23:24:52 +11:00
jp9000 4f15f1062d 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 02:07:13 -08:00
jp9000 0e7c17bd6e virtualcam-module: Remove unnecessarily inlines 2022-02-27 22:26:10 -08:00
jp9000 865eecb739 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-02-27 22:23:41 -08:00
Kevin Degeling 139e6ed69e UI: Additional product details
Based on the product description from the main website
2022-02-27 13:30:25 -03:00
jpark37 847eebc648 win-dshow: Fix wrong AVCodecContext free call 2022-02-27 04:38:30 -08:00
jpark37 2e1d9e8e64 win-dshow: Add hardware decode status to log 2022-02-27 02:40:09 -08:00
Matt Gajownik f77ab0e199 UI: Fix rendering of spaces & tabs in Log Viewer
For some reason, the combination of QPlainTextEdit and a HTML block
seems to treat spaces as HTML shoult (only display one, no tabs, etc)
rather than how QTextEdit + HTML does, which is strange. As we don't
need HTML for existing log lines, insert them as plaintext, but for
new entries wrap non-error non-warning messages in a <font> tag and
format that with white-space: pre
2022-02-27 18:56:19 +11:00
Matt Gajownik fe71841b5a obs-browser: Update version to 2.17.14
f3d7a4d - Display runtime version (not built version) in UA string
f93675c - Print both runtime & compile version of CEF on startup
2022-02-27 17:22:05 +11:00
gxalpha 90f1ebf4aa UI: Disable downscale filter setting for same resolutions
Disables the downscale filter dropdown menu when base and output
resolution are the same.
2022-02-27 14:42:17 +11:00
OldBaldGeek 6a5a5b4538 UI: Make volume meter tweakable by stylesheet
Replace fixed Arial, 7 px meter scale font with the font used
for VolumeMeter/QWidget. Add qproperties for meter bar thickness and
a scaling factor for the meter scale numbers. If not specified in a
QSS, defaults are 3 pixel bar width and 80% of base font size.
2022-02-27 13:17:59 +11:00
OldBaldGeek c8a0dbff1e UI: Use selective repaint on volume meter scale
Fix for issue 3915 - reduce tick and font blur at 125% DPI.
Former use of paint cache resulted in blur when scaled.
2022-02-27 13:17:59 +11:00