(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

@@ -60,8 +60,9 @@ static inline void update_settings(struct duplicator_capture *capture,
/* ------------------------------------------------------------------------- */
static const char *duplicator_capture_getname(void)
static const char *duplicator_capture_getname(void *unused)
{
UNUSED_PARAMETER(unused);
return TEXT_MONITOR_CAPTURE;
}

View File

@@ -1369,8 +1369,9 @@ static uint32_t game_capture_height(void *data)
return gc->active ? gc->global_hook_info->cy : 0;
}
static const char *game_capture_name(void)
static const char *game_capture_name(void *unused)
{
UNUSED_PARAMETER(unused);
return TEXT_GAME_CAPTURE;
}

View File

@@ -88,8 +88,9 @@ static inline void update_settings(struct monitor_capture *capture,
/* ------------------------------------------------------------------------- */
static const char *monitor_capture_getname(void)
static const char *monitor_capture_getname(void *unused)
{
UNUSED_PARAMETER(unused);
return TEXT_MONITOR_CAPTURE;
}

View File

@@ -50,8 +50,9 @@ static void update_settings(struct window_capture *wc, obs_data_t *s)
/* ------------------------------------------------------------------------- */
static const char *wc_getname(void)
static const char *wc_getname(void *unused)
{
UNUSED_PARAMETER(unused);
return TEXT_WINDOW_CAPTURE;
}