|
|
@@ -722,14 +722,18 @@ obs_data_t *obs_get_source_defaults(const char *id)
|
|
|
obs_properties_t *obs_get_source_properties(const char *id)
|
|
|
{
|
|
|
const struct obs_source_info *info = get_source_info(id);
|
|
|
- if (info && info->get_properties) {
|
|
|
+ if (info && (info->get_properties || info->get_properties2)) {
|
|
|
obs_data_t *defaults = get_defaults(info);
|
|
|
- obs_properties_t *properties;
|
|
|
+ obs_properties_t *props;
|
|
|
+
|
|
|
+ if (info->get_properties2)
|
|
|
+ props = info->get_properties2(NULL, info->type_data);
|
|
|
+ else
|
|
|
+ props = info->get_properties(NULL);
|
|
|
|
|
|
- properties = info->get_properties(NULL);
|
|
|
- obs_properties_apply_settings(properties, defaults);
|
|
|
+ obs_properties_apply_settings(props, defaults);
|
|
|
obs_data_release(defaults);
|
|
|
- return properties;
|
|
|
+ return props;
|
|
|
}
|
|
|
return NULL;
|
|
|
}
|
|
|
@@ -737,13 +741,13 @@ obs_properties_t *obs_get_source_properties(const char *id)
|
|
|
bool obs_is_source_configurable(const char *id)
|
|
|
{
|
|
|
const struct obs_source_info *info = get_source_info(id);
|
|
|
- return info && info->get_properties;
|
|
|
+ return info && (info->get_properties || info->get_properties2);
|
|
|
}
|
|
|
|
|
|
bool obs_source_configurable(const obs_source_t *source)
|
|
|
{
|
|
|
return data_valid(source, "obs_source_configurable") &&
|
|
|
- source->info.get_properties;
|
|
|
+ (source->info.get_properties || source->info.get_properties2);
|
|
|
}
|
|
|
|
|
|
obs_properties_t *obs_source_properties(const obs_source_t *source)
|
|
|
@@ -751,7 +755,14 @@ obs_properties_t *obs_source_properties(const obs_source_t *source)
|
|
|
if (!data_valid(source, "obs_source_properties"))
|
|
|
return NULL;
|
|
|
|
|
|
- if (source->info.get_properties) {
|
|
|
+ if (source->info.get_properties2) {
|
|
|
+ obs_properties_t *props;
|
|
|
+ props = source->info.get_properties2(source->context.data,
|
|
|
+ source->info.type_data);
|
|
|
+ obs_properties_apply_settings(props, source->context.settings);
|
|
|
+ return props;
|
|
|
+
|
|
|
+ } else if (source->info.get_properties) {
|
|
|
obs_properties_t *props;
|
|
|
props = source->info.get_properties(source->context.data);
|
|
|
obs_properties_apply_settings(props, source->context.settings);
|