Commit Graph

15503 Commits

Author SHA1 Message Date
Joel Bethke
5dacbb63fb Update CONTRIBUTING.md
Clarify AI usage in our project.
2026-05-13 14:53:42 -07:00
Dennis Sädtler
1ecea56817 libobs: Properly fix canvas video reset/restore 2026-05-08 16:28:19 -04:00
Dennis Sädtler
8fb81caf0a Revert "libobs: Restore only canvases that have video info"
This reverts commit 9a62529f02.
2026-05-08 16:28:19 -04:00
Warchamp7
855b8a9d6f frontend: Add minimum width to spinboxes 2026-05-08 14:35:15 -04:00
Richard Stanway
cd7562791f frontend: Apply process mitigation policies for Windows
DEP: Enable DEP as it's still opt-in even on Windows 10. No OBS code or
plugins should be executing data as code and this is an important
mitigation against stack-based buffer overflows.

ASLR: Enable and force ASLR. This makes it harder for any potential
exploits to use fixed offsets into OBS or Windows DLLs to run gadgets.

Extension Points: Disable extension points. These are typically used for
system-wide code injection, and we have generally had trouble with
various things injecting into OBS and causing issues.

Handle Check: Enable strict handle checks when running debug builds.
This will raise an exception if we operate on an invalid handle,
something that should hopefully not ever happen in the current code.
2026-05-08 14:08:12 -04:00
Sebastian Beckmann
77fb5b4bc7 libobs: Disallow overwriting the crash handler
Setting a new crash handler overwrites the existing one. This is not
desirable.
2026-05-08 13:04:27 -04:00
Warchamp7
1b41b44b50 frontend: Fix warning for themeWatcher 2026-05-07 17:34:08 -04:00
ansh1406
5f2720ac98 libobs: initialize peak values using absolute value in get_true_peak and get_sample_peak 2026-05-07 16:35:09 -04:00
cg2121
8163bbf5c8 frontend, libobs: Add ability to set custom source icons
This allows setting dark and light icons for a source.
2026-05-07 16:11:24 -04:00
Warchamp7
12597e9484 frontend: Replace add source dropdown with dialog
Co-Authored-By: Lain <134130700+Lain-B@users.noreply.github.com>
2026-05-07 15:31:10 -04:00
Exeldro
b1a15af06e image-source: Set minimal size for color source to 1 pixel 2026-05-07 15:03:11 -04:00
Grant Likely
fbc99ecd74 frontend: Add theming for checked QToolButtons
The Yami theme provides colours for checked QPushButtons, but does not
do the same for checked QToolButton. This commit adds colors for the
QToolButton:checked: state that match the QPushButton:checked: colors
2026-05-07 14:34:01 -04:00
Kurt Kartaltepe
cbfd6d2677 libobs: Remove extra gs_flush calls
These calls introduce pipeline stalls in OpenGL on low end machines
which can contribute to a fairly significant 10-30% of total rendering
time.

The driver already needs to synchronize events within the context so
these calls are not needed for correctness for OpenGL.
2026-05-07 13:49:53 -04:00
jcm
cc0fd86c05 mac-avcapture: Avoid possible bad access on device connect events 2026-05-07 13:24:18 -04:00
Exeldro
b093030106 frontend, obs-filters: Add missing file support for filters 2026-05-07 12:58:16 -04:00
stephematician
403f075a47 linux-v4l2: Fix vcam reset failure
Reverts much of PR #11906 in favor of a different way to detect whether
or not the output capabilities must be reset.

The new approach will contain false positives for which the workaround
is not needed but it won't have negative side effects.
2026-05-07 12:27:46 -04:00
Exeldro
6f5d00ca71 libobs/graphics: Add support for param assign with type constructor 2026-05-07 12:03:01 -04:00
Ed Maste
d820beb2a7 frontend: Remove move_to_xdg (again)
To support upgrades from older versions move_to_xdg was reintroduced for
FreeBSD.  This has now been available since release 31.0, so users have
likely upgraded across this version and it is no longer needed.

