inputTypes property
Get a list of input types.
Returns array of dictionaries with keys id
and name
.
Implementation
List<Map<String, String>> get inputTypes {
int idx = 0;
final List<Map<String, String>> list = [];
ffi.Pointer<ffi.Pointer<ffi.Int8>> typeId = calloc();
ffi.Pointer<ffi.Pointer<ffi.Int8>> unversionedTypeId = calloc();
while (_lib.obs_enum_input_types2(idx++, typeId, unversionedTypeId) != 0) {
final name = _lib.obs_source_get_display_name(typeId.value);
final caps = _lib.obs_get_source_output_flags(typeId.value);
if ((caps & OBS_SOURCE_CAP_DISABLED) != 0) continue;
bool deprecated = (caps & OBS_SOURCE_DEPRECATED) != 0;
if (deprecated) {
} else {}
list.add({
"id": StringExtensions.fromInt8(unversionedTypeId.value) ?? '',
"name": StringExtensions.fromInt8(name) ?? ''
});
}
calloc.free(typeId);
calloc.free(unversionedTypeId);
list.add({"id": "scene", "name": "Scene"});
return list;
}