diff --git a/include/freerdp/primitives.h b/include/freerdp/primitives.h index 33935f3a4..311c65b21 100644 --- a/include/freerdp/primitives.h +++ b/include/freerdp/primitives.h @@ -274,6 +274,18 @@ typedef enum FREERDP_API BOOL primitives_init(primitives_t* p, primitive_hints hints); FREERDP_API void primitives_uninit(void); + /** @brief get a specific primitives implementation + * + * This will try to return the primitives implementation suggested by \b hint + * If that does not exist or does not work on the platform any other (e.g. usually pure + * software) is returned + * + * @param hint the type of primitives to return. + * @return A primitive implementation matching the hint closest or \b NULL in case of failure. + * @since version 3.11.0 + */ + FREERDP_API primitives_t* primitives_get_by_type(primitive_hints type); + FREERDP_API const char* primitives_avc444_frame_type_str(avc444_frame_type type); /** @brief convert a hint to a string diff --git a/libfreerdp/primitives/prim_internal.h b/libfreerdp/primitives/prim_internal.h index 8723088d6..c5afaa3f2 100644 --- a/libfreerdp/primitives/prim_internal.h +++ b/libfreerdp/primitives/prim_internal.h @@ -362,6 +362,4 @@ FREERDP_LOCAL void primitives_init_YUV_opt(primitives_t* WINPR_RESTRICT prims); FREERDP_LOCAL BOOL primitives_init_opencl(primitives_t* WINPR_RESTRICT prims); #endif -FREERDP_LOCAL primitives_t* primitives_get_by_type(DWORD type); - #endif /* FREERDP_LIB_PRIM_INTERNAL_H */ diff --git a/libfreerdp/primitives/primitives.c b/libfreerdp/primitives/primitives.c index b2b147afe..e28e244f4 100644 --- a/libfreerdp/primitives/primitives.c +++ b/libfreerdp/primitives/primitives.c @@ -382,7 +382,7 @@ primitives_t* primitives_get_generic(void) return &pPrimitivesGeneric; } -primitives_t* primitives_get_by_type(DWORD type) +primitives_t* primitives_get_by_type(primitive_hints type) { InitOnceExecuteOnce(&generic_primitives_InitOnce, primitives_init_generic_cb, NULL, NULL); diff --git a/scripts/codespell.sh b/scripts/codespell.sh index b7299b4ea..0e72b96a3 100755 --- a/scripts/codespell.sh +++ b/scripts/codespell.sh @@ -8,6 +8,7 @@ SCRIPT_PATH=$(realpath "$SCRIPT_PATH") # 1. All words consisting of only 2 characters (too many issues with variable names) # 2. Every word of the form 'pEvent', e.g. variable prefixed with p for pointer # 3. Every word prefixed by e.g. '\tSome text', e.g. format string escapes +codespell --version codespell \ -I "$SCRIPT_PATH/codespell.ignore" \ -S ".git,*.ai,*.svg,*.rtf,*/assets/de_*,*/res/values-*,*/protocols/xdg*,*/test/*" \