(API Change) Split obs_source_gettype

Changed:
- obs_source_gettype
To:
- enum obs_source_type obs_source_get_type(obs_source_t source);
- const char *obs_source_get_id(obs_source_t source);

This function was inconsistent for a number of reasons.  First, it
returns both the ID and the type of source (input/transition/filter),
which is inconsistent with the name of "get type".  Secondly, the
'squishy' naming convention which has just turned out to be bad
practice and causes inconsistencies.  So it's now replaced with two
functions that just return the type and the ID.
This commit is contained in:
jp9000
2014-08-02 12:42:47 -07:00
parent 0961af6e66
commit e42af67128
5 changed files with 17 additions and 23 deletions

View File

@@ -1204,12 +1204,10 @@ obs_data_t obs_save_source(obs_source_t source)
obs_data_t settings = obs_source_getsettings(source);
float volume = obs_source_getvolume(source);
const char *name = obs_source_getname(source);
const char *id;
const char *id = obs_source_get_id(source);
obs_source_save(source);
obs_source_gettype(source, NULL, &id);
obs_data_setstring(source_data, "name", name);
obs_data_setstring(source_data, "id", id);
obs_data_setobj (source_data, "settings", settings);