Difference between revisions of "Documentation:VLC Modules Loading"

From VideoLAN Wiki
Jump to navigation Jump to search
Line 14: Line 14:
 
*the score, VLC_MODULE_SCORE, that holds the priority of the module
 
*the score, VLC_MODULE_SCORE, that holds the priority of the module
  
<br>
 
  
 
== How does the loading of modules happens  ==
 
== How does the loading of modules happens  ==
Line 20: Line 19:
 
VLC keeps a list of detected VLC modules (named the '''plugins cache''').  
 
VLC keeps a list of detected VLC modules (named the '''plugins cache''').  
  
When VLC needs a module, it tries to open a the higher-score capability-matching module that accept the request.<br>
+
When VLC needs a module, it tries to open a the higher-score capability-matching module that accept the request.
 +
 
  
 
Let's do an '''example'''.  
 
Let's do an '''example'''.  
Line 26: Line 26:
 
When VLC needs a "decoder" ("decoder" is one category/capability), it opens all "decoder" modules, until one matches.  
 
When VLC needs a "decoder" ("decoder" is one category/capability), it opens all "decoder" modules, until one matches.  
  
It opens them in decreasing score order (bigger score first, smaller ones at the end), and runs the Open() function of the modules. When one module returns OK, VLC uses this module.<br>
+
It opens them in decreasing score order (bigger score first, smaller ones at the end), and runs the Open() function of the modules. When one module returns OK, VLC uses this module.
 +
 
  
== Advanced infos about modules loading<br> ==
+
== Advanced infos about modules loading ==
  
 
=== Score of 0  ===
 
=== Score of 0  ===
Line 42: Line 43:
 
*Any module can be requested by using its direct shortname. This is useful for 0-scored modules.
 
*Any module can be requested by using its direct shortname. This is useful for 0-scored modules.
  
=== examples ===
+
=== examples ===
  
 
Modules requests can be chained, as the '''examples''' show:  
 
Modules requests can be chained, as the '''examples''' show:  
Line 52: Line 53:
 
  '' try the avformat module and no other module''
 
  '' try the avformat module and no other module''
  
By default, modules requests are in the '''"all"''' mode, and "all" can be omitted.
+
By default, modules requests are in the '''"all"''' mode, and "all" can be omitted.  
  
 
== How to list Modules  ==
 
== How to list Modules  ==
Line 66: Line 67:
 
= Major Capabilities  =
 
= Major Capabilities  =
  
*'''audio filter<br>'''
+
*'''audio filter<br>'''  
*'''audio mixer'''
+
*'''audio mixer'''  
*'''audio output'''
+
*'''audio output'''  
*'''decoder'''
+
*'''decoder'''  
*'''demux'''
+
*'''demux'''  
*'''encoder'''
+
*'''encoder'''  
*'''interface'''
+
*'''interface'''  
*'''meta reader'''
+
*'''meta reader'''  
*'''meta writer'''
+
*'''meta writer'''  
*'''packetizer'''
+
*'''packetizer'''  
*'''playlist export'''
+
*'''playlist export'''  
*'''services_discovery'''
+
*'''services_discovery'''  
*'''sout access'''
+
*'''sout access'''  
*'''sout mux'''
+
*'''sout mux'''  
*'''sout stream'''
+
*'''sout stream'''  
*'''stream_filter'''
+
*'''stream_filter'''  
*'''text renderer'''
+
*'''text renderer'''  
*'''video filter'''
+
*'''video filter'''  
*'''visualization2'''
+
*'''visualization2'''  
 
*'''vout display'''
 
*'''vout display'''
  
 
<br>
 
<br>

Revision as of 18:09, 30 October 2010

VLC modules loading

How does VLC load modules?

Introduction about Modules

VLC has a core and a lot of modules (between 200 and 400 depending on the build).

VLC cannot do much without modules, since modules are providing most of the functionnalities we expect. See the "Major Capabilites" sections.

A VLC module has 2 major properties:

  • the capability, VLC_MODULE_CAPABILITY, that describes the category of the module
  • the score, VLC_MODULE_SCORE, that holds the priority of the module


How does the loading of modules happens

VLC keeps a list of detected VLC modules (named the plugins cache).

When VLC needs a module, it tries to open a the higher-score capability-matching module that accept the request.


Let's do an example.

When VLC needs a "decoder" ("decoder" is one category/capability), it opens all "decoder" modules, until one matches.

It opens them in decreasing score order (bigger score first, smaller ones at the end), and runs the Open() function of the modules. When one module returns OK, VLC uses this module.


Advanced infos about modules loading

Score of 0

If a module has a score of 0, it needs to be explicitly requested by the user (like forcing --codec or --vout) to be loaded.

all, none and other special tweaks

  • The "all" mode means all modules will be tested in decreasing order of score.
  • The "none" mode means no modules will be tested.
  • Any module can be requested by using its direct shortname. This is useful for 0-scored modules.

examples

Modules requests can be chained, as the examples show:

--codec avcodec,all
try the avcodec module than all modules as a "decoder"
--demux avformat,none
 try the avformat module and no other module

By default, modules requests are in the "all" mode, and "all" can be omitted.

How to list Modules

  • Using Console
vlc --list
  • Using GUI
Menu -> Tools -> Plugins and extensions

Major Capabilities

  • audio filter
  • audio mixer
  • audio output
  • decoder
  • demux
  • encoder
  • interface
  • meta reader
  • meta writer
  • packetizer
  • playlist export
  • services_discovery
  • sout access
  • sout mux
  • sout stream
  • stream_filter
  • text renderer
  • video filter
  • visualization2
  • vout display