Commit Graph

10692 Commits (c426622690399d5dfcc8ff00d7e1fbc8a3c937fc)

Author SHA1 Message Date
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
gxalpha dd564a2e8f UI: Move "Check For Updates" menu to app menu on macOS
For apps using sparkle, it's normal for the "Check For Updates" button
to be in the app menu instead of the help menu, so let's put it there.
2022-02-27 12:47:18 +11:00
Justin B. Watson 24b2ad8532 rtmp-services: Update Brime Live ingests 2022-02-27 02:06:54 +01:00
gxalpha 7cc20656f4 UI: Add shortcuts for Copy/Paste Transform
Adds the shortcuts Ctrl+Alt+C/V to the Copy/Paste Transform menus in the
Edit menu
2022-02-26 15:54:14 -08:00
cg2121 8510731f2b decklink: Don't load modules if Decklink not found
This also modifies decklink-captions and decklink-output-ui.
2022-02-26 15:44:00 -08:00
obiwac 93c2e681ca 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-26 15:36:08 -08:00
obiwac c50c625555 libobs/graphics: gs_query_dmabuf_* on FreeBSD too 2022-02-26 15:36:08 -08:00
gxalpha aa0893b751 UI: Refresh edit menu on item locked signal 2022-02-26 15:35:10 -08:00
jpark37 42fad9b2b4 win-dshow: Add hardware decode toggle
Off by default because it can be buggy, or overburden the GPU.
2022-02-26 15:31:48 -08:00
Ryan Foster ebc514e8db obs-ffmpeg: Update nv-codec-header files
Update the in-tree nv-codec-header files (nvEncodeAPI.h and
dynlink_cuda.h) to n11.1.5.1, which is the version currently used in the
OBS Studio dependencies, to keep the in-tree version in sync with the
version in our dependencies.
2022-02-26 15:08:03 -08:00
Matt Gajownik 0e57a7beef UI: Fix performance issues with the Log Viewer
This commit includes two big changes, alongside other smaller tweaks.

1) Update the internal QTextDocument of the text component directly
2) Use QPlainTextEdit, which supports HTML & is designed for long text
3) Use QString's arg function for formatting strings

Fix 1 significantly improves realtime performance when adding lines
individually, to the point that the UI no longer freezes if the viewer
is open and the log is being spammed. It also improves initial launch
speed when there's a large amount of text already in the file.
Reference: https://stackoverflow.com/a/54501760/2763321

Fix 2 completely eliminates delay when opening the viewer, regardless
of how many lines are already in the log file. For a standard log
after OBS launch, this cuts opening time from about 2 seconds to half a
second. For anything longer than 1,000 lines, the UI no longer freezes,
and the viewer (& its contents) open within half a second.
Reference: https://stackoverflow.com/a/17466240/2763321
2022-02-26 15:03:35 -08:00
jpark37 61ffb5c4d8 UI: Add OBSQTDisplay::OnMove()/OnDisplayChange()
This plumbing will be useful when handling color space changes.

Currently does nothing, and only Windows is wired for now.
2022-02-26 01:09:07 -08:00
jpark37 5d1261eddb libobs: Only resize display if dimensions change 2022-02-26 01:09:07 -08:00
Kurt Kartaltepe c639255142 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-25 12:22:22 -03:00