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:
@@ -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