This reverts commit 39b91d8875.
2026-05-06 23:20:50 -04:00
cg2121
750c016161 frontend, libobs: Add OBSProperties OBSPtr type
We no longer have to manually destroy obs_properties_t.
2026-05-06 17:27:36 -04:00
Exeldro
eea945b64c libobs/util: Add support for #if and #elif to CF parser 2026-05-06 16:54:48 -04:00
Warchamp7
74efa2287b frontend: Use vector for filters dialog signals
Co-Authored-By: Clayton Groeneveld <19962531+cg2121@users.noreply.github.com>
2026-05-06 16:29:24 -04:00
shiina424
843e5890eb frontend: Fix checked control button color not changing in System theme 2026-05-06 16:04:30 -04:00
PatTheMav
2954532019 mac-avcapture: Use fallback frame rate by default for new devices
When a new device is selected, a best-possible frame rate is chosen
for the initial configuration of the device. This has to be set in the
source settings, as those are the "source of truth" for the properties
and the device configuration.

The object has to be created explicitly first before setting the
frame rate value. The source then has to be updated explicitly as well
to ensure that the change will be picked up by the next iteration
of the render thread to "tick" the source and thus make it configure
a capture session with the fallback framerate set.
2026-05-06 15:40:55 -04:00
jcm
12361ff135 frontend: Improve FPS selector UX 2026-05-06 15:15:07 -04:00
Warchamp7
52ca7d905b frontend: Move source selection handling to parent 2026-05-06 14:48:32 -04:00
Sebastian Beckmann
649beed45c frontend: Don't store QT_TO_UTF8 to std::string
QT_TO_UTF8 returns a const char * that, in general, shouldn't be stored.
This is because QT_TO_UTF8(str) expands to str.toUtf8().constData():
toUtf8() returns a QByteArray, and constData() the pointer to its data
which is only valid until the QByteArray goes out of scope, which is
immediately after the call.
The original code that is changed here only works because in all of the
situations, the object that is stored to is actually a std::string that
gets constructed implicitly, so the constData() pointer is valid long
enough for the std::string constructor to copy the data.

The issue is that any "... = QT_TO_UTF8" code *looks* unsafe, and may
lead new or unfamiliar contributors to assume that they can also use it,
only to do "const char *... = QT_TO_UTF8(...)" which is dangerous.
Additionally, it introduces an unnecessary round of implicit conversions
and copies when QString.toStdString() already exists and copies into the
string buffer directly.
2026-05-06 14:15:44 -04:00
Sebastian Beckmann
d208c0a128 frontend: Clean up unneeded conversions on YouTube dialog close
The strings (broadcast.id, stream.[id|name]) are stored as QString,
converted to const char * by QT_TO_UTF8 in OBSYoutubeActions, implicitly
converted back to QString because the OBSYoutubeActions::ok takes
const QString &, only to be converted back to const char * by QT_TO_UTF8
in OBSBasic_YouTube and immediately implicitly turned into
const std::strings, only to have .c_str() called on those to get their
const char * again which is needed for libobs. This is insane.

Let's just pass const std::string & and be happy.
2026-05-06 14:15:44 -04:00
Sebastian Beckmann
e38e9f8070 frontend: Pass std::string as result from RemoteTextThread
RemoteTextThread and WhatsNewInfoThread explicitly convert their results
into QString, but many consumers need std::string, converting them
back. Let's just use std::string directly and only convert to QString
where actually needed.
2026-05-06 14:15:44 -04:00
Sebastian Beckmann
dba426630a libobs: Deprecate v1 of obs_properties_add_button
With v1 of this function, it's unclear where exactly the data pointer
comes from or what it is. In fact, this is not determined by libobs, but
the consumer. libobs assumes that the caller of
obs_property_button_clicked passes an obs_context_data pointer, and then
passes the data pointer of that obs_context_data as the data pointer to
the callback.
In OBS Studio, this is always the private data of the associated object.
However, this assumes that there even is such an object (source/encoder/
etc), even though properties are meant to be free-standing. This is not
just philosophical, because with obs_get_source_properties you can
actually get an obs_properties_t that isn't associated with any specific
source, at which point you have no idea what the data pointer will be.

For this reason, obs_properties_add_button v1 needs to go.
obs_properties_add_button2 can be used as a drop-in replacement.
With v2, it's well-defined that the pointer you're passing as priv is
the pointer you get back in the callback as data. If you don't care
about it, simply pass NULL/nullptr.

