Skip to content

frontend: Add customizable service parameters - #1

Open
ghbogarin wants to merge 1 commit into
masterfrom
feature/add-customizable-service-parameters
Open

ghbogarin wants to merge 1 commit into
masterfrom
feature/add-customizable-service-parameters

Conversation

@ghbogarin

@ghbogarin ghbogarin commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR adds a Service Options group box to the Stream settings page that generically renders a service's own properties, so a plugin no longer needs frontend changes to expose its settings.

When the selected entry is a plugin-provided service type, OBSBasicSettings_Stream.cpp now builds an OBSPropertiesView from that service's get_properties and shows it below the existing Server / Stream Key rows. The following new methods achieve this:

  1. LoadServicePropertiesView creates the view, but only for a custom service type that actually has at least one custom property. Otherwise the group box stays hidden.
  2. ClearServicePropertiesView tears the view down and hides the group box when the selection changes.
  3. SeedServicePropertiesSettings seeds the view from obs_service_defaults, then overlays the currently configured service's saved settings when the selected type matches it, so the user sees their existing values.
  4. MergeServiceProperties merges the view's values back into the settings object on save.

Motivation and Context

obsproject#12991 makes a plugin's service appear in the services dropdown, but the Stream page could still only configure Server and Stream Key. Any service with settings of its own had nowhere to put them in the UI. That left plugins with the same problem obsproject#12991 solves for discovery: edit OBSBasicSettings_Stream.cpp to hardcode new fields.

How Has This Been Tested?

Tested on macOS Tahoe.

  • Verified that a plugin service declaring extra properties shows them in the Service Options group box, and that properties named in the reserved list are filtered out instead of appearing twice.
  • Verified that the group box stays hidden for rtmp_common and other similar services.
  • Verified that values persist across an OK / reopen cycle, including a property left at its default.
  • Verified that the reserved keys in the saved service settings come from the Stream page's own fields and are not overwritten by the property view.
  • Verified that editing properties and then switching to a different service before saving does not leak the previous service's keys into the saved settings.
  • Verified that switching back and forth between services rebuilds the group box cleanly, with no stacked views or duplicated rows.
  • Regression checked WHIP, standard RTMP services (Twitch), etc, for saving, loading, and starting a stream.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Tweak (non-breaking change to improve existing functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to documentation pages)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

This change is Reviewable

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.

2 participants