mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-18 04:04:42 -04:00
libobs: Add "monitoring by default" source cap
(This also modifies the UI module) Adds the ability for a source to monitor by default. This is mainly aimed at browser sources, so that they do not stop outputting audio by default like they used to.
This commit is contained in:
1 parent
916d89a73b
commit
aee84cc743
3 files changed
+29
No files matched your search
@@ -197,6 +197,14 @@ bool AddNew(QWidget *parent, const char *id, const char *name,
|
||||
|
||||
newSource = source;
|
||||
|
||||
/* set monitoring if source monitors by default */
|
||||
uint32_t flags = obs_source_get_output_flags(source);
|
||||
if ((flags & OBS_SOURCE_MONITOR_BY_DEFAULT) != 0) {
|
||||
obs_source_set_monitoring_type(
|
||||
source,
|
||||
OBS_MONITORING_TYPE_MONITOR_ONLY);
|
||||
}
|
||||
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user