Commit graph

9979 commits

Author SHA1 Message Date
a1346054 ebd8647c4a COPYING: Use license file from gnu.org
They:
* changed maximum line length to <80
* stopped mixing tabs and spaces
* refer to LGPL as 'Lesser' instead of 'Library'
* removed non-printing characters that break some editors

Downloaded from:
https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
2021-10-24 00:35:27 -07:00
gxalpha 4a50e62120 mac-virtualcam: Remove unnecessary plugin version number 2021-10-24 00:22:53 -07:00
Clayton Groeneveld 96a5e11cd9 UI: Cleanup advanced audio functions
This removes the AdvAudioPropsClicked and AdvAudioPropsDestroyed
functions. The click function was not being used anywhere and the
destroy function was redundant because the dialog is set
to be deleted on close.
2021-10-24 00:21:10 -07:00
Morgan Rose ccdf624c44 UI: Refactor Frontend API and header
Moved getters to be before setters. Moved functions in cpp file to match the order of their declarations in the header file.
2021-10-24 00:17:22 -07:00
Clayton Groeneveld dae03c8a9f UI: Change position of filters defaults button
The button was not on the left side, as other default buttons are in
the UI.
2021-10-24 00:11:54 -07:00
Clayton Groeneveld bb43a6fa7c UI: Make transition duration suffixes consistent
The suffixes for the source and override transition durations
were not consistent with the transition dock duration.
2021-10-24 00:10:45 -07:00
Norihiro Kamae 499af309b5 obs-ffmpeg: Fix unwritten audio-only output
When video is disabled, no audio was sent to the container so that the
audio was not saved. Prior to this change, all audio was discarded until
the first video packet arrives. This change limits to discard audio only
if video is available.
2021-10-24 00:02:32 -07:00
Norihiro Kamae 85f45a3ef6 libobs/audio-monitoring: Fix PulseAudio monitoring volume for u8 format
Change `char` to `uint8_t` in `process_byte` because the type is
expected unsigned 8-bit.
2021-10-23 23:59:53 -07:00
Norihiro Kamae 0eed7ca98f libobs/audio-monitoring: Fix PulseAudio monitoring volume for s32 format
When signed 32-bit audio arrived to pulseaudio-output and volume was
lowered, audio data was broken. In the function `process_volume`, the
type of the data is switched by `bytes_per_channel`. However the size of
signed 32-bit integer and the size of float are same so that the signed
32-bit integer is processed as float.
This commit changes these items.
- Use `format` instead of `bytes_per_channel` so that all the sample
  types can be differentiated.
- Change `short` to `int16_t` and renames existing function
  `process_short` to `process_s16` to clarify the function is
  processing signed 16-bit.
2021-10-23 23:59:53 -07:00
Matt Gajownik 8f1d2458bf decklink-captions: Build with Windows file descriptor
Additional details: #1944
2021-10-17 18:25:58 +11:00
James Beddek 5fccf86b07 UI: Fix build with Clang and libc++
std::bind conflicts with extern int bind defined in socket.h

Signed-off-by: James Beddek <telans@posteo.de>
2021-10-16 16:14:32 -07:00
Artem Polishchuk 3f341639ce CI: Update KDE image to 5.15-21.08 (Flatpak)
Update Flatpak KDE image to 5.15-21.08 in GitHub Actions.
2021-10-16 15:55:10 -07:00
Artem Polishchuk 8a1d74688c CI: Update modules for Flatpak build
* CI: Update mbedtls to v2.27.0
  * CI: Update srt to v1.4.4

Mandatory update for org.kde.Platform 5.15-21.08 runtime.
2021-10-16 15:55:10 -07:00
Artem Polishchuk 2f636ab2da CI: Update KDE Platform to 5.15-21.08 (Flatpak) 2021-10-16 15:55:10 -07:00
VodBox 19ced32c58 UI: Translate to current OS for all colection imports
Importers are written to convert third-party collection formats to a
Windows OBS scene collection. The Studio importer is capable of
translating scene collections to the correct types for the current
operating system. This change makes it so all imports will be ran
through the Studio translation, not just Studio and SL collections.
2021-10-16 15:34:53 -07:00
VodBox 8a132ad69f UI: Resolve relative paths on scene collection import
This change makes it so any strings in a scene collection that start
with "./" are checked as being a relative path. As long as the resulting
absolute path is contained within the same directory as the collection
being imported, it will be replaced with an absolute path.

