(API Change) Unsquish libobs API callback names

Renamed:                    To:
-------------------------------------------------------
obs_source_info::getname    obs_source_info::get_name
obs_source_info::getwidth   obs_source_info::get_width
obs_source_info::getheight  obs_source_info::get_height
obs_output_info::getname    obs_output_info::get_name
obs_encoder_info::getname   obs_encoder_info::get_name
obs_service_info::getname   obs_service_info::get_name
This commit is contained in:
jp9000
2014-08-04 14:38:26 -07:00
parent a3682fc8fb
commit c83d05117f
33 changed files with 83 additions and 83 deletions

View File

@@ -33,7 +33,7 @@ struct obs_encoder_info *find_encoder(const char *id)
const char *obs_encoder_get_display_name(const char *id)
{
struct obs_encoder_info *ei = find_encoder(id);
return ei ? ei->getname() : NULL;
return ei ? ei->get_name() : NULL;
}
static bool init_encoder(struct obs_encoder *encoder, const char *name,

View File

@@ -104,7 +104,7 @@ struct obs_encoder_info {
*
* @return Translated name of the encoder
*/
const char *(*getname)(void);
const char *(*get_name)(void);
/**
* Creates the encoder with the specified settings

View File

@@ -450,15 +450,15 @@ void obs_register_source_s(const struct obs_source_info *info, size_t size)
return;
}
CHECK_REQUIRED_VAL(info, getname, obs_register_source);
CHECK_REQUIRED_VAL(info, create, obs_register_source);
CHECK_REQUIRED_VAL(info, destroy, obs_register_source);
CHECK_REQUIRED_VAL(info, get_name, obs_register_source);
CHECK_REQUIRED_VAL(info, create, obs_register_source);
CHECK_REQUIRED_VAL(info, destroy, obs_register_source);
if (info->type == OBS_SOURCE_TYPE_INPUT &&
(info->output_flags & OBS_SOURCE_VIDEO) != 0 &&
(info->output_flags & OBS_SOURCE_ASYNC) == 0) {
CHECK_REQUIRED_VAL(info, getwidth, obs_register_source);
CHECK_REQUIRED_VAL(info, getheight, obs_register_source);
CHECK_REQUIRED_VAL(info, get_width, obs_register_source);
CHECK_REQUIRED_VAL(info, get_height, obs_register_source);
}
memcpy(&data, info, size);
@@ -474,11 +474,11 @@ void obs_register_output_s(const struct obs_output_info *info, size_t size)
return;
}
CHECK_REQUIRED_VAL(info, getname, obs_register_output);
CHECK_REQUIRED_VAL(info, create, obs_register_output);
CHECK_REQUIRED_VAL(info, destroy, obs_register_output);
CHECK_REQUIRED_VAL(info, start, obs_register_output);
CHECK_REQUIRED_VAL(info, stop, obs_register_output);
CHECK_REQUIRED_VAL(info, get_name, obs_register_output);
CHECK_REQUIRED_VAL(info, create, obs_register_output);
CHECK_REQUIRED_VAL(info, destroy, obs_register_output);
CHECK_REQUIRED_VAL(info, start, obs_register_output);
CHECK_REQUIRED_VAL(info, stop, obs_register_output);
if (info->flags & OBS_OUTPUT_ENCODED) {
CHECK_REQUIRED_VAL(info, encoded_packet, obs_register_output);
@@ -503,10 +503,10 @@ void obs_register_encoder_s(const struct obs_encoder_info *info, size_t size)
return;
}
CHECK_REQUIRED_VAL(info, getname, obs_register_encoder);
CHECK_REQUIRED_VAL(info, create, obs_register_encoder);
CHECK_REQUIRED_VAL(info, destroy, obs_register_encoder);
CHECK_REQUIRED_VAL(info, encode, obs_register_encoder);
CHECK_REQUIRED_VAL(info, get_name, obs_register_encoder);
CHECK_REQUIRED_VAL(info, create, obs_register_encoder);
CHECK_REQUIRED_VAL(info, destroy, obs_register_encoder);
CHECK_REQUIRED_VAL(info, encode, obs_register_encoder);
if (info->type == OBS_ENCODER_AUDIO)
CHECK_REQUIRED_VAL(info, frame_size, obs_register_encoder);
@@ -522,9 +522,9 @@ void obs_register_service_s(const struct obs_service_info *info, size_t size)
return;
}
CHECK_REQUIRED_VAL(info, getname, obs_register_service);
CHECK_REQUIRED_VAL(info, create, obs_register_service);
CHECK_REQUIRED_VAL(info, destroy, obs_register_service);
CHECK_REQUIRED_VAL(info, get_name, obs_register_service);
CHECK_REQUIRED_VAL(info, create, obs_register_service);
CHECK_REQUIRED_VAL(info, destroy, obs_register_service);
REGISTER_OBS_DEF(size, obs_service_info, obs->service_types, info);
}

View File

@@ -34,7 +34,7 @@ const struct obs_output_info *find_output(const char *id)
const char *obs_output_get_display_name(const char *id)
{
const struct obs_output_info *info = find_output(id);
return (info != NULL) ? info->getname() : NULL;
return (info != NULL) ? info->get_name() : NULL;
}
static const char *output_signals[] = {

View File

@@ -31,7 +31,7 @@ struct obs_output_info {
uint32_t flags;
const char *(*getname)(void);
const char *(*get_name)(void);
void *(*create)(obs_data_t settings, obs_output_t output);
void (*destroy)(void *data);

View File

@@ -438,18 +438,18 @@ static uint32_t scene_getheight(void *data)
const struct obs_source_info scene_info =
{
.id = "scene",
.type = OBS_SOURCE_TYPE_INPUT,
.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW,
.getname = scene_getname,
.create = scene_create,
.destroy = scene_destroy,
.video_render = scene_video_render,
.getwidth = scene_getwidth,
.getheight = scene_getheight,
.load = scene_load,
.save = scene_save,
.enum_sources = scene_enum_sources
.id = "scene",
.type = OBS_SOURCE_TYPE_INPUT,
.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_CUSTOM_DRAW,
.get_name = scene_getname,
.create = scene_create,
.destroy = scene_destroy,
.video_render = scene_video_render,
.get_width = scene_getwidth,
.get_height = scene_getheight,
.load = scene_load,
.save = scene_save,
.enum_sources = scene_enum_sources
};
obs_scene_t obs_scene_create(const char *name)

View File

@@ -30,7 +30,7 @@ const struct obs_service_info *find_service(const char *id)
const char *obs_service_get_display_name(const char *id)
{
const struct obs_service_info *info = find_service(id);
return (info != NULL) ? info->getname() : NULL;
return (info != NULL) ? info->get_name() : NULL;
}
obs_service_t obs_service_create(const char *id, const char *name,

View File

@@ -21,7 +21,7 @@ struct obs_service_info {
/* required */
const char *id;
const char *(*getname)(void);
const char *(*get_name)(void);
void *(*create)(obs_data_t settings, obs_service_t service);
void (*destroy)(void *data);

View File

@@ -99,7 +99,7 @@ const char *obs_source_get_display_name(enum obs_source_type type,
const char *id)
{
const struct obs_source_info *info = get_source_info(type, id);
return (info != NULL) ? info->getname() : NULL;
return (info != NULL) ? info->get_name() : NULL;
}
/* internal initialization */
@@ -1115,8 +1115,8 @@ uint32_t obs_source_get_width(obs_source_t source)
{
if (!source_valid(source)) return 0;
if (source->info.getwidth)
return source->info.getwidth(source->context.data);
if (source->info.get_width)
return source->info.get_width(source->context.data);
return source->async_width;
}
@@ -1124,8 +1124,8 @@ uint32_t obs_source_get_height(obs_source_t source)
{
if (!source_valid(source)) return 0;
if (source->info.getheight)
return source->info.getheight(source->context.data);
if (source->info.get_height)
return source->info.get_height(source->context.data);
return source->async_height;
}

View File

@@ -120,7 +120,7 @@ struct obs_source_info {
*
* @return The translated name of the source type
*/
const char *(*getname)(void);
const char *(*get_name)(void);
/**
* Creates the source data for the source
@@ -141,11 +141,11 @@ struct obs_source_info {
/** Returns the width of the source. Required if this is an input
* source and has non-async video */
uint32_t (*getwidth)(void *data);
uint32_t (*get_width)(void *data);
/** Returns the height of the source. Required if this is an input
* source and has non-async video */
uint32_t (*getheight)(void *data);
uint32_t (*get_height)(void *data);
/* ----------------------------------------------------------------- */
/* Optional implementation */