diff options
| author | rajdakin <rajdakin@gmail.com> | 2024-02-10 15:06:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-10 15:06:08 +0100 |
| commit | b527ebbf5be0949df3b9dcf0806109acc8119476 (patch) | |
| tree | d9687f665b8e3a1facc15be822463bf7d274dacd /src/wrapped/wrappedgstreamer.c | |
| parent | ad55cfde7f61395618991543694b35183f9c6ad7 (diff) | |
| download | box64-b527ebbf5be0949df3b9dcf0806109acc8119476.tar.gz box64-b527ebbf5be0949df3b9dcf0806109acc8119476.zip | |
Wrapped libraries refactor (#1257)
* [MISC] Removed a warning caused by tab/space mismatch * [WRAPPED] Factored out `getMy` and `freeMy` calls * [WRAPPED] Small cleanup of the init header * [WRAPPED] Factored out `SETALT` * [WRAPPED] Factored out needed libs
Diffstat (limited to 'src/wrapped/wrappedgstreamer.c')
| -rw-r--r-- | src/wrapped/wrappedgstreamer.c | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/src/wrapped/wrappedgstreamer.c b/src/wrapped/wrappedgstreamer.c index 847ea46d..93adcd7f 100644 --- a/src/wrapped/wrappedgstreamer.c +++ b/src/wrapped/wrappedgstreamer.c @@ -1058,31 +1058,19 @@ EXPORT int my_gst_type_find_register(x64emu_t* emu, void* plugin, void* name, ui if(box64_nogtk) \ return -1; +#define CUSTOM_INIT \ + SetGstObjectID(my->gst_object_get_type()); \ + SetGstAllocatorID(my->gst_allocator_get_type()); \ + SetGstTaskPoolID(my->gst_task_pool_get_type()); \ + SetGstElementID(my->gst_element_get_type()); \ + SetGstBinID(my->gst_bin_get_type()); \ + SetGstPadID(my->gst_pad_get_type()); \ + SetGstURIHandlerID(my->gst_uri_handler_get_type()); + #ifdef ANDROID - #define CUSTOM_INIT \ - getMy(lib); \ - SetGstObjectID(my->gst_object_get_type()); \ - SetGstAllocatorID(my->gst_allocator_get_type()); \ - SetGstTaskPoolID(my->gst_task_pool_get_type()); \ - SetGstElementID(my->gst_element_get_type()); \ - SetGstBinID(my->gst_bin_get_type()); \ - SetGstPadID(my->gst_pad_get_type()); \ - SetGstURIHandlerID(my->gst_uri_handler_get_type()); \ - setNeededLibs(lib, 1, "libgtk-3.so"); +#define NEEDED_LIBS "libgtk-3.so" #else - #define CUSTOM_INIT \ - getMy(lib); \ - SetGstObjectID(my->gst_object_get_type()); \ - SetGstAllocatorID(my->gst_allocator_get_type()); \ - SetGstTaskPoolID(my->gst_task_pool_get_type()); \ - SetGstElementID(my->gst_element_get_type()); \ - SetGstBinID(my->gst_bin_get_type()); \ - SetGstPadID(my->gst_pad_get_type()); \ - SetGstURIHandlerID(my->gst_uri_handler_get_type()); \ - setNeededLibs(lib, 1, "libgtk-3.so.0"); +#define NEEDED_LIBS "libgtk-3.so.0" #endif -#define CUSTOM_FINI \ - freeMy(); - #include "wrappedlib_init.h" |