This allows scene collections to be effectively "packaged" with assets,
so long as the assets are contained somewhere within the folder the
collection is being imported from.
2021-10-16 15:34:53 -07:00
gxalpha 5c26bf06f0 UI: Use correct color property for freetype in toolbar 2021-10-16 15:30:41 -07:00
gxalpha 4bd69bf46e UI: Make toolbar color selectors respect alpha 2021-10-16 15:30:41 -07:00
gxalpha fab23d523b mac-virtualcam: Remove unneeded includes 2021-10-16 15:27:51 -07:00
Alexis King 08d4456339 v4l2: Ignore menu controls with no permissible values
At least one V4L2 device reports a menu control when queried with
QUERYCTRL yet does not report supporting a single value in its legal
range when queried with QUERYMENU. Such devices are arguably
ill-behaved, but the Linux UVC driver takes no special care to ignore
such pathological controls, so we have to do it ourselves.

Without this patch, a menu control with no valid values would cause
v4l2_control_changed to go into an infinite loop, since every S_CTRL
request on such pathological control properties would always fail,
triggering an additional modification event. By ignoring these
properties altogether, we avoid that problem, and the user benefits by
not having the UI cluttered by a confusing and useless menu control.
2021-10-16 15:24:20 -07:00
gxalpha 8f0964c2dd UI: Don't save defaults in oldSettings in properties
The default settings were saved in the oldSettings variable of the
properties dialog in `86eb7ae` to be able to restore default settings in
undo/redo, but this doesn't actually do anything.
Besides this, it introduced a bug where clicking "Cancel" in the
properties dialog would save all settings, including default ones, as
well as a bug where not changing anything in the properties dialog would
still add an undo action.
2021-10-16 15:07:13 -07:00
jp9000 b173d1ce2c UI: Disable paste source menu items when removed
Disables the "Paste (Reference)" and "Paste (Copy)" for sources when the
sources that have been copied have been removed

Fixes obsproject/obs-studio#4074
Closes obsproject/obs-studio#4096
2021-10-15 22:11:03 -07:00
jp9000 52497d23bb UI: Don't copy via name, use weak refs
This change makes it so that when copying filters or sources, that it
stores a weak reference to the source(s) or filter(s) being copied
rather than relying on their names.
2021-10-15 22:10:33 -07:00
jp9000 9819cb2924 libobs: Add obs_weak_source_expired() 2021-10-15 22:10:33 -07:00
Scratch a78558b46a obs-scripting: add transition duration functions 2021-10-15 16:50:59 -07:00
Mike 96449877ef UI: Update Edit menu item states before displaying
Originally, the states of the items in the Edit menu would only update
when a context menu popup was created for sources. This moves that code
out of the context menu creation, and into its own dedicated function.
That function is then used both before the Edit menu is shown, and
before the context menu is created.

Fixes obsproject/obs-studio#3827
2021-10-15 16:11:08 -07:00
tt2468 23cda97a54 libobs/callback: Make proc_handler_t threadsafe
Add mutexes to protect against multi-threaded memory access
violations.
2021-10-14 04:28:04 -07:00
jp9000 c46a719c9c UI: Fix formatting with both 12.0.0 and 12.0.1
This single line in the entire project causes a difference between
clang-format 12.0.0 and 12.0.1. So, just rearrange the code so it works
with both instead.
2021-10-13 02:44:31 -07:00
jp9000 de0610a03a UI: Fix formatting for clang-format 12.0.0 (I guess)
I guess visual studio uses 12.0.0 rather than 12.0.1 and apparently,
there's some ****ing difference between 12.0.1 and 12.0.0.

