Module loading problems.

This forum is about all development around libVLC.
agorg_louk
New Cone
New Cone
Posts: 1
Joined: 02 Aug 2013 01:51

Module loading problems.

Postby agorg_louk » 02 Aug 2013 02:01

So i decided to make an external plugin for vlc, and after spending some hours of trying to make it compile... Now vlc doesn't want to load it!!!!
I read all the documentation, and i made my plugin using the following code:

Code: Select all

/* Windows headers */ #include "windows.h" /* C headers */ #include <stdlib.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif #define MODULE_STRING "hello" #define DOMAIN "hello" #define _(str) dgettext(DOMAIN, str) #define N_(str) (str) #define strdup _strdup //#include <inttypes.h> /* VLC core API headers */ #include <vlc_common.h> #include <vlc_plugin.h> #include <vlc_interface.h> #pragma comment(lib, "libvlccore.lib") /* Forward declarations */ static int Open(vlc_object_t *); static void Close(vlc_object_t *); /* Module descriptor */ vlc_module_begin() set_text_domain(DOMAIN) set_shortname(N_("hello")) set_description(N_("Hello interface")) set_category(CAT_INTERFACE) set_capability("interface", 10000) set_callbacks(Open, Close) add_string("hello-who", "world", "Target", "Whom to say hello to.", false) vlc_module_end() /* Internal state for an instance of the module */ struct intf_sys_t { char *who; }; /** * Starts our example interface. */ static int Open(vlc_object_t *obj) { MessageBox(NULL,"--please stay polite-- Open Called!","Success",NULL); //This one is never called.... :( intf_thread_t *intf = (intf_thread_t *)obj; /* Allocate internal state */ intf_sys_t *sys = (intf_sys_t*) malloc(sizeof (*sys)); if (unlikely(sys == NULL)) return VLC_ENOMEM; intf->p_sys = sys; /* Read settings */ char *who = var_InheritString(intf, "hello-who"); if (who == NULL) { msg_Err(intf, "Nobody to say hello to!"); goto error; } sys->who = who; msg_Info(intf, "Hello %s!", who); return VLC_SUCCESS; error: free(sys); return VLC_EGENERIC; } /** * Stops the interface. */ static void Close(vlc_object_t *obj) { intf_thread_t *intf = (intf_thread_t *)obj; intf_sys_t *sys = intf->p_sys; msg_Info(intf, "Good bye %s!"); /* Free internal state */ free(sys->who); free(sys); } BOOL __stdcall DllMain(HANDLE hDllHandle, DWORD dwReason, LPVOID lpReserved) { (void)hDllHandle,dwReason,lpReserved; MessageBox(NULL,"My plugin Loaded!","Success!",NULL); //Pops up as soon as i start vlc. return true; }

I know that vlc finds my dll, because when i start him dllmain executes and pops up the MessageBox that it is in the code.
The problem is that it does not show in the Plugins list, neither in the list generated by using vlc --list. I tried also to clean the cache but nothing changed.

Can somebody help me? I've spent a lot of hours trying to figure that out, and i cannot find any other solution.

Thanks in advance.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Module loading problems.

Postby Jean-Baptiste Kempf » 05 Aug 2013 13:40

vlc -vvv --list should tell you why it does not load it.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

diman23
Blank Cone
Blank Cone
Posts: 14
Joined: 23 Aug 2013 00:26
VLC version: 2.0.0
Operating System: win7 / linux
Location: Germany

Re: Module loading problems.

Postby diman23 » 23 Aug 2013 17:32

vlc -vvv --list should tell you why it does not load it.
on windows append --extraintf=logger


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 4 guests