Page 1 of 1

New plugin for VLC: 2 problems

Posted: 05 Dec 2008 09:52
by Lalesvi
Hello. I have tried to install a new plugin for the VLC and I have basically two problems (I am using Linux (Ubuntu)):

1. To compile my program (outside the VLC) I was doing "gcc -o myPlugin myPlugin.c `pkg-config --libs --cflags gtk+-2.0`". My program has a graphic interface based in the GTK libraries (http://www.gtk.org). I imagine I have to change something in the "configure.ac" file, but I dont know what.

2. I think this problem is a very basic thing, but I havent managed to figure it out my my own... :S All the modules added should have a module descriptor (vlc_module_begin(); (...) vlc_module_end()); and three funtions (open, run and close). My problem is than I dont know how to call the open and run functions belonging to my plugin. It could be something like "myPlugin::open(*p_this)", but as it is writen in C, not in C++, I dont think it will work... (I said it was basic! :P)

Does anyone have any idea on how could I try to solve this problems?

Re: New plugin for VLC: 2 problems

Posted: 05 Dec 2008 12:22
by Jean-Baptiste Kempf
1. copy another part of configure.ac
2. Well, I guess your plugin is an interface, so, just give it the correct name and capability, and VLC will open it.

Re: New plugin for VLC: 2 problems

Posted: 05 Dec 2008 12:40
by Lalesvi
First of all, thank you for your reply!

1. I know I have to copy and modify some part of the configure.ac, but I haven't manage to figure out which one... I suppose I have to modify the PATH or something similar, and I have tried to find it but...

2. What do you mean by capability? I dont know very well how the callbacks work within the VLC. I mean, I know that once you throw a callback, if you have a function "listening" it will execute itself, but I dont really know how to do it. Anyways, my plugin does also other stuff, so I wanted to integrate it as a normal plugin (not as a grafical addition) in modules/misc/myFilePlugin

Re: New plugin for VLC: 2 problems

Posted: 05 Dec 2008 17:35
by Jean-Baptiste Kempf
1. Sorry, I cannot really help, but try an easy module that uses PKG_CONFIG and do it. Try to copy wx configuration for example.

2. set_capability( "interface", 151 )