Whatever.
2021-10-13 02:22:31 -07:00
jp9000 095661905b UI: Fix formatting with clang-format 12 2021-10-13 02:12:18 -07:00
Ryan Foster 2c5b1a837f CI: Update clang-format from 10 to 12
Microsoft Visual Studio 2019 ships with LLVM/Clang 12 as of Visual
Studio 2019 16.11.0 (August 10, 2021). LLVM/Clang 12 is available on all
platforms. This change should make it easier to have clang-format "just
work" on dev systems and be consistent across platforms without having
to use an outdated version.
2021-10-13 20:00:04 +11:00
Ryan Foster 5f68991911 clang-format: Commit file changes for clang-format 12 2021-10-13 20:00:04 +11:00
Ryan Foster 424128a825 clang-format: Commit file changes for clang-format 11 2021-10-13 20:00:04 +11:00
PatTheMav 39aedc6c2f UI: Add new vector-based menubar icons for macOS 2021-10-12 08:33:54 +11:00
jpark37 3c71399650 libobs/audio-monitoring: Add reconnect logic
Automatically tear down if monitor is invalidated, and retry every time
an input sample is played.
2021-10-10 19:22:35 -07:00
jpark37 eb6050f3ce libobs/audio-monitoring: Move variable assignment
Assinged too early for upcoming change that may reset monitor->render.
2021-10-10 19:22:35 -07:00
jpark37 7af886581d libobs/audio-monitoring: Add WASAPI init helper
audio_monitor_init_wasapi will be used for reconnect logic.
2021-10-10 19:22:35 -07:00
jpark37 63ffae7d74 libobs/audio-monitoring: Remove unnecessary device 2021-10-10 19:22:35 -07:00
jpark37 b005e6748e libobs/audio-monitoring: Fix mutex leak
Use SRWLOCK for simplicity. Does not need to be destroyed.
2021-10-10 19:22:35 -07:00
jpark37 8ce1bb645f win-wasapi: Remove monitor invalidation code
The previous monitor recovery logic touches the source monitoring type,
resets the monitor even if the output device hasn't been invalidated,
and was susceptible to races. Monitor invalidation should live within
the monitor abstraction.
2021-10-10 19:22:35 -07:00
jpark37 e582879303 libobs/media-io: Register audio thread with MMCSS
Ensure audio gets more priority to help prevent glitching.
2021-10-10 19:19:01 -07:00
jpark37 e69f051736 libobs/util: Improve os_sleepto_ns on Windows
Avoid nanosecond abstraction to reduce math operations.

Replace Sleep(0) with YieldProcessor(). We want the thread to remain
scheduled, the current CPU core to do less work, and the hyperthread
sibling to perform better.

Hacky profiling showed maybe 10-25 µs skid reduction per function call.
I think power/performance gains would be hard to measure, so I haven't
tried, but it would be shocking if they got worse.
2021-10-10 19:13:19 -07:00
jpark37 cf6e106939 obs-outputs: Remove unnecessary header 2021-10-10 19:12:45 -07:00
jpark37 e581802812 obs-outputs: Remove WIN32_LEAN_AND_MEAN define
It should already be defined near the Windows.h include.
2021-10-10 19:12:45 -07:00
jpark37 a3f10cf0be libobs: Remove WIN32_LEAN_AND_MEAN
It should already be defined near the Windows.h include.
2021-10-10 19:12:45 -07:00
jpark37 64cb26d03d UI: Tuck variable inside macro guard 2021-10-10 19:12:45 -07:00
jpark37 e181a23bed UI: Remove NOMINMAX from CMake scripts
If we want NOMINMAX globally, we should probably define at top level.
2021-10-10 19:12:45 -07:00
jpark37 c93b040d0d UI: Use patterns that avoid std::min/max
New code is cleaner anyway.
2021-10-10 19:12:45 -07:00
jpark37 d4bf7d4c23 coreaudio-encoder: Remove NO_MIN_MAX
Misspelled NOMINMAX is unnecessary.
2021-10-10 19:12:45 -07:00
jpark37 4ca8cdfc0a libobs/util: Simplify emmintrin.h wrapper macro
Also add WIN32_LEAN_AND_MEAN for external Windows.h include.
2021-10-10 19:12:45 -07:00