Difference between revisions of "Hacker Guide/How To Write a Module"
Jump to navigation
Jump to search
Line 15: | Line 15: | ||
set_description( _("DVDRead Input (DVD without menu support)") ); | set_description( _("DVDRead Input (DVD without menu support)") ); | ||
set_category( CAT_INPUT ); | set_category( CAT_INPUT ); | ||
− | |||
</pre> | </pre> | ||
Note the use of _("") to create a string. -- Is this required?? | Note the use of _("") to create a string. -- Is this required?? | ||
Line 27: | Line 26: | ||
* CAT_ADVANCED | * CAT_ADVANCED | ||
* CAT_PLAYLIST | * CAT_PLAYLIST | ||
+ | |||
+ | <pre> | ||
+ | set_subcategory( SUBCAT_INPUT_ACCESS ); | ||
+ | </pre> | ||
+ | See include/configuration.h for definition of all categories and sub-categories | ||
== Open(vlc_object_t *) == | == Open(vlc_object_t *) == | ||
== Close(vlc_object_t *) == | == Close(vlc_object_t *) == |
Revision as of 19:34, 12 February 2007
- This guide is being written by a VLC novice. Please verify all statements below
- Using dvdread.c as the template
Module Descriptor
A VLC plugin must include a description of itself, and the parameters it accepts.
The module descriptor begins with:
vlc_module_being();
You should set some category information on your module:
set_shortname( _("DVD without menus") ); set_description( _("DVDRead Input (DVD without menu support)") ); set_category( CAT_INPUT );
Note the use of _("") to create a string. -- Is this required??
Predefined Categories include:
- CAT_INTERFACE
- CAT_AUDIO
- CAT_VIDEO
- CAT_INPUT
- CAT_SOUT
- CAT_ADVANCED
- CAT_PLAYLIST
set_subcategory( SUBCAT_INPUT_ACCESS );
See include/configuration.h for definition of all categories and sub-categories