libobs: Add source type OBS_SOURCE_TYPE_SCENE
Helps identify a scene without having to compare its type name to "scene".
This commit is contained in:
parent
b0104fcee0
commit
e68331e988
@ -534,7 +534,7 @@ void obs_register_source_s(const struct obs_source_info *info, size_t size)
|
||||
array = &obs->filter_types.da;
|
||||
} else if (info->type == OBS_SOURCE_TYPE_TRANSITION) {
|
||||
array = &obs->transition_types.da;
|
||||
} else {
|
||||
} else if (info->type != OBS_SOURCE_TYPE_SCENE) {
|
||||
blog(LOG_ERROR, "Tried to register unknown source type: %u",
|
||||
info->type);
|
||||
goto error;
|
||||
|
@ -693,7 +693,7 @@ static bool scene_audio_render(void *data, uint64_t *ts_out,
|
||||
const struct obs_source_info scene_info =
|
||||
{
|
||||
.id = "scene",
|
||||
.type = OBS_SOURCE_TYPE_INPUT,
|
||||
.type = OBS_SOURCE_TYPE_SCENE,
|
||||
.output_flags = OBS_SOURCE_VIDEO |
|
||||
OBS_SOURCE_CUSTOM_DRAW |
|
||||
OBS_SOURCE_COMPOSITE,
|
||||
|
@ -35,6 +35,7 @@ enum obs_source_type {
|
||||
OBS_SOURCE_TYPE_INPUT,
|
||||
OBS_SOURCE_TYPE_FILTER,
|
||||
OBS_SOURCE_TYPE_TRANSITION,
|
||||
OBS_SOURCE_TYPE_SCENE,
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user