[vlc-devel] Re: How to write add a new plugin?

Mark Moriarty mfmbusiness at earthlink.net
Sun Feb 5 14:03:04 CET 2006


I'm not sure if perhaps you, and the person working on the part file plugin,
have the same underlying questions.

To get a plugin to be properly seen by VLC:
When you add a module abide to the following. 

1: Add the new files to a new target in a Modules.am file. If you create a
new directory (ill advised) you'll need to create a new Modules.am file. 
2: add the name of the module (as defined in the Modules.am) to the
configure.ac file BUILTIN_MODULES or something will do. 
3: if your module needs any options, these have to be added in the
configure.ac file (see other modules i.e. mkv or something) 
4: rerun bootstrap and configure

For example, I wrote the marquee video subfilter, marq.c, found in
modules/video_filter.
In modules/video_filter/modules.am, you will see the line:
SOURCES_marq = marq.c

In configure.ac, up at the top level of the VLC trunk, note that marq is
referenced in the line:
  VLC_ADD_PLUGINS([gestures rc telnet hotkeys netsync showintf time marq
podcast shout sap fake])

The plugin, of course, has to follow the right "rules" to make it valid,
useable, by VLC.

For marquee, my prototypes were time.c and logo.c, other filters that did
the same kind of thing I wanted to do.  A lot of "gludge", hooks and
handles, are easiest to get by copying from a filter that does something
close to what you intend the new code to do.

Good luck!


-----Original Message-----
From: vlc-devel-bounce at videolan.org [mailto:vlc-devel-bounce at videolan.org]
On Behalf Of Nelson Lam
Sent: Sunday, February 05, 2006 6:13 AM
To: vlc-devel at videolan.org
Subject: [vlc-devel] How to write add a new plugin?

Hi everyone~

I am trying to add a new codec to vlc. But I don't know how to add the codec
as a plugin. Could anyone please help me to solve the problem?

Best Regards,
Nelson Lam

nelson.lam at student.cityu.edu.hk


--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/ To
unsubscribe, please read http://developers.videolan.org/lists.html

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list