VLC 4.0.0-dev
vlc_config_cat.h
Go to the documentation of this file.
1/*****************************************************************************
2 * vlc_config_cat.h : Definition of configuration categories
3 *****************************************************************************
4 * Copyright (C) 2003 VLC authors and VideoLAN
5 *
6 * Authors: Clément Stenac <zorglub@videolan.org>
7 * Anil Daoud <anil@videolan.org>
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU Lesser General Public License as published by
11 * the Free Software Foundation; either version 2.1 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this program; if not, write to the Free Software Foundation,
21 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
23
24#ifndef VLC_CONFIG_CAT_H
25#define VLC_CONFIG_CAT_H
26
27# include <vlc_plugin.h>
28
29#define MAIN_TITLE N_( "VLC preferences" )
31/* - Titles -
32 * These are used for simple prefs view tabs, for advanced prefs view
33 * cat & subcat nodes, and for the panel titles of general subcat panels.
34 */
35
36#define INTF_TITLE N_( "Interface" )
37#define AUDIO_TITLE N_( "Audio" )
38#define VIDEO_TITLE N_( "Video" )
39#define INPUT_TITLE N_( "Input / Codecs" )
40#define SOUT_TITLE N_( "Stream output" )
41#define PLAYLIST_TITLE N_( "Playlist" )
42#define AADVANCED_TITLE N_( "Advanced" )
43#define SUBPIC_TITLE N_( "Subtitles / OSD" )
44#define HOTKEYS_TITLE N_( "Hotkeys" )
45#define ML_TITLE N_( "Media Library" )
47/* - Tooltip text -
48 * These are used for simple prefs view tabs.
49 */
50
51#define INTF_TOOLTIP N_( "Interface Settings" )
52#define AUDIO_TOOLTIP N_( "Audio Settings" )
53#define VIDEO_TOOLTIP N_( "Video Settings" )
54#define SUBPIC_TOOLTIP N_( "Subtitle & On Screen Display Settings" )
55#define INPUT_TOOLTIP N_( "Input & Codec Settings" )
56#define HOTKEYS_TOOLTIP N_( "Hotkeys Settings" )
57#define ML_TOOLTIP N_( "Media Library Settings" )
59/* - Help text -
60 * These are shown on advanced view panels.
61 */
62
63/* Interface */
64#define INTF_HELP N_( "Settings for VLC's interfaces" )
65#define INTF_GENERAL_HELP N_( "Main interfaces settings" )
66#define INTF_MAIN_HELP N_( "Settings for the main interface" )
67#define INTF_CONTROL_HELP N_( "Settings for VLC's control interfaces" )
68#define INTF_HOTKEYS_HELP N_( "Hotkeys settings" )
70/* Audio */
71#define AUDIO_HELP N_( "Audio settings" )
72#define AUDIO_GENERAL_HELP N_("General audio settings")
73#define AFILTER_HELP N_( "Audio filters are used to process the audio stream." )
74#define AVISUAL_HELP N_( "Audio visualizations" )
75#define AOUT_HELP N_("General settings for audio output modules.")
77/* Video */
78#define VIDEO_HELP N_("Video settings")
79#define VIDEO_GENERAL_HELP N_( "General video settings" )
80#define VOUT_HELP N_("General settings for video output modules.")
81#define VFILTER_HELP N_("Video filters are used to process the video stream." )
82#define SUBPIC_HELP N_( "Settings related to On-Screen-Display,"\
83 " subtitles and \"overlay subpictures\"")
84#define SPLITTER_HELP N_("Video splitters separate the stream into multiple videos.")
86/* Input */
87#define INPUT_HELP N_( "Settings for input, demultiplexing, " \
88 "decoding and encoding")
89#define ACCESS_HELP N_( \
90 "Settings related to the various access methods. " \
91 "Common settings you may want to alter are HTTP proxy or " \
92 "caching settings." )
93#define STREAM_FILTER_HELP N_( \
94 "Stream filters are special modules that allow advanced operations on " \
95 "the input side of VLC. Use with care..." )
96#define DEMUX_HELP N_( "Demuxers are used to separate audio and video streams." )
97#define VDEC_HELP N_( "Settings for the video, images or video+audio decoders and encoders." )
98#define ADEC_HELP N_( "Settings for the audio-only decoders and encoders." )
99#define SDEC_HELP N_( "Settings for subtitle, teletext and CC decoders and encoders." )
101/* Sout */
102#define SOUT_HELP N_( \
103 "Stream output settings are used when acting as a streaming server " \
104 "or when saving incoming streams.\n" \
105 "Streams are first muxed and then sent through an \"access output\" "\
106 "module that can either save the stream to a file, or stream " \
107 "it (UDP, HTTP, RTP/RTSP).\n" \
108 "Sout streams modules allow advanced stream processing (transcoding, "\
109 "duplicating...).")
110#define SOUT_GENERAL_HELP N_( "General stream output settings")
111#define SOUT_MUX_HELP N_( \
112 "Muxers create the encapsulation formats that are used to " \
113 "put all the elementary streams (video, audio, ...) " \
114 "together. This setting allows you to always force a specific muxer. " \
115 "You should probably not do that.\n" \
116 "You can also set default parameters for each muxer." )
117#define SOUT_ACO_HELP N_( \
118 "Access output modules control the ways the muxed streams are sent. " \
119 "This setting allows you to always force a specific access output method. " \
120 "You should probably not do that.\n" \
121 "You can also set default parameters for each access output.")
122#define SOUT_PACKET_HELP N_( \
123 "Packetizers are used to \"preprocess\" the elementary "\
124 "streams before muxing. " \
125 "This setting allows you to always force a packetizer. " \
126 "You should probably not do that.\n" \
127 "You can also set default parameters for each packetizer." )
128#define SOUT_RENDER_HELP N_( "External renderer discovery related settings." )
129#define SOUT_STREAM_HELP N_( "Sout stream modules allow to build a sout " \
130 "processing chain. Please refer to the Streaming 'how-to' for " \
131 "more information. You can configure default options for " \
132 "each sout stream module here.")
133#define SOUT_VOD_HELP N_( "VLC's implementation of Video On Demand" )
135/* Playlist */
136#define PLAYLIST_HELP N_( "Settings related to playlist behaviour " \
137 "(e.g. playback mode) and to modules that automatically add "\
138 "items to the playlist (\"service discovery\" modules).")
139#define PGENERAL_HELP N_( "General playlist behaviour")
140#define SD_HELP N_("Services discovery modules are facilities "\
141 "that automatically add items to playlist.")
142#define PEXPORT_HELP N_( "Settings relating to exporting playlists." )
144/* Advanced */
145#define AADVANCED_HELP N_( "Advanced settings. Use with care...")
146#define ANETWORK_HELP N_( "Advanced network settings." )
150 enum vlc_config_cat id;
152 const char *help;
154
159 const char *name;
160 const char *help;
162
163static const struct config_category_t categories_array[] =
172};
173
174static const struct config_subcategory_t subcategories_array[] =
178 { SUBCAT_PLAYLIST_SD, CAT_PLAYLIST, N_("Services discovery"), SD_HELP },
179
181 { SUBCAT_INTERFACE_CONTROL, CAT_INTERFACE, N_("Control interfaces"), INTF_CONTROL_HELP },
183 { SUBCAT_INTERFACE_MAIN, CAT_INTERFACE, N_("Main interfaces"), INTF_MAIN_HELP },
184
186 { SUBCAT_AUDIO_RESAMPLER, CAT_AUDIO, N_("Audio resampler"), AFILTER_HELP },
188 { SUBCAT_AUDIO_AOUT, CAT_AUDIO, N_("Output modules"), AOUT_HELP },
189 { SUBCAT_AUDIO_VISUAL, CAT_AUDIO, N_("Visualizations"), AVISUAL_HELP },
190
193 { SUBCAT_VIDEO_VOUT, CAT_VIDEO, N_("Output modules"), VOUT_HELP },
195 { SUBCAT_VIDEO_SUBPIC, CAT_VIDEO, N_("Subtitles / OSD"), SUBPIC_HELP },
196
198 { SUBCAT_INPUT_ACCESS, CAT_INPUT, N_("Access modules"), ACCESS_HELP },
199 { SUBCAT_INPUT_ACODEC, CAT_INPUT, N_("Audio codecs"), ADEC_HELP },
200 { SUBCAT_INPUT_DEMUX, CAT_INPUT, N_("Demuxers"), DEMUX_HELP },
202 { SUBCAT_INPUT_SCODEC, CAT_INPUT, N_("Subtitle codecs"), SDEC_HELP },
203 { SUBCAT_INPUT_VCODEC, CAT_INPUT, N_("Video codecs"), VDEC_HELP },
204
206 { SUBCAT_SOUT_ACO, CAT_SOUT, N_("Access output"), SOUT_ACO_HELP },
207 { SUBCAT_SOUT_MUX, CAT_SOUT, N_("Muxers"), SOUT_MUX_HELP },
210 { SUBCAT_SOUT_STREAM, CAT_SOUT, N_("Sout stream"), SOUT_STREAM_HELP },
212
215
216 { SUBCAT_HIDDEN, CAT_HIDDEN, NULL, NULL },
217};
218
219/** Get the table index for the given category entry. */
221static inline int vlc_config_cat_IndexOf( enum vlc_config_cat cat )
223 int index = -1;
224 for( unsigned i = 0; i < ARRAY_SIZE(categories_array); i++ )
225 {
226 if( categories_array[i].id == cat )
227 {
228 index = i;
229 break;
230 }
231 }
232 return index;
233}
234
235/** Get the table index for the given subcategory entry. */
237static inline int vlc_config_subcat_IndexOf( enum vlc_config_subcat subcat )
239 int index = -1;
240 for( unsigned i = 0; i < ARRAY_SIZE(subcategories_array); i++ )
241 {
242 if( subcategories_array[i].id == subcat )
243 {
244 index = i;
245 break;
246 }
247 }
248 return index;
249}
250
251/** Get the "general" subcategory for a given category.
252 *
253 * In a cat/subcat preference tree, subcategories typically appear as child
254 * nodes under their respective parent category node. Core config items, which
255 * are always associated with a particular subcategory, are shown when that
256 * subcategory node is selected. Each category however has a "general"
257 * subcategory which is not shown as a child node, instead the options for
258 * this are shown when the category node itself is selected in the tree.
259 *
260 * One or more nodes are also created in the tree per plugin, with the
261 * location relating to the subcategory association of its config items. Plugin
262 * nodes associated with general subcategories naturally appear as child nodes
263 * of the category node (as a sibling to its subcategory nodes), rather than as
264 * a child node of a subcategory node.
265 */
269 int i = vlc_config_cat_IndexOf( cat );
270 return (i != -1) ? categories_array[i].general_subcat : SUBCAT_UNKNOWN;
271}
272
273/** Get the name for a subcategory. */
275static inline const char *vlc_config_subcat_GetName( enum vlc_config_subcat subcat )
277 int i = vlc_config_subcat_IndexOf( subcat );
278 return (i != -1) ? vlc_gettext(subcategories_array[i].name) : NULL;
279}
280
281/** Get the help text for a subcategory. */
283static inline const char *vlc_config_subcat_GetHelp( enum vlc_config_subcat subcat )
285 int i = vlc_config_subcat_IndexOf( subcat );
286 return (i != -1) ? vlc_gettext(subcategories_array[i].help) : NULL;
287}
288
289/** Get the name for a category. */
291static inline const char *vlc_config_cat_GetName( enum vlc_config_cat cat )
294 return vlc_config_subcat_GetName( subcat );
295}
296
297/** Get the help text for a category. */
299static inline const char *vlc_config_cat_GetHelp( enum vlc_config_cat cat )
301 int i = vlc_config_cat_IndexOf( cat );
302 return (i != -1) ? vlc_gettext(categories_array[i].help) : NULL;
303}
304
305/** Get the parent category for the given subcategory. */
307static inline enum vlc_config_cat vlc_config_cat_FromSubcat( enum vlc_config_subcat subcat )
309 int i = vlc_config_subcat_IndexOf( subcat );
310 return (i != -1) ? subcategories_array[i].cat : CAT_UNKNOWN;
311}
312
313/** Check if the given subcategory is a "general" one. */
315static inline bool vlc_config_subcat_IsGeneral( enum vlc_config_subcat subcat )
317 if( subcat == SUBCAT_UNKNOWN )
318 return false;
320 return (subcat == vlc_config_cat_GetGeneralSubcat( cat ));
321}
322
323#endif /* VLC_CONFIG_CAT_H */
#define VLC_USED
Definition: fourcc_gen.c:32
const char name[16]
Definition: httpd.c:1281
Definition: vlc_config_cat.h:150
const char * help
Definition: vlc_config_cat.h:153
enum vlc_config_subcat general_subcat
Definition: vlc_config_cat.h:152
enum vlc_config_cat id
Definition: vlc_config_cat.h:151
Definition: vlc_config_cat.h:157
const char * help
Definition: vlc_config_cat.h:161
enum vlc_config_cat cat
Definition: vlc_config_cat.h:159
const char * name
Definition: vlc_config_cat.h:160
enum vlc_config_subcat id
Definition: vlc_config_cat.h:158
const char * vlc_gettext(const char *msgid)
In-tree plugins share their gettext domain with LibVLC.
Definition: textdomain.c:80
This file is a collection of common definitions and types.
#define ARRAY_SIZE(x)
Definition: vlc_common.h:991
static int vlc_config_subcat_IndexOf(enum vlc_config_subcat subcat)
Get the table index for the given subcategory entry.
Definition: vlc_config_cat.h:238
#define VIDEO_TITLE
Definition: vlc_config_cat.h:39
#define VIDEO_HELP
Definition: vlc_config_cat.h:79
#define SOUT_TITLE
Definition: vlc_config_cat.h:41
#define SOUT_HELP
Definition: vlc_config_cat.h:103
static const char * vlc_config_cat_GetName(enum vlc_config_cat cat)
Get the name for a category.
Definition: vlc_config_cat.h:292
#define SOUT_PACKET_HELP
Definition: vlc_config_cat.h:123
#define VDEC_HELP
Definition: vlc_config_cat.h:98
#define PLAYLIST_HELP
Definition: vlc_config_cat.h:137
#define AUDIO_TITLE
Definition: vlc_config_cat.h:38
#define AFILTER_HELP
Definition: vlc_config_cat.h:74
#define INTF_CONTROL_HELP
Definition: vlc_config_cat.h:68
#define ACCESS_HELP
Definition: vlc_config_cat.h:90
static const struct config_subcategory_t subcategories_array[]
Definition: vlc_config_cat.h:175
#define VIDEO_GENERAL_HELP
Definition: vlc_config_cat.h:80
#define INTF_GENERAL_HELP
Definition: vlc_config_cat.h:66
#define INTF_TITLE
Definition: vlc_config_cat.h:37
#define INPUT_HELP
Definition: vlc_config_cat.h:88
#define AUDIO_GENERAL_HELP
Definition: vlc_config_cat.h:73
static enum vlc_config_cat vlc_config_cat_FromSubcat(enum vlc_config_subcat subcat)
Get the parent category for the given subcategory.
Definition: vlc_config_cat.h:308
#define AOUT_HELP
Definition: vlc_config_cat.h:76
#define SD_HELP
Definition: vlc_config_cat.h:141
static const char * vlc_config_subcat_GetName(enum vlc_config_subcat subcat)
Get the name for a subcategory.
Definition: vlc_config_cat.h:276
#define SOUT_MUX_HELP
Definition: vlc_config_cat.h:112
#define PLAYLIST_TITLE
Definition: vlc_config_cat.h:42
static const struct config_category_t categories_array[]
Definition: vlc_config_cat.h:164
#define DEMUX_HELP
Definition: vlc_config_cat.h:97
#define VFILTER_HELP
Definition: vlc_config_cat.h:82
#define INPUT_TITLE
Definition: vlc_config_cat.h:40
#define ADEC_HELP
Definition: vlc_config_cat.h:99
#define INTF_HOTKEYS_HELP
Definition: vlc_config_cat.h:69
#define SDEC_HELP
Definition: vlc_config_cat.h:100
#define SOUT_VOD_HELP
Definition: vlc_config_cat.h:134
#define PGENERAL_HELP
Definition: vlc_config_cat.h:140
#define SOUT_STREAM_HELP
Definition: vlc_config_cat.h:130
#define ANETWORK_HELP
Definition: vlc_config_cat.h:147
static const char * vlc_config_cat_GetHelp(enum vlc_config_cat cat)
Get the help text for a category.
Definition: vlc_config_cat.h:300
#define AUDIO_HELP
Definition: vlc_config_cat.h:72
#define AVISUAL_HELP
Definition: vlc_config_cat.h:75
static enum vlc_config_subcat vlc_config_cat_GetGeneralSubcat(enum vlc_config_cat cat)
Get the "general" subcategory for a given category.
Definition: vlc_config_cat.h:268
#define INTF_HELP
Definition: vlc_config_cat.h:65
#define AADVANCED_HELP
Definition: vlc_config_cat.h:146
#define SPLITTER_HELP
Definition: vlc_config_cat.h:85
#define PEXPORT_HELP
Definition: vlc_config_cat.h:143
#define STREAM_FILTER_HELP
Definition: vlc_config_cat.h:94
#define SOUT_ACO_HELP
Definition: vlc_config_cat.h:118
static const char * vlc_config_subcat_GetHelp(enum vlc_config_subcat subcat)
Get the help text for a subcategory.
Definition: vlc_config_cat.h:284
#define SOUT_RENDER_HELP
Definition: vlc_config_cat.h:129
#define INTF_MAIN_HELP
Definition: vlc_config_cat.h:67
#define VOUT_HELP
Definition: vlc_config_cat.h:81
static bool vlc_config_subcat_IsGeneral(enum vlc_config_subcat subcat)
Check if the given subcategory is a "general" one.
Definition: vlc_config_cat.h:316
#define SUBPIC_HELP
Definition: vlc_config_cat.h:83
static int vlc_config_cat_IndexOf(enum vlc_config_cat cat)
Get the table index for the given category entry.
Definition: vlc_config_cat.h:222
#define AADVANCED_TITLE
Definition: vlc_config_cat.h:43
#define SOUT_GENERAL_HELP
Definition: vlc_config_cat.h:111
#define N_(str)
Definition: vlc_fixups.h:450
This file implements plugin (module) macros used to define a vlc module.
vlc_config_cat
Definition: vlc_plugin.h:152
@ CAT_SOUT
Definition: vlc_plugin.h:164
@ CAT_AUDIO
Definition: vlc_plugin.h:161
@ CAT_HIDDEN
Definition: vlc_plugin.h:156
@ CAT_PLAYLIST
Definition: vlc_plugin.h:166
@ CAT_VIDEO
Definition: vlc_plugin.h:162
@ CAT_INPUT
Definition: vlc_plugin.h:163
@ CAT_ADVANCED
Definition: vlc_plugin.h:165
@ CAT_UNKNOWN
Definition: vlc_plugin.h:158
@ CAT_INTERFACE
Definition: vlc_plugin.h:160
vlc_config_subcat
Definition: vlc_plugin.h:171
@ SUBCAT_VIDEO_GENERAL
Definition: vlc_plugin.h:190
@ SUBCAT_PLAYLIST_SD
Definition: vlc_plugin.h:216
@ SUBCAT_SOUT_GENERAL
Definition: vlc_plugin.h:204
@ SUBCAT_INTERFACE_HOTKEYS
Definition: vlc_plugin.h:182
@ SUBCAT_INTERFACE_MAIN
Definition: vlc_plugin.h:180
@ SUBCAT_SOUT_PACKETIZER
Definition: vlc_plugin.h:208
@ SUBCAT_INPUT_STREAM_FILTER
Definition: vlc_plugin.h:202
@ SUBCAT_SOUT_STREAM
Definition: vlc_plugin.h:205
@ SUBCAT_INPUT_ACODEC
Definition: vlc_plugin.h:200
@ SUBCAT_SOUT_VOD
Definition: vlc_plugin.h:209
@ SUBCAT_INPUT_GENERAL
Definition: vlc_plugin.h:196
@ SUBCAT_VIDEO_VFILTER
Definition: vlc_plugin.h:192
@ SUBCAT_VIDEO_SPLITTER
Definition: vlc_plugin.h:194
@ SUBCAT_INTERFACE_GENERAL
Definition: vlc_plugin.h:179
@ SUBCAT_SOUT_MUX
Definition: vlc_plugin.h:206
@ SUBCAT_AUDIO_RESAMPLER
Definition: vlc_plugin.h:188
@ SUBCAT_HIDDEN
Definition: vlc_plugin.h:175
@ SUBCAT_SOUT_RENDERER
Definition: vlc_plugin.h:210
@ SUBCAT_PLAYLIST_GENERAL
Definition: vlc_plugin.h:215
@ SUBCAT_AUDIO_AFILTER
Definition: vlc_plugin.h:186
@ SUBCAT_INPUT_VCODEC
Definition: vlc_plugin.h:199
@ SUBCAT_INPUT_DEMUX
Definition: vlc_plugin.h:198
@ SUBCAT_INTERFACE_CONTROL
Definition: vlc_plugin.h:181
@ SUBCAT_AUDIO_VISUAL
Definition: vlc_plugin.h:187
@ SUBCAT_SOUT_ACO
Definition: vlc_plugin.h:207
@ SUBCAT_UNKNOWN
Definition: vlc_plugin.h:177
@ SUBCAT_ADVANCED_MISC
Definition: vlc_plugin.h:212
@ SUBCAT_AUDIO_AOUT
Definition: vlc_plugin.h:185
@ SUBCAT_INPUT_ACCESS
Definition: vlc_plugin.h:197
@ SUBCAT_ADVANCED_NETWORK
Definition: vlc_plugin.h:213
@ SUBCAT_VIDEO_SUBPIC
Definition: vlc_plugin.h:193
@ SUBCAT_PLAYLIST_EXPORT
Definition: vlc_plugin.h:217
@ SUBCAT_INPUT_SCODEC
Definition: vlc_plugin.h:201
@ SUBCAT_AUDIO_GENERAL
Definition: vlc_plugin.h:184
@ SUBCAT_VIDEO_VOUT
Definition: vlc_plugin.h:191