diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2025-01-29 11:45:23 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2025-01-29 11:45:23 +0100 |
| commit | ed7147e598727946912a0e9c11eb9a0330a85f30 (patch) | |
| tree | 208efc09a0ca24ef144d7d31d35b2aef7c4eab6c /src/wrapped | |
| parent | 4892c68f17dc23800e7afc03e9a44e2374232857 (diff) | |
| download | box64-ed7147e598727946912a0e9c11eb9a0330a85f30.tar.gz box64-ed7147e598727946912a0e9c11eb9a0330a85f30.zip | |
[WRAPPER] Added 1 wrapped function and fixed one on gstreamer
Diffstat (limited to 'src/wrapped')
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 2 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedgstreamertypes.h | 2 | ||||
| -rw-r--r-- | src/wrapped/wrappedgstreamer.c | 26 | ||||
| -rw-r--r-- | src/wrapped/wrappedgstreamer_private.h | 4 |
4 files changed, 30 insertions, 4 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index b7c65af7..0f92e7df 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -4124,7 +4124,6 @@ wrappedgstreamer: - pFA: - gst_tag_list_new_valist - vFpp: - - _gst_debug_register_funcptr - gst_init - pFuV: - gst_caps_features_new_id @@ -4192,6 +4191,7 @@ wrappedgstreamer: - gst_pad_set_link_function_full - gst_pad_set_query_function_full - iFpppp: + - gst_iterator_find_custom - gst_pad_start_task - uFpppp: - gst_iterator_fold diff --git a/src/wrapped/generated/wrappedgstreamertypes.h b/src/wrapped/generated/wrappedgstreamertypes.h index 186195b5..df98ad18 100644 --- a/src/wrapped/generated/wrappedgstreamertypes.h +++ b/src/wrapped/generated/wrappedgstreamertypes.h @@ -49,7 +49,6 @@ typedef int32_t (*iFiipppppppp_t)(int32_t, int32_t, void*, void*, void*, void*, #define SUPER() ADDED_FUNCTIONS() \ GO(gst_tag_list_new_valist, pFA_t) \ - GO(_gst_debug_register_funcptr, vFpp_t) \ GO(gst_init, vFpp_t) \ GO(gst_caps_features_new_id, pFuV_t) \ GO(gst_caps_features_new_id_valist, pFuA_t) \ @@ -97,6 +96,7 @@ typedef int32_t (*iFiipppppppp_t)(int32_t, int32_t, void*, void*, void*, void*, GO(gst_pad_set_iterate_internal_links_function_full, vFpppp_t) \ GO(gst_pad_set_link_function_full, vFpppp_t) \ GO(gst_pad_set_query_function_full, vFpppp_t) \ + GO(gst_iterator_find_custom, iFpppp_t) \ GO(gst_pad_start_task, iFpppp_t) \ GO(gst_iterator_fold, uFpppp_t) \ GO(gst_registry_feature_filter, pFppip_t) \ diff --git a/src/wrapped/wrappedgstreamer.c b/src/wrapped/wrappedgstreamer.c index 5c411f70..676f0fe1 100644 --- a/src/wrapped/wrappedgstreamer.c +++ b/src/wrapped/wrappedgstreamer.c @@ -362,6 +362,27 @@ static void* findGstIteratorFoldFunctionFct(void* fct) printf_log(LOG_NONE, "Warning, no more slot for gstreamer GstIteratorFoldFunction callback\n"); return NULL; } +//GCompareFunc +#define GO(A) \ +static uintptr_t my_GCompareFunc_fct_##A = 0; \ +static int my_GCompareFunc_##A(void* a, void* b) \ +{ \ + return (int)RunFunctionFmt(my_GCompareFunc_fct_##A, "pp", a, b); \ +} +SUPER() +#undef GO +static void* findGCompareFuncFct(void* fct) +{ + if(!fct) return fct; + #define GO(A) if(my_GCompareFunc_fct_##A == (uintptr_t)fct) return my_GCompareFunc_##A; + SUPER() + #undef GO + #define GO(A) if(my_GCompareFunc_fct_##A == 0) {my_GCompareFunc_fct_##A = (uintptr_t)fct; return my_GCompareFunc_##A; } + SUPER() + #undef GO + printf_log(LOG_NONE, "Warning, no more slot for gstreamer GCompareFunc callback\n"); + return NULL; +} //GCompareDataFunc #define GO(A) \ static uintptr_t my_GCompareDataFunc_fct_##A = 0; \ @@ -1228,6 +1249,11 @@ EXPORT void my_gst_mini_object_init(x64emu_t* emu, void* obj, uint32_t flags, si my->gst_mini_object_init(obj, flags, type, findGstMiniObjectCopyFunctionFct(copy_f), findGstMiniObjectDisposeFunctionFct(disp_f), findGstMiniObjectFreeFunctionFct(free_f)); } +EXPORT int my_gst_iterator_find_custom(x64emu_t* emu, void* it, void* f, void* elem, void* data) +{ + return my->gst_iterator_find_custom(it, findGCompareFuncFct(f), elem, data); +} + #define PRE_INIT \ if(BOX64ENV(nogtk)) \ return -1; diff --git a/src/wrapped/wrappedgstreamer_private.h b/src/wrapped/wrappedgstreamer_private.h index 089265b3..9624f628 100644 --- a/src/wrapped/wrappedgstreamer_private.h +++ b/src/wrapped/wrappedgstreamer_private.h @@ -446,7 +446,7 @@ GO(gst_debug_message_get, pFp) DATAB(_gst_debug_min, 4) //GOM(_gst_debug_nameof_funcptr, pFEp) GO(gst_debug_print_stack_trace, vFv) -GOM(_gst_debug_register_funcptr, vFpp) //no need to wrap it seems, it's the name that get registered +GO(_gst_debug_register_funcptr, vFpp) //no need to wrap it seems, it's the name that get registered //GOM(gst_debug_remove_log_function, uFEp) GO(gst_debug_remove_log_function_by_data, uFp) GO(gst_debug_remove_ring_buffer_logger, vFv) @@ -743,7 +743,7 @@ GO(gst_is_caps_features, iFp) GO(gst_is_initialized, iFv) GO(gst_iterator_copy, pFp) //GOM(gst_iterator_filter, pFEppp) -//GOM(gst_iterator_find_custom, iFEpppp) +GOM(gst_iterator_find_custom, iFEpppp) GOM(gst_iterator_fold, uFEpppp) //GOM(gst_iterator_foreach, uFEppp) GO(gst_iterator_free, vFp) |