Once v1 is removed in the future, obs_property_button_clicked should be
replaced with a variant that doesn't take a second argument, as that
argument will no longer be used anywhere.
2026-05-05 15:45:04 -04:00
Sebastian Beckmann
cb75098a93 obs-vst: Use v2 of obs_properties_add_button
v1 of obs_properties_add_button will be deprecated soon.
Also fixes UNUSED_PARAMETER calls in the callbacks for parameters that
are not actually unused, and moves the other ones to the top (as in most
of the rest of the project).
2026-05-05 15:45:04 -04:00
Sebastian Beckmann
a759fa5aae mac-syphon: Use v2 of obs_properties_add_button
v1 of obs_properties_add_button will be deprecated soon.
2026-05-05 15:45:04 -04:00
Sebastian Beckmann
de0bc821ff win-dshow: Use v2 of obs_properties_add_button
v1 of obs_properties_add_button will be deprecated soon.
2026-05-05 15:45:04 -04:00
PatTheMav
7f164619e8 frontend: Enable use of delete key on macOS
While it is canonical to use the backspace key as an alternative to the
dedicated "delete" key (which is omitted on many smaller-sized Apple
keyboards), the delete key is still available on full-size Apple
keyboards and obviously third-party keyboards.

This change adds the delete key as an alternative to the backspace key
to allow removal of scene items from the scene list in the UI.
2026-05-05 15:11:09 -04:00
Ryan Foster
085a51ab0f frontend: Replace implicit "=" with "this" 2026-05-01 14:09:10 -04:00
Ryan Foster
852d9639f1 frontend: Fix includes in OBSUpdate
Some additional includes are required for C++20.
2026-05-01 14:09:10 -04:00
Ryan Foster
fb4d98bf88 libobs: Update version to 32.1.2 32.1.2 2026-04-21 15:00:34 -04:00
Warchamp7
6711295d99 frontend: Fix nested menu styling 2026-04-20 18:20:08 -04:00
Warchamp7
b34d17714e frontend: Optimize audio mixer updates 2026-04-20 17:54:47 -04:00
shiina424
cf1c425a94 frontend: Rename MixerScrollArea in the Classic theme 2026-04-16 14:51:40 -04:00
shiina424
78822293ff frontend: Remove unused parameters from Classic theme 2026-04-16 14:51:40 -04:00
shiina424
1b54407fd5 frontend: Remove unused parameters from System theme 2026-04-16 14:51:40 -04:00
shiina424
2475b85336 frontend: Remove unused parameters from Rachni theme 2026-04-16 14:51:40 -04:00
shiina424
787b62d7bf frontend: Remove unused parameters from Light theme 2026-04-16 14:51:40 -04:00
shiina424
ab9125ff54 frontend: Remove unused parameters from Acri theme 2026-04-16 14:51:40 -04:00
Joel Bethke
154088beef frontend: Fix contributing link in About
Fixes the link to the new contributing document, which is now .md and not .rst
2026-04-10 17:49:36 -07:00
Joel Bethke
90dda7e2b1 README.rst: Update contrib link and add codestyle
This updates the readme with the new contribution guidelines (.md instead of .rst), and adds a link to the code style guidelines.
2026-04-10 17:49:36 -07:00
Patrick Heyer
e04b883e4b Update contributing and code style guidelines (#13296) 2026-04-06 12:59:42 -05:00
Ryan Foster
7272af1375 libobs: Update version to 32.1.1 32.1.1 2026-04-02 14:21:16 -04:00
Ryan Foster
3a9cf4adb1 obs-websocket: Update version to 5.7.3
Fix a build issue with Clang 21.
2026-04-01 14:56:27 -04:00
pkv
68f5470d15 libobs: Monitoring deduplication fix for 'Desktop Audio' on monitor_only
When an Audio Output Capture source (AOC) like 'Desktop Audio' has
monitoring_type == OBS_MONITORING_TYPE_MONITOR_ONLY, deduplication
should not be triggered. this is an edge case which may not cover a
reasonable use case, but for the sake of completeness, we deal with it.

Signed-off-by: pkv <pkv@obsproject.com>
2026-04-01 14:29:25 -04:00