3167 Commits
Author SHA1 Message Date
prgmitchell 3dca8cd8cd libobs/graphics: Restore image memory usage tracking
Pass the image memory counter to the internal initializer so legacy
slideshows enforce their 400mb limit.

Amends c3046ec172.
Amends f86e9c1d59.
2026-10-27 14:21:36 -04:00
Exeldro 822851a2e9 libobs: Fix obs_canvas_reset_video when other canvas is active 2026-10-08 15:11:05 -04:00
tytan652 c5bcbca63f libobs: Add PIC to obs-core-modules
Since the object provides functions, position independent code needs to
be enabled.
2026-10-05 17:50:18 -04:00
Ryan Foster 57a58b4a5d libobs: Increase minimum FFmpeg version to 8.0 2026-10-02 15:52:04 -04:00
FiniteSingularity d20b4698ca cmake: Make obs-core-modules header public
This PR makes the obs-core-modules.h header public to remain consistent
with other headers in the libobs/cmake directory.
2026-10-01 16:51:49 -04:00
Warchamp7 7549b8710e libobs: Fix data for updated monitoring
Fixed incorrectly saving this bool value as an int.

Fixed the incorrect settings key being used when loading the source.
2026-09-30 13:40:45 -04:00
Ryan Foster a6f7ef68a2 libobs: Update version to 33.0.0 2026-09-24 20:23:16 -04:00
FiniteSingularityandPatTheMav 11a8445aa4 frontend: Update app module loading behavior
With this change module loading in the application is managed by the
plugin manager and allows the application to explicitly load core
modules independantly from 3rd party (plugin) modules.

The implementation is split into separate files for different platforms
to allow for cleaner code handling the different possible locations and
path schemes used, including all possible legacy locations and plugin
bundle formats.

This change introduces new locations and directory formats for plugins:
* WINDOWS: Portable plugins need to be placed in a directory called
  "plugins" adjacent to the "bin" directory of an OBS Studio
  installation.
* WINDOWS: Plugins need to be packaged into their own directory
  "bundles", with the associated DLL in the root of the bundle and the
  associated "data" directory next to it.
* WINDOWS: The "obs-plugins" directory adjacent to the "bin" directory
  is deprecated and considered a legacy location for all plugins.
* MACOS: No changes in locations or formats.
* LINUX: Plugins distributed via system package managers now need to use
  the "obs-modules/plugins" directory in the system library directory
  for binaries, and the "obs/obs-modules/plugins" directory in the
  system data directory for resources.
* LINUX: The "obs-plugins" directories in the system library and system
  data directories are deprecated.
* LINUX: Plugins distributed outside of system packages need to use the
  same directory format as plugins for Windows (see above).
* LINUX: A "portable" plugin location like on Windows is not supported.
* LINUX: Proper XDG directory locations are scanned for plugins, using
  XDG_CONFIG_HOME for the legacy plugin format and XDG_DATA_HOME for the
  new plugin structure.
* LINUX: Changes Flatpak plugin loading to use the new plugin structure
  (while still supporting the legacy structure), and moves Flatpak
  specific plugin loading to its own source files.
* ALL PLATFORMS: A single environment variable "OBS_PLUGINS_PATH" can
  now be used to provide a highest-priority location from which to load
  plugins. This directory needs to contain plugin bundles per the new
  format. The one exception is Flatpak which does not support loading
  plugins from an env provided location.
* ALL PLATFORMS: A custom legacy plugin locations can still be provided
  via the "OBS_LEGACY_PLUGINS_PATH" and "OBS_LEGACY_PLUGINS_DATA_PATH"
  environment variables. These are only compatible with plugins using
  the legacy format and are considered deprecated. The one exception is
  Flatpak which does not support loading plugins from an env provided
  location.

Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
2026-09-23 18:53:19 -04:00
FiniteSingularityandPatTheMav 23bba4413b libobs: Add core module loading functionality
Adds a separate code path just for loading core modules based on the
list of modules created at build system generation. Paths to load core
modules from is platform-specific, but not changeable for users and is
thus not changeable by a caller.

Instead path discovery is implemented for each platform separately,
generating the necessary module loading package directly before handing
it over to the existing module load callback function.

Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
2026-09-23 18:53:19 -04:00
FiniteSingularityandPatTheMav 4ab64d00d0 cmake: Change name of core module output directory
Moves first-party runtime modules into the "core" directory rather than
the "obs-plugins" directory to better differentiate them from legacy
plugins as well as existing 3rd-party plugins.

This change also requires the existing plugin directory to be explicitly
added as a possible module search path by application logic, as libobs's
internal logic will not add this path anymore and thus third-party
plugins would not be discovered anymore.

Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
2026-09-23 18:53:19 -04:00
FiniteSingularityandPatTheMav cca82c7156 cmake: Add concept of "core" modules
Core modules are main OBS Studio functionality implemented as runtime
modules, but are conceptually considered mandatory and the application
is incomplete without them.

This change also introduces a configure-time dependency of core modules
on "libobs" (already a generation-time dependency) and produces a
library target with the names of all core modules available at build
system generation.

Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
2026-09-23 18:53:19 -04:00
Wu Haoyu 1bb3a4ee73 libobs: Make sure all code paths leave context
Should always call `gs_leave_context` after `gs_enter_context` or it
might cause a lock leave.

