提交 b9eef3c4 编写于 作者: J jp9000

libobs: Add API to get base source dimensions

These functions are primarily for use with filters, filters need to be
able to get the width/height of a target source without it necessarily
getting the post-filtered dimensions.
上级 506e30da
......@@ -1245,6 +1245,20 @@ uint32_t obs_source_get_height(obs_source_t *source)
get_base_height(source);
}
uint32_t obs_source_get_base_width(obs_source_t *source)
{
if (!source_valid(source)) return 0;
return get_base_width(source);
}
uint32_t obs_source_get_base_height(obs_source_t *source)
{
if (!source_valid(source)) return 0;
return get_base_height(source);
}
obs_source_t *obs_filter_get_parent(const obs_source_t *filter)
{
return filter ? filter->filter_parent : NULL;
......
......@@ -922,6 +922,12 @@ EXPORT void obs_source_send_key_click(obs_source_t *source,
/** Sets the default source flags. */
EXPORT void obs_source_set_default_flags(obs_source_t *source, uint32_t flags);
/** Gets the base width for a source (not taking in to account filtering) */
EXPORT uint32_t obs_source_get_base_width(obs_source_t *source);
/** Gets the base height for a source (not taking in to account filtering) */
EXPORT uint32_t obs_source_get_base_height(obs_source_t *source);
/* ------------------------------------------------------------------------- */
/* Scenes */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册