(API Change) libobs: Pass type data to get_name callbacks

API changed from:
obs_source_info::get_name(void)
obs_output_info::get_name(void)
obs_encoder_info::get_name(void)
obs_service_info::get_name(void)

API changed to:
obs_source_info::get_name(void *type_data)
obs_output_info::get_name(void *type_data)
obs_encoder_info::get_name(void *type_data)
obs_service_info::get_name(void *type_data)

This allows the type data to be used when getting the name of the
object (useful for plugin wrappers primarily).

NOTE: Though a parameter was added, this is backward-compatible with
older plugins due to calling convention.  The new parameter will simply
be ignored by older plugins, and the stack (if used) will be cleaned up
by the caller.
This commit is contained in:
jp9000
2015-09-16 01:30:51 -07:00
parent 0ed913a136
commit 6285a47726
52 changed files with 98 additions and 58 deletions

View File

@@ -33,8 +33,9 @@ struct async_delay_data {
bool reset_audio;
};
static const char *async_delay_filter_name(void)
static const char *async_delay_filter_name(void *unused)
{
UNUSED_PARAMETER(unused);
return obs_module_text("AsyncDelayFilter");
}

View File

@@ -52,8 +52,9 @@ struct chroma_key_filter_data {
float spill;
};
static const char *chroma_key_name(void)
static const char *chroma_key_name(void *unused)
{
UNUSED_PARAMETER(unused);
return obs_module_text("ChromaKeyFilter");
}

View File

@@ -34,8 +34,9 @@ struct color_filter_data {
float gamma;
};
static const char *color_filter_name(void)
static const char *color_filter_name(void *unused)
{
UNUSED_PARAMETER(unused);
return obs_module_text("ColorFilter");
}

View File

@@ -45,8 +45,9 @@ struct color_key_filter_data {
float smoothness;
};
static const char *color_key_name(void)
static const char *color_key_name(void *unused)
{
UNUSED_PARAMETER(unused);
return obs_module_text("ColorKeyFilter");
}

View File

@@ -19,8 +19,9 @@ struct crop_filter_data {
bool absolute;
};
static const char *crop_filter_get_name(void)
static const char *crop_filter_get_name(void *unused)
{
UNUSED_PARAMETER(unused);
return obs_module_text("CropFilter");
}

View File

@@ -19,8 +19,9 @@ struct gain_data {
float multiple;
};
static const char *gain_name(void)
static const char *gain_name(void *unused)
{
UNUSED_PARAMETER(unused);
return obs_module_text("Gain");
}

View File

@@ -22,8 +22,9 @@ struct mask_filter_data {
struct vec4 color;
};
static const char *mask_filter_get_name(void)
static const char *mask_filter_get_name(void *unused)
{
UNUSED_PARAMETER(unused);
return obs_module_text("MaskFilter");
}

View File

@@ -44,8 +44,9 @@ struct noise_gate_data {
#define VOL_MIN -96.0f
#define VOL_MAX 0.0f
static const char *noise_gate_name(void)
static const char *noise_gate_name(void *unused)
{
UNUSED_PARAMETER(unused);
return obs_module_text("NoiseGate");
}

View File

@@ -18,8 +18,9 @@ struct scroll_filter_data {
struct vec2 offset;
};
static const char *scroll_filter_get_name(void)
static const char *scroll_filter_get_name(void *unused)
{
UNUSED_PARAMETER(unused);
return obs_module_text("ScrollFilter");
}

View File

@@ -14,8 +14,9 @@ struct sharpness_data {
float texwidth, texheight;
};
static const char *sharpness_getname(void)
static const char *sharpness_getname(void *unused)
{
UNUSED_PARAMETER(unused);
return obs_module_text("SharpnessFilter");
}