0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00

libobs: Add obs_obj_is_private()

Returns true if an obs object is considered private. (Author's note: the
concept of "private" objects is not ideal, but we're stuck with it for
now)
This commit is contained in:
jp9000 2021-04-06 11:54:37 -07:00
parent ca08df9fb2
commit 33c5563c1e
2 changed files with 10 additions and 0 deletions

View File

@ -2239,6 +2239,15 @@ void *obs_obj_get_data(void *obj)
return context->data; return context->data;
} }
bool obs_obj_is_private(void *obj)
{
struct obs_context_data *context = obj;
if (!context)
return false;
return context->private;
}
bool obs_set_audio_monitoring_device(const char *name, const char *id) bool obs_set_audio_monitoring_device(const char *name, const char *id)
{ {
if (!name || !id || !*name || !*id) if (!name || !id || !*name || !*id)

View File

@ -727,6 +727,7 @@ EXPORT enum obs_obj_type obs_obj_get_type(void *obj);
EXPORT const char *obs_obj_get_id(void *obj); EXPORT const char *obs_obj_get_id(void *obj);
EXPORT bool obs_obj_invalid(void *obj); EXPORT bool obs_obj_invalid(void *obj);
EXPORT void *obs_obj_get_data(void *obj); EXPORT void *obs_obj_get_data(void *obj);
EXPORT bool obs_obj_is_private(void *obj);
typedef bool (*obs_enum_audio_device_cb)(void *data, const char *name, typedef bool (*obs_enum_audio_device_cb)(void *data, const char *name,
const char *id); const char *id);