提交 e68331e9 编写于 作者: J jp9000

libobs: Add source type OBS_SOURCE_TYPE_SCENE

Helps identify a scene without having to compare its type name to
"scene".
上级 b0104fce
......@@ -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,
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册