From c45a37d3d6f39440cd7a9a6b9829a84039f163dd Mon Sep 17 00:00:00 2001 From: Brycero <13734212+Brycero@users.noreply.github.com> Date: Wed, 20 Nov 2024 19:51:19 -0600 Subject: [PATCH] update to 30.2.3 and fix text gdi+ output (#28) * update dependencies * rewrite text output on v30.2 * clang-format file --- buildspec.json | 20 ++++++++++---------- src/ocr-filter.cpp | 15 +++++++++++++-- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/buildspec.json b/buildspec.json index 8363d4f..1274b5b 100644 --- a/buildspec.json +++ b/buildspec.json @@ -1,33 +1,33 @@ { "dependencies": { "obs-studio": { - "version": "30.0.2", + "version": "30.2.3", "baseUrl": "https://github.com/obsproject/obs-studio/archive/refs/tags", "label": "OBS sources", "hashes": { - "macos": "be12c3ad0a85713750d8325e4b1db75086223402d7080d0e3c2833d7c5e83c27", - "windows-x64": "970058c49322cfa9cd6d620abb393fed89743ba7e74bd9dbb6ebe0ea8141d9c7" + "macos": "3d5f37f564564b6e6fb32ba535285e062ee25d573b3a6a405e5a86d5ab029351", + "windows-x64": "a75de0a777013ae5edca526e21b584176bf21606d4d5db23ba4b5a87cfde12e3" } }, "prebuilt": { - "version": "2023-11-03", + "version": "2024-09-12", "baseUrl": "https://github.com/obsproject/obs-deps/releases/download", "label": "Pre-Built obs-deps", "hashes": { - "macos": "90c2fc069847ec2768dcc867c1c63b112c615ed845a907dc44acab7a97181974", - "windows-x64": "d0825a6fb65822c993a3059edfba70d72d2e632ef74893588cf12b1f0d329ce6" + "macos": "c857b211ee378772994b632036e1e5befe66b37e85286cb8e3cefc1435d5220a", + "windows-x64": "d4a4f194591766891ad3c0b267deec3c4b85239c8fe557273559927456aeedbb" } }, "qt6": { - "version": "2023-11-03", + "version": "2024-09-12", "baseUrl": "https://github.com/obsproject/obs-deps/releases/download", "label": "Pre-Built Qt6", "hashes": { - "macos": "ba4a7152848da0053f63427a2a2cb0a199af3992997c0db08564df6f48c9db98", - "windows-x64": "bc57dedf76b47119a6dce0435a2f21b35b08c8f2948b1cb34a157320f77732d1" + "macos": "34a2de6b7f4d4d58fc5a15a4dba49a61d81a4045d0cedfc1a1f08c0dfb8047cf", + "windows-x64": "4d15ce13dbb0a8a2cabcce5ae0da5e80ee589b482a61b2025378465c1da32c4f" }, "debugSymbols": { - "windows-x64": "fd8ecd1d8cd2ef049d9f4d7fb5c134f784836d6020758094855dfa98bd025036" + "windows-x64": "dad2351a5c9cd438168e1ed8fb453a2534532252edb555f1001a5e8eb3f1bbd4" } } }, diff --git a/src/ocr-filter.cpp b/src/ocr-filter.cpp index 7c31bc2..020b060 100644 --- a/src/ocr-filter.cpp +++ b/src/ocr-filter.cpp @@ -277,13 +277,24 @@ obs_properties_t *ocr_filter_properties(void *data) 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 the sources - obs_enum_sources(add_text_sources_to_list, text_sources); // Add an option to set the output file path obs_properties_add_path(props, "output_file_path", obs_module_text("OutputFilePath"),