mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 04:42:18 +02:00
libobs: Add functions to get private type data
The private type data is the type_data variable that's provided when object types are registered by plugins.
This commit is contained in:
parent
7920668e56
commit
0ed913a136
@ -932,3 +932,9 @@ bool obs_weak_encoder_references_encoder(obs_weak_encoder_t *weak,
|
||||
{
|
||||
return weak && encoder && weak->encoder == encoder;
|
||||
}
|
||||
|
||||
void *obs_encoder_get_type_data(obs_encoder_t *encoder)
|
||||
{
|
||||
return obs_encoder_valid(encoder, "obs_encoder_get_type_data")
|
||||
? encoder->info.type_data : NULL;
|
||||
}
|
||||
|
@ -1506,3 +1506,9 @@ bool obs_weak_output_references_output(obs_weak_output_t *weak,
|
||||
{
|
||||
return weak && output && weak->output == output;
|
||||
}
|
||||
|
||||
void *obs_output_get_type_data(obs_output_t *output)
|
||||
{
|
||||
return obs_output_valid(output, "obs_output_get_type_data")
|
||||
? output->info.type_data : NULL;
|
||||
}
|
||||
|
@ -334,3 +334,9 @@ bool obs_weak_service_references_service(obs_weak_service_t *weak,
|
||||
{
|
||||
return weak && service && weak->service == service;
|
||||
}
|
||||
|
||||
void *obs_service_get_type_data(obs_service_t *service)
|
||||
{
|
||||
return obs_service_valid(service, "obs_service_get_type_data")
|
||||
? service->info.type_data : NULL;
|
||||
}
|
||||
|
@ -3070,3 +3070,9 @@ void obs_source_set_push_to_talk_delay(obs_source_t *source, uint64_t delay)
|
||||
source_signal_push_to_delay(source, "push_to_talk_delay", delay);
|
||||
pthread_mutex_unlock(&source->audio_mutex);
|
||||
}
|
||||
|
||||
void *obs_source_get_type_data(obs_source_t *source)
|
||||
{
|
||||
return obs_source_valid(source, "obs_source_get_type_data")
|
||||
? source->info.type_data : NULL;
|
||||
}
|
||||
|
@ -886,6 +886,8 @@ EXPORT void obs_source_set_push_to_talk_delay(obs_source_t *source,
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Functions used by sources */
|
||||
|
||||
EXPORT void *obs_source_get_type_data(obs_source_t *source);
|
||||
|
||||
/**
|
||||
* Helper function to set the color matrix information when drawing the source.
|
||||
*
|
||||
@ -1306,6 +1308,8 @@ EXPORT uint32_t obs_output_get_height(const obs_output_t *output);
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Functions used by outputs */
|
||||
|
||||
EXPORT void *obs_output_get_type_data(obs_output_t *output);
|
||||
|
||||
/** Optionally sets the video conversion info. Used only for raw output */
|
||||
EXPORT void obs_output_set_video_conversion(obs_output_t *output,
|
||||
const struct video_scale_info *conversion);
|
||||
@ -1485,6 +1489,8 @@ EXPORT audio_t *obs_encoder_audio(const obs_encoder_t *encoder);
|
||||
/** Returns true if encoder is active, false otherwise */
|
||||
EXPORT bool obs_encoder_active(const obs_encoder_t *encoder);
|
||||
|
||||
EXPORT void *obs_encoder_get_type_data(obs_encoder_t *encoder);
|
||||
|
||||
/** Duplicates an encoder packet */
|
||||
EXPORT void obs_duplicate_encoder_packet(struct encoder_packet *dst,
|
||||
const struct encoder_packet *src);
|
||||
@ -1562,6 +1568,8 @@ EXPORT void obs_service_apply_encoder_settings(obs_service_t *service,
|
||||
obs_data_t *video_encoder_settings,
|
||||
obs_data_t *audio_encoder_settings);
|
||||
|
||||
EXPORT void *obs_service_get_type_data(obs_service_t *service);
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Source frame allocation functions */
|
||||
|
Loading…
Reference in New Issue
Block a user