UI: Just use json directly for service lookups

This commit accomplishes three different things:

- Makes it much less difficult to communicate service settings
  between the UI and the plugin.

- Refactors some code and makes it cleaner and easier to modify to our
  needs (although there is still a lot of work to do on that front
  because of heavy code duplication issues between auto-config and the
  stream settings pane).

- Significantly reatly reduces the number of times the json file has to
  be opened and parsed.

This also kind of denotes a bit of a failure on the plugin communication
aspect. The properties system is too limited and jank for a lot of
things we would like to do at times.
This commit is contained in:
jp9000 committed 2022-04-14 02:10:49 -07:00
1 parent a4c215869f
commit 2fa5ffe4df
8 files changed
+178 -142

No files matched your search

+6
View File
@@ -41,6 +41,8 @@ class OBSHotkeyWidget;
#include "ui_OBSBasicSettings.h"
#include <json11.hpp>
#define VOLUME_METER_DECAY_FAST 23.53
#define VOLUME_METER_DECAY_MEDIUM 11.76
#define VOLUME_METER_DECAY_SLOW 8.57
@@ -107,6 +109,10 @@ private:
std::shared_ptr<Auth> auth;
inline void GetServicesJson();
json11::Json servicesRoot;
bool servicesLoaded = false;
bool generalChanged = false;
bool stream1Changed = false;
bool outputsChanged = false;