mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 04:42:18 +02:00
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.
This commit is contained in:
parent
506e30da10
commit
b9eef3c4f2
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user