[vlc] My first plugin

YuGiOhJCJ Mailing-List yugiohjcj-mailinglist at laposte.net
Thu Jun 23 02:34:53 CEST 2011


Hello,

I am trying to develop a plugin for VLC which add the text to speech feature to heard the name of the current track.
So I am learning how to develop a plugin for VLC.
I read documentation to understand[1][2][3][4][5].
Also, I read the source code in the module/ directory to see examples.
Then, I read a HACKING file at the source code root. 
Finally, I have my first plugin [6].
I just want to display a window with a customised text to begin...
So I found the 'dialog_Question' function defined in vlc_dialog.h.
My plugin is listed in the Tools > Plugins and extensions > Plugins so this is good for me :-)
The problem is that the window is not visible.
Probably because the plugin is listed but not loaded.
I can read[5] that the modules are loaded automatically by VLC using the higher-score for a capability.
So I just need to put a big score like 152.
But if I do this, my plugin will be the only loaded in VLC for the "interface" capability and the other plugin with a score of 151 will not be loaded. But this plugin is also important.
So I would like to display a window with my plugin but it doesn't work.
Can you explain me how to do this?

Thank you.

[1] http://www.videolan.org/developers/vlc.html
[2] http://wiki.videolan.org/Developers_Corner
[3] http://wiki.videolan.org/Documentation:Hacker%27s_Guide/Module_Writers_Guide
[4] http://www.videolan.org/developers/vlc/doc/doxygen/html/
[5] http://wiki.videolan.org/Documentation:VLC_Modules_Loading
[6]
/*****************************************************************************
 * Preamble
 *****************************************************************************/

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_dialog.h>

/*****************************************************************************
* Local prototypes.
*****************************************************************************/

static int  Open           ( vlc_object_t * );
static void Close          ( vlc_object_t * );

/*****************************************************************************
 * Module descriptor
 *****************************************************************************/

vlc_module_begin()
    set_shortname( _("yugiohjcjtts") )
    set_description( _("Text to speech plugin by YuGiOhJCJ <yugiohjcj at 1s.fr>") )
    set_capability( "interface", 50 )
    set_callbacks( Open, Close )
    set_category( CAT_INTERFACE )

vlc_module_end ()


/*****************************************************************************
 * Open: initialize interface
 *****************************************************************************/
static int Open( vlc_object_t *p_this )
{
	dialog_Question (p_this, "title", "text", "yes", "no", "cancel");
}

/*****************************************************************************
 * Close: destroy interface
 *****************************************************************************/
static void Close( vlc_object_t *p_this )
{
}




More information about the vlc mailing list