Custom Module will not load 1.1.7

This forum is about all development around libVLC.
manolamancha
New Cone
New Cone
Posts: 4
Joined: 17 Jan 2009 23:24

Custom Module will not load 1.1.7

Postby manolamancha » 11 Feb 2011 23:02

Hello! I wrote a module for VLC a while back that's been running wonderfully. However I'm not trying to build the module for 1.1.7 and the module will not load. Here is some code I've been using to test, it's just a dummy module:

Code: Select all

#include <vlc_common.h> #include <vlc_plugin.h> #define MODULE_STRING "stubbbbby" static int Open ( vlc_object_t * ); static void Close ( vlc_object_t * ); vlc_module_begin() set_description("Stub") set_shortname("Stub") set_category( CAT_ADVANCED ) add_shortcut( "stubby" ) set_capability( "text renderer", 1 ) // 0 will disable this guy so that it HAS to be called explicitly set_callbacks( Open, Close ) vlc_module_end() int Open ( vlc_object_t * v){ return VLC_SUCCESS; } void Close ( vlc_object_t * v){ // do nothing }
I'm compiling on Windows using GCC and MingW with defines "__PLUGIN__" and "__LIBVLC__" and it builds without any problems. I then copy the .dll file into my plugins directory and try executing "vlc.exe --reset-plugins-cache --list" to list the modules it could load. When linking with the 1.0.3 version and plopping it in the plugins directory, it loads fine. But if I link with 1.0.7 it won't load at all and I don't get any error messages about an invalid plugin like I used to in 1.0.3.
Comparing the export symbols, for the 1.0.3 version I get:

Code: Select all

vlc_entry__1_0_0e vlc_entry_copyright__1_0_0e vlc_entry_license__1_0_0e
and for 1.1.7 I get:

Code: Select all

vlc_entry__1_1_0g vlc_entry_copyright__1_1_0g vlc_entry_license__1_1_0g
Any ideas? Thanks!
Last edited by manolamancha on 12 Feb 2011 04:40, edited 1 time in total.

manolamancha
New Cone
New Cone
Posts: 4
Joined: 17 Jan 2009 23:24

Re: Custom Module will not load 1.1.7

Postby manolamancha » 12 Feb 2011 04:08

Nevermind, I was able to figure it out finally. Someone had added code to the module loading that excludes any shared libraries that don't follow a specific naming convention. I updated the dev wiki with the details so other folks don't get snagged.

lscn
Blank Cone
Blank Cone
Posts: 10
Joined: 05 Aug 2012 18:09

Re: Custom Module will not load 1.1.7

Postby lscn » 14 Aug 2012 23:10

Hi! :-)

Can you please clarify what that naming convention is?

In the wiki I could find the following:
Recent versions of VLC require that the modules follow a specific naming convention or they will not be loaded. Modules must be named in the following format: libmodule_name_plugin.ext where module_name should be the name of your module in lower case, and ext is the system's shared library extension. For example, the http access module is named libaccess_http_plugin.dll on a Windows machine.
But, for a plugin called "libmymodule_plugin.dll" for which I set the following:

Code: Select all

#define MODULE_STRING "mymodule"
and

Code: Select all

vlc_module_begin () set_shortname("mymodule") set_category( CAT_INPUT ) set_subcategory( SUBCAT_INPUT_DEMUX ) set_description( N_("mymodule test") ) set_capability( "demux", 0 ) add_file( "demuxdump-file", "stream-demux.dump", NULL, FILE_TEXT, FILE_LONGTEXT, false ) add_bool( "demuxdump-append", false, NULL, APPEND_TEXT, APPEND_LONGTEXT, false ) set_callbacks( Open, Close ) add_shortcut( "dump" ) vlc_module_end ()
it doesn't seem to load.. So, I guess something is missing...

Thanks,

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: Custom Module will not load 1.1.7

Postby Jean-Baptiste Kempf » 15 Aug 2012 11:36

Look at the logs
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.

lscn
Blank Cone
Blank Cone
Posts: 10
Joined: 05 Aug 2012 18:09

Re: Custom Module will not load 1.1.7

Postby lscn » 16 Aug 2012 22:06

Salut Jean-Baptiste! :-)

Yes, this was my first idea, but I don't really know if I'm triggering the logs right...

Here's the command line I'm using:

Code: Select all

