If a module is not found in context bar, it crashed when resolving
source type name. This is same change as 41367bb2b but fixes
window-capture and display-capture.
Also removes an unnecessary pair of braces.
Sets a minimum size on the source toolbar itself to prevent shrinking the main window too small for it to be useable in some cases.
Also sets some sane limits on the toolbars with dropdown menus and the image source toolbar filepath
This crash was caused by the fact that the SourceToolbar::oldData member
variable was not being released correctly. To release an OBSData object,
it must be either destructed, set to a new value, or set to a null
value.
Settings would not update properly because obs_source_update() can only
apply the settings value to the existing settings, so it could not
remove values. This change fully erases existing settings and replaces
it with the target settings instead.
The undo/redo functions are setting the current scene. Everytime
it would do this, it would actually transition to the scene.
This forces the current scene, so it fixes a bug where the
transition would be grayed out when undoing/redoing.
This commit prevents a crash in, for example, Linux configurations
where PulseAudio is disabled, which leads into 'mod' being 'null',
which in turn leads into a segmentation fault when an ALSA source
is selected.
Closes https://github.com/obsproject/obs-studio/issues/3485
Replaces SetComboItemDisabled in context-bar-controls.cpp with a global
function in qt-wrappers called SetComboItemEnabled, which allows both
enabling and disabling items in a combo box.
The old version of the device toolbar was a complex situation. Because
of the fact that device properties can take significant time to query,
this put an unpleasant burden on the UI thread; so to fix this problem,
the device toolbar was made to be threaded. However, threading is a
complex and dangerous thing, and there is a fear that this could cause
complications down the line whenever users are simply selecting devices.
So for the time being, as a safety precaution, simplify the device
toolbar down to just the "activate" button, and make it so that if users
really need to query and change the devices, that they need to
explicitly open the properties. That way the devices aren't being
queried constantly every time a device source is selected.
Alternatively in the future, device enumeration could be cached, but
seeing as that's a significant amount of work and needs to take in to
account whether a user adds/removes a device while the process is
active, that's not going to happen any time soon.
When selecting a color on the color source, if you pressed cancel, it
would cause it to set the color to black. Instead, make sure to check
isValid() on the returned color value to see if the user pressed cancel
when selecting a color.
Because devices can take significant time to enumerate, defer the
properties creation to a separate thread. The author of this commit
feels a great amount of displeasure over having to write this.
The source toolbar allows quick and easy access to properties and
filers, and shows common properties/features of a source type. For
example, when you select a media source, VLC source, or the slideshow
source, you'll get media controls to control playback of the media. If
you select a text source you can edit the font, color, or text if
applicable. Or if you select a capture source, you can select the
display/window/etc to capture for that source.
If the source toolbar is not desired and is viewed as taking up valuable
space in the window, it can be disabled via the view menu.
Co-authored-by: Clayton Groeneveld <claytong1214@gmail.com>
Co-authored-by: Jim <obs.jim@gmail.com>