Skip to content

Commit f93af92

Browse files
committed
[WRAPPER] Added some more gstreamer wrapped functions
1 parent e02c5c3 commit f93af92

File tree

4 files changed

+64
-3
lines changed

4 files changed

+64
-3
lines changed

src/wrapped/generated/functions_list.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4667,6 +4667,7 @@ wrappedgstreamer:
46674667
- gst_pad_set_activate_function_full
46684668
- gst_pad_set_activatemode_function_full
46694669
- gst_pad_set_chain_function_full
4670+
- gst_pad_set_chain_list_function_full
46704671
- gst_pad_set_event_function_full
46714672
- gst_pad_set_getrange_function_full
46724673
- gst_pad_set_iterate_internal_links_function_full
@@ -4676,6 +4677,7 @@ wrappedgstreamer:
46764677
- gst_iterator_find_custom
46774678
- gst_pad_start_task
46784679
- uFpppp:
4680+
- gst_clock_id_wait_async
46794681
- gst_iterator_fold
46804682
- pFppip:
46814683
- gst_registry_feature_filter

src/wrapped/generated/wrappedgstreamertypes.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,15 @@ typedef int32_t (*iFiipppppppp_t)(int32_t, int32_t, void*, void*, void*, void*,
9191
GO(gst_pad_set_activate_function_full, vFpppp_t) \
9292
GO(gst_pad_set_activatemode_function_full, vFpppp_t) \
9393
GO(gst_pad_set_chain_function_full, vFpppp_t) \
94+
GO(gst_pad_set_chain_list_function_full, vFpppp_t) \
9495
GO(gst_pad_set_event_function_full, vFpppp_t) \
9596
GO(gst_pad_set_getrange_function_full, vFpppp_t) \
9697
GO(gst_pad_set_iterate_internal_links_function_full, vFpppp_t) \
9798
GO(gst_pad_set_link_function_full, vFpppp_t) \
9899
GO(gst_pad_set_query_function_full, vFpppp_t) \
99100
GO(gst_iterator_find_custom, iFpppp_t) \
100101
GO(gst_pad_start_task, iFpppp_t) \
102+
GO(gst_clock_id_wait_async, uFpppp_t) \
101103
GO(gst_iterator_fold, uFpppp_t) \
102104
GO(gst_registry_feature_filter, pFppip_t) \
103105
GO(gst_pad_create_stream_id_printf, pFpppV_t) \

src/wrapped/wrappedgstreamer.c

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,52 @@ static void* findGstMiniObjectFreeFunctionFct(void* fct)
745745
printf_log(LOG_NONE, "Warning, no more slot for gstreamer GstMiniObjectFreeFunction callback\n");
746746
return NULL;
747747
}
748+
//GstClockCallback
749+
#define GO(A) \
750+
static uintptr_t my_GstClockCallback_fct_##A = 0; \
751+
static int my_GstClockCallback_##A(void* a, uint64_t b, void* c, void* d) \
752+
{ \
753+
return (int)RunFunctionFmt(my_GstClockCallback_fct_##A, "pUpp", a, b, c, d); \
754+
}
755+
SUPER()
756+
#undef GO
757+
static void* findGstClockCallbackFct(void* fct)
758+
{
759+
if(!fct) return fct;
760+
void* p;
761+
if((p = GetNativeFnc((uintptr_t)fct))) return p;
762+
#define GO(A) if(my_GstClockCallback_fct_##A == (uintptr_t)fct) return my_GstClockCallback_##A;
763+
SUPER()
764+
#undef GO
765+
#define GO(A) if(my_GstClockCallback_fct_##A == 0) {my_GstClockCallback_fct_##A = (uintptr_t)fct; return my_GstClockCallback_##A; }
766+
SUPER()
767+
#undef GO
768+
printf_log(LOG_NONE, "Warning, no more slot for gstreamer GstClockCallback callback\n");
769+
return NULL;
770+
}
771+
//GstPadChainListFunction
772+
#define GO(A) \
773+
static uintptr_t my_GstPadChainListFunction_fct_##A = 0; \
774+
static int my_GstPadChainListFunction_##A(void* a, void* b, void* c) \
775+
{ \
776+
return (int)RunFunctionFmt(my_GstPadChainListFunction_fct_##A, "ppp", a, b, c); \
777+
}
778+
SUPER()
779+
#undef GO
780+
static void* findGstPadChainListFunctionFct(void* fct)
781+
{
782+
if(!fct) return fct;
783+
void* p;
784+
if((p = GetNativeFnc((uintptr_t)fct))) return p;
785+
#define GO(A) if(my_GstPadChainListFunction_fct_##A == (uintptr_t)fct) return my_GstPadChainListFunction_##A;
786+
SUPER()
787+
#undef GO
788+
#define GO(A) if(my_GstPadChainListFunction_fct_##A == 0) {my_GstPadChainListFunction_fct_##A = (uintptr_t)fct; return my_GstPadChainListFunction_##A; }
789+
SUPER()
790+
#undef GO
791+
printf_log(LOG_NONE, "Warning, no more slot for gstreamer GstPadChainListFunction callback\n");
792+
return NULL;
793+
}
748794

749795
#undef SUPER
750796

@@ -1254,6 +1300,16 @@ EXPORT int my_gst_iterator_find_custom(x64emu_t* emu, void* it, void* f, void* e
12541300
return my->gst_iterator_find_custom(it, findGCompareFuncFct(f), elem, data);
12551301
}
12561302

1303+
EXPORT int my_gst_clock_id_wait_async(x64emu_t* emu, void* id, void* f, void* data, void* d)
1304+
{
1305+
return my->gst_clock_id_wait_async(id, findGstClockCallbackFct(f), data, findDestroyFct(d));
1306+
}
1307+
1308+
EXPORT void my_gst_pad_set_chain_list_function_full(x64emu_t* emu, void* pad, void *f, void* data, void* d)
1309+
{
1310+
return my->gst_pad_set_chain_list_function_full(pad, findGstPadChainListFunctionFct(f), data, findDestroyFct(d));
1311+
}
1312+
12571313
#define PRE_INIT \
12581314
if (BOX64ENV(nogtk)) return -2;
12591315

src/wrapped/wrappedgstreamer_private.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ GO(gst_clock_id_unref, vFp)
337337
GO(gst_clock_id_unschedule, vFp)
338338
GO(gst_clock_id_uses_clock, iFpp)
339339
GO(gst_clock_id_wait, uFpp)
340-
//GOM(gst_clock_id_wait_async, uFEpppp)
340+
GOM(gst_clock_id_wait_async, uFEpppp)
341341
GO(gst_clock_is_synced, iFp)
342342
GO(gst_clock_new_periodic_id, pFpLL)
343343
GO(gst_clock_new_single_shot_id, pFpL)
@@ -603,6 +603,7 @@ GO(gst_element_release_request_pad, vFpp)
603603
GO(gst_element_remove_pad, iFpp)
604604
GO(gst_element_remove_property_notify_watch, vFpL)
605605
GO(gst_element_request_pad, pFpppp)
606+
GO(gst_element_request_pad_simple, pFpp)
606607
GO(gst_element_seek, iFpduuulul)
607608
GO(gst_element_seek_simple, iFpuul)
608609
GO(gst_element_send_event, iFpp)
@@ -1029,7 +1030,7 @@ GOM(gst_pad_set_activate_function_full, vFEpppp)
10291030
GOM(gst_pad_set_activatemode_function_full, vFEpppp)
10301031
GO(gst_pad_set_active, iFpi)
10311032
GOM(gst_pad_set_chain_function_full, vFEpppp)
1032-
//GOM(gst_pad_set_chain_list_function_full, vFEpppp)
1033+
GOM(gst_pad_set_chain_list_function_full, vFEpppp)
10331034
GO(gst_pad_set_element_private, vFpp)
10341035
//GOM(gst_pad_set_event_full_function_full, vFEpppp)
10351036
GOM(gst_pad_set_event_function_full, vFEpppp)
@@ -1276,7 +1277,7 @@ GO(gst_query_set_uri, vFpp)
12761277
GO(gst_query_set_uri_redirection, vFpp)
12771278
GO(gst_query_set_uri_redirection_permanent, vFpi)
12781279
GO(gst_query_take, iFpp)
1279-
//DATAB(_gst_query_type, 8)
1280+
DATAB(_gst_query_type, 8)
12801281
GO(gst_query_type_flags_get_type, LFv)
12811282
GO(gst_query_type_get_flags, uFu)
12821283
GO(gst_query_type_get_name, pFu)

0 commit comments

Comments
 (0)