vlc --verbose --module mymodule
Here's the logs ouput:
  • main debug: processing request item: null, node: Lista de reprodução, skip: 0
    main debug: starting playback of the new playlist item
    main debug: resyncing on mymodule
    main debug: mymodule is at 0
    main debug: creating new input thread
    main debug: Creating an input for 'mymodule'
    main debug: using timeshift granularity of 50 MiB, in path 'C:\Users\Nunes\AppData\Local\Temp'
    main debug: `file:///C:/Program%20Files/VideoLAN/VLC/mymodule' gives access `file' demux `' path `/C:/Program%20Files/VideoLAN/VLC/mymodule'
    main debug: creating demux: access='file' demux='' location='/C:/Program%20Files/VideoLAN/VLC/mymodule' file='C:\Program Files\VideoLAN\VLC\mymodule'
    qt4 debugmain: d ebIugM: S: etlotokiinng fogr acacess_n input
    demux module: 3 candidates
    main debug: no access_demux module matching "file" could be loaded
    main debug: TIMER module_need() : 2.658 ms - Total 2.658 ms / 1 intvls (Avg 2.658 ms)
    main debug: creating access 'file' location='/C:/Program%20Files/VideoLAN/VLC/mymodule', path='C:\Program Files\VideoLAN\VLC\mymodule'
    main debug: looking for access module: 3 candidates
    filesystem debug: opening file `C:\Program Files\VideoLAN\VLC\mymodule'
    filesystem error: cannot open file C:\Program Files\VideoLAN\VLC\mymodule (No such file or directory)
    main debug: no access module matching "file" could be loaded
    main debug: TIMER module_need() : 3.647 ms - Total 3.647 ms / 1 intvls (Avg 3.647 ms)
    main error: open of `file:///C:/Program%20Files/VideoLAN/VLC/mymodule' failed
    main debug: finished input
    main debug: dead input
    main debug: changing item without a request (current 0/1)
    main debug: nothing to play
    qt4 debug: IM: Deleting the input
    main debug: TIMER input launching for 'mymodule' : 39.241 ms - Total 39.241 ms / 1 intvls (Avg 39.241 ms)
    main debug: exiting
I also tried with the same result:

Code: Select all

vlc --verbose --reset-plugins-cache --list
It seems it is not looking for the module in the plugins directory. I also tried to set the directory where to look for in the preferences, but it changed nothing log-wise.

Any advise?

Thanks,

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: Custom Module will not load 1.1.7

Postby Jean-Baptiste Kempf » 17 Aug 2012 11:32

vlc --verbose --reset-plugins-cache --list will tell you why it does not load your module.
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.

lscn
Blank Cone
Blank Cone
Posts: 10
Joined: 05 Aug 2012 18:09

Re: Custom Module will not load 1.1.7

Postby lscn » 17 Aug 2012 22:41

Salut Jean-Baptiste! :-)

Thank you... But, there's really something wrong with my settings...

If I run this command, as I mentioned before, I get nothing logged... Either I'm checking the wrong log or I'm missing a setting somewhere...

I have set with the Windows GUI, in the Preferences -> Logs

The log to be a file in the temp folder, its format to text and the verbosity to either -1, 0, 1 or 2 and none produced any output to the logs...

Again, this running the following command:
vlc --verbose --reset-plugins-cache --list
Btw, the command above outputs a list of modules (as I think expected!).

Thank you again,

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: Custom Module will not load 1.1.7

Postby Jean-Baptiste Kempf » 18 Aug 2012 19:23

Is your module in the list?
If yes, all is good.
If not, look at the extra log information which should tell you why it did not load.
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.

lscn
Blank Cone
Blank Cone
Posts: 10
Joined: 05 Aug 2012 18:09

Re: Custom Module will not load 1.1.7

Postby lscn » 19 Aug 2012 17:22

Salut Jean-Baptiste!

The module is not in the list... I know it would have been good! ;-)

The thing is that I get no log at all for that command:
vlc --verbose --reset-plugins-cache --list
I ran this on other machine with a prior version of VLC, namely 2.0.1 and I do get the list logged, but nothing else... Please remember on my machine I have version 2.0.3.

I read somewhere logs were broken on Windows... Is this possible? If so, is there another way to debug why my module isn't loaded?

Merci,

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: Custom Module will not load 1.1.7

Postby Jean-Baptiste Kempf » 19 Aug 2012 20:08

Use -vvv to get the logs... Use MSys (rxvt) for better logging.
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.

lscn
Blank Cone
Blank Cone
Posts: 10
Joined: 05 Aug 2012 18:09

Re: Custom Module will not load 1.1.7

Postby lscn » 20 Aug 2012 12:55

Salut Jean-Baptiste!

I tried with -vvv too and still I get no logs... :-(

Maybe I'm missing an important part of info for you...

Recap:
I have created a module for win32 with MingW (actually I just copied the demuxdump source code and compiled it into another lib!), which I'm trying to load on Windows 7 VLC 2.0.3.
Since the new module doesn't load, I'm trying to debug why, either by getting logs (which I don't) or looking for another way to debug this.

Really, really thank you for your help.

lscn

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Custom Module will not load 1.1.7

Postby Rémi Denis-Courmont » 20 Aug 2012 13:49

I think stepping into the VLC plugin loader is the only thing left.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 0 guests