Skip to content

Commit

Permalink
clang-format file
Browse files Browse the repository at this point in the history
  • Loading branch information
Brycero committed Nov 20, 2024
1 parent 7393af1 commit 9d65f01
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions src/ocr-filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,27 +272,29 @@ obs_properties_t *ocr_filter_properties(void *data)
// add option to "flatten" the output text to a single line
obs_properties_add_bool(props, "output_flatten", obs_module_text("OutputFlatten"));

// Add a property for the output text source
obs_property_t *text_sources = obs_properties_add_list(
props, "text_sources", obs_module_text("OutputTextSource"),
OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);

obs_enum_sources([](void *data, obs_source_t *source) -> bool {
obs_property_t *text_sources = (obs_property_t *)data;
const char *source_type = obs_source_get_id(source);
if (strstr(source_type, "text") != NULL) {
const char *name = obs_source_get_name(source);
obs_property_list_add_string(text_sources, name, name);
}

return true;
}, text_sources);

// Add a "none" option
obs_property_list_add_string(text_sources, obs_module_text("NoOutput"), "none");
// Add a "save to file" option
obs_property_list_add_string(text_sources, obs_module_text("SaveToFile"),
"!!save_to_file!!");
// Add a property for the output text source
obs_property_t *text_sources =
obs_properties_add_list(props, "text_sources", obs_module_text("OutputTextSource"),
OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);

obs_enum_sources(
[](void *data, obs_source_t *source) -> bool {
obs_property_t *text_sources = (obs_property_t *)data;
const char *source_type = obs_source_get_id(source);
if (strstr(source_type, "text") != NULL) {
const char *name = obs_source_get_name(source);
obs_property_list_add_string(text_sources, name, name);
}

return true;
},
text_sources);

// Add a "none" option
obs_property_list_add_string(text_sources, obs_module_text("NoOutput"), "none");
// Add a "save to file" option
obs_property_list_add_string(text_sources, obs_module_text("SaveToFile"),
"!!save_to_file!!");

// Add an option to set the output file path
obs_properties_add_path(props, "output_file_path", obs_module_text("OutputFilePath"),
Expand Down

0 comments on commit 9d65f01

Please sign in to comment.