(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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user