Created
January 4, 2021 10:53
-
-
Save tinyzimmer/1b4d1fdc448af7e3092d1c084f494601 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <dlfcn.h> | |
#include <stdio.h> | |
#include "gst/gst.h" | |
typedef GstPluginDesc * (*get_desc)(); | |
GstPluginDesc * do_func (get_desc func) { | |
return func(); | |
} | |
int main () { | |
void *plugin = dlopen("./test-plugin.so", RTLD_NOW); | |
get_desc func = dlsym(plugin, "gst_plugin_test_plugin_get_desc"); | |
GstPluginDesc *desc = do_func(func); | |
printf("name: %s\n", desc->name); | |
dlclose(plugin); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment