Skip to content

Fix event SourceFilterSettingsChanged not firing - #1346

Open
ruggi99 wants to merge 1 commit into
obsproject:masterfrom
ruggi99:fix-SourceFilterSettingsChanged-event
Open

ruggi99 wants to merge 1 commit into
obsproject:masterfrom
ruggi99:fix-SourceFilterSettingsChanged-event

Conversation

@ruggi99

@ruggi99 ruggi99 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes #1303. I've added subscription to update event for filters

Motivation and Context

This issue exists because filters are private by design.
https://github.com/obsproject/obs-studio/blob/30d3b89b3bd02c40ca55d071b2fd038a1c40caa6/libobs/obs-source.c#L436-L460

And, always by design, global/core signals are not fired for private sources
https://github.com/obsproject/obs-studio/blob/30d3b89b3bd02c40ca55d071b2fd038a1c40caa6/libobs/obs-internal.h#L1031-L1042

The solution is to subscribe to source(filter)'s signal update in order to fire the corresponding SourceFilterSettingsChanged event on websocket

How Has This Been Tested?

This PR has not been tested yet. I don't have knowledge to compile this code, only to understading a little bit.
Will test the artifact produced by CI

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have read the Contributing Guidelines.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • My code is not on master or a release/* branch.
  • The code has been tested.
  • I have included updates to all appropriate documentation.

@dinther

dinther commented Nov 6, 2026

Copy link
Copy Markdown

I built this PR on Windows against OBS 33.0.1 (obs-websocket 5.7.6, Visual Studio 2022) and it does not compile as submitted. Both new lines fail with error C3867: HandleSourceFilterSettingsChanged is a non-static member that takes an obs_source_t *, while signal_handler_connect needs a static callback of type void (*)(void *, calldata_t *).

The source update signal is declared as void update(ptr source), so its calldata carries the source, and the existing static SourceUpdatedMultiHandler already reads it and routes filters to HandleSourceFilterSettingsChanged. Connecting that one instead builds and works:

signal_handler_connect(sh, "update", SourceUpdatedMultiHandler, this);
signal_handler_disconnect(sh, "update", SourceUpdatedMultiHandler, this);

Tested with that change on Windows 11 and OBS 33.0.1: moving the opacity slider of a Color Correction filter in the OBS UI now sends SourceFilterSettingsChanged live, 196 events over one slider sweep, each with the correct sourceName, filterName and the changed settings. Without the change no event arrives at all, as described in #1303.

Our use case: we control OBS filters from hardware MIDI controllers through obs-websocket, and the controller has to follow changes made in OBS. Without this event the controller shows stale values.

@tt2468 tt2468 self-assigned this Nov 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: SourceFilterSettingsChanged does not fire

3 participants