This commit makes sure all code paths will call `gs_leave_context` if
it called `gs_enter_context`.
2026-09-18 18:03:26 -04:00
Warchamp7 8126df7cd0 libobs: Create unique groups when duplicating scene 2026-09-10 13:45:26 -04:00
tt2468 0fd12618e0 libobs: Only emit core signal handlers for public canvases
Amends behavior to match other notable object types like sources
2026-09-01 15:08:37 -04:00
tt2468 dbdcf562fb libobs: Change canvas signal param name to signal_canvas
Just a nitpick, as `signal_source` is a copy/paste from obs-source
2026-09-01 15:08:37 -04:00
prgmitchell 6785d7d3a9 libobs: Fix monitoring hotkey UI updates
Send the monitor signal first because initializing compat_data
overwrites the same buffer, causing the monitor value to always be
false.
2026-09-01 14:29:15 -04:00
tytan652 ff31948d80 libobs: Free monitor hotkeys translations 2026-09-01 13:54:49 -04:00
Exeldro 4315559a09 libobs: Fix deadlock on executing tasks 2026-09-01 13:27:28 -04:00
Warchamp7 22e2b73716 libobs, frontend: Add monitoring hotkeys 2026-08-24 14:55:40 -04:00
Warchamp7 646836a311 libobs, frontend: Deprecate source monitoring_type 2026-08-24 14:55:40 -04:00
Richard Stanway 6d0083dd61 libobs, docs: Document intended use of obs_module_unload
obs_module_unload was never properly documented, so some plugins use it
to free resources, some use it to save data, etc. While libobs tries to
ensure all objects are shut down and destroyed before calling unload, if
another plugin is holding a strong reference, or if a reference leak has
occurred, libobs may need to call back into a plugin-provided object's
destroy function even after obs_module_unload has returned. If the
plugin has freed memory or other resources needed for the callback then
this likely results in a crash.

Going forward, we should document that obs_module_unload is now intended
only for saving data and releasing references, and that calling libobs
after it returns is not allowed. For cases where resource cleanup is
actually needed (for example, an external out of process helper needs to
be shut down or a release call to a hardware driver), a new
obs_module_destroy callback is intended to be added in a future version.
2026-08-22 16:03:18 -04:00
Lain c3046ec172 libobs/graphics: Break image file API to prevent ABI issues 2026-08-21 15:43:20 -04:00
Norihiro Kamae f5f55777bb libobs/graphics: Hide GIF decoding data from exported header file 2026-08-21 15:43:20 -04:00
Ryan Foster e0027ee4a3 libobs/graphics: Update libnsgif to 1.0.0 2026-08-21 15:43:19 -04:00
Penwywern 4cc9c4466c libobs: Ensure module exists before getting locale string 2026-08-20 18:25:04 -04:00
FiniteSingularity b790a32b2e libobs: Fix file filter for save file path widget 2026-08-20 17:55:08 -04:00
derrod cc6c7629fd libobs: Deprecate source hiding 2026-08-20 17:26:22 -04:00
Ryan Foster 1bf1379faa libobs: Update version to 32.2.2 2026-08-14 16:57:12 -04:00
Ryan Foster 0052d024fd libobs: Update version to 32.2.1 2026-07-24 17:49:25 -04:00
Ryan Foster f76ad4989d libobs: Update version to 32.2.0 2026-06-19 19:41:04 -04:00
Warchamp7 e8a8ac5451 libobs: Output monitor audio while muted 2026-06-17 16:34:16 -04:00
PatTheMav 4969a4f5a3 libobs: Apply clang-format 22 formatting 2026-06-17 15:17:09 -04:00
PatTheMav 426c594513 libobs: Force C language for clang-format 2026-06-17 15:17:09 -04:00
Warchamp7 30b63c6849 Update C++ files with braces 2026-06-09 13:41:19 -04:00
Richard Stanway 8801dbef06 libobs: Avoid calling SetDllDirectory when looking for dependent DLLs
Using the full path and appropriate LoadLibraryEx flags is safer as it
gives us more control over the search paths.
2026-06-05 15:27:30 -04:00
Alex Luccisano edbe74b2b5 libobs: Add multitrack dynamic bitrate capability
The `OBS_ENCODER_CAP_DYN_BITRATE` flag indicates if an encoder is
capable of supporting dynamic bitrate changes without disturbing
the stream. In the case of multitrack video, dynamic bitrate changes
are also possible, however the encoder must be able to change bitrates
for multiple renditions and multiple codecs and maintain IDR alignment.
Add the `OBS_ENCODER_CAP_MULTITRACK_DYN_BITRATE` to specify this
capability for the encoder.
2026-06-05 14:11:55 -04:00
Ruwen Hahn dd1e93f1ab libobs: Refactor encoder_group access
Also reconfigure all grouped encoders on the same frame.
2026-06-05 14:11:55 -04:00
Dennis Sädtler 888a5160fa libobs: Adjust obs_canvas_get_video_info() to get video info from mix
This aligns obs_canvas_get_video_info() and obs_get_video_info() and
ensures the frame-rate is correct rather than returning the
potentially stale data stored in the canvas itself.
2026-05-19 15:24:09 -04: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
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
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
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
Exeldro 6f5d00ca71 libobs/graphics: Add support for param assign with type constructor 2026-05-07 12:03:01 -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
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
Ryan Foster fb4d98bf88 libobs: Update version to 32.1.2 2026-04-21 15:00:34 -04:00
Ryan Foster 7272af1375 libobs: Update version to 32.1.1 2026-04-02 14:21:16 -04:00