Exemple #1
0
obs_hotkey_id obs_hotkey_register_source(obs_source_t *source, const char *name,
		const char *description, obs_hotkey_func func, void *data)
{
	if (!source || !lock())
		return OBS_INVALID_HOTKEY_ID;

	obs_hotkey_id id = obs_hotkey_register_internal(
			OBS_HOTKEY_REGISTERER_SOURCE,
			obs_source_get_weak_source(source),
			&source->context, name, description,
			func, data);

	unlock();
	return id;
}
Exemple #2
0
inline OBSWeakSource OBSGetWeakRef(obs_source_t *source)
{
	return {obs_source_get_weak_source(source),
		OBSWeakSource::TakeOwnership()};
}
Exemple #3
0
static inline void *weak_source_ref(void *ref)
{
	return obs_source_get_weak_source(ref);
}