[vlc-devel] [RFC] Preferences system

Clément Stenac zorglub at via.ecp.fr
Mon Sep 27 19:27:33 CEST 2004


VLC rulez, but VLC preferences suxx.

The main problem is that you need to be a VLC and audio/video guru to
find what you are searching.

I see two reasons to that

- Because libvlc preferences are separated from modules preferences, you
  often need to go to two places to set what you want. For example, you
  select video filters in libvlc preferences (add to that the fact that at
  the moment, there is no widget for multi-selection, so you can only
  select one) and then you must go to modules/video_filter/yourfilter to
  configure it, which is really counter-intuitive.

- Modules are sorted by "capabilities", which is an internal and non
  human-readable property of a module. Add this to the fact that they
  are often either non-distinctive (sap is an "interface") or not
  understandable (wtf is a "dialogs provider", for an user ? )

So here is a first draft for a rework of the preferences system, or at
least, how preferences are organized.

The main idea is to organize them thematically.

Here is a first preview of the proposed organization

-------------------------

---> Playlist
	--> General
	--> Service Discovery (here, choose modules to enable)
		--> sap
		--> slp

---> Interface
	--> Hotkeys
	--> GUI (Select module(s) here)
		--> wx
		--> skins
	--> Control (Select module(s) here)
		--> rc
		--> http

---> Input
	--> Access modules (choose prefered module here ?)
		--> http
		--> udp
	--> Demultiplexers
	--> Video decoders
	--> Audio decoders
	--> Subtitle "decoders"
	--> Advanced settings (MTU, intf-addr, default channels,
	      cr-average, ...)

---> Audio
	--> General settings
	--> Audio filters (Select filter(s) here)
		--> equalizer
	--> Audio outputs (Select output here)
		--> oss
		--> alsa

---> Video
	--> General settings (overlay, OSD, fullscreen, ...)
	--> Video filters (Select filter(s))
		--> ...
	--> Video outputs (select here)
		--> X11
		--> Xvideo
	--> Text rendering

---> Stream output
	--> General settings
	--> Encoders (Select prefered)
	--> Muxers (Select prefered)
	--> Output (Select prefered)
	--> Stream output processing (sout_stream)
	

---> Advanced
	--> CPU
	--> Other modules (chroma, memcpy, network, ... )
		

----------------------------------------

The most important is that we mustn't be focused on how vlc works
internally so we mustn't use the capabilities.The most important is that
we mustn't be focused on how vlc works internally so we mustn't use the
capabilities.

So to do this, we would have to add a "category" property to each
module. This way, we don't get modules that we want only once twice
(like wxwindows in intf+dialogs provider).

For the libvlc part, preferences will be sorted by category/subcategory.

Example for aout :

set_category( "Audio" )
set_subcategory( "General") 
add_bool("audio")
add_integer("volume")
add_integer("rate")
set_subcategory( "Audio output" )
add_module( "aout")
set_subcategory( "Audio filter(s)" )
add_string( "audio-filter" ) <-- will become something like add_module_list

And aout modules will declare
set_category( "Audio" )
set_subcategory( "Audio output" )

and will appear at the right place in the tree.

Each category and subcategory must have a complete help string (in
vlc_help.h).

Of course, the given code snippet is a sample, it might be better to use
an Id for category/subcategory and have all of them listed in a central
place.


We also must have new preference widgets "module-list-with-separator",
mainly intended for filters, and "module-list", for extra interfaces.

----------------------------------------------
|					     |
|					     |
|        [X]  Filter 1			     |
|        [ ]  Filter 2			     |
|        [X]  Filter 3			     |
|					     |
|					     |
|   Filter string: [ filter1,filter3      ]  |
|                                            |
----------------------------------------------

The filter string must update when user checks filters, so he can tweak
the order of the filters.

And of course, it must remain generic :)

For the module selector widget, we should add a button "Configure
selected module" that takes the user to the module's page.

Modules that don't declare a category and/or subcategory fall in other
modules (what if the parent module declares a category ?).

Naturally, as this is both a RFC and a draft, (constructive) comments
and suggestions are more than welcome.


-- 
Zorglub
Clément Stenac

-- 
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