Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
1f9d8d6c
Commit
1f9d8d6c
authored
Dec 16, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate module, module_list and obsolete_* to vlc_config_set
parent
f756ebd7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
15 deletions
+53
-15
include/vlc_configuration.h
include/vlc_configuration.h
+38
-12
src/config/core.c
src/config/core.c
+2
-3
src/modules/entry.c
src/modules/entry.c
+13
-0
No files found.
include/vlc_configuration.h
View file @
1f9d8d6c
...
...
@@ -235,15 +235,39 @@ typedef enum vlc_config_properties
{
/* DO NOT EVER REMOVE, INSERT OR REPLACE ANY ITEM! It would break the ABI!
* Append new items at the end ONLY. */
VLC_CONFIG_NAME
,
/* command line name (args=const char *, vlc_callback_t) */
VLC_CONFIG_DESC
,
/* description (args=const char *, const char *) */
VLC_CONFIG_VALUE
,
/* actual value (args=<type>) */
VLC_CONFIG_RANGE
,
/* minimum value (args=<type>, <type>) */
VLC_CONFIG_ADVANCED
,
/* enable advanced flag (args=none) */
VLC_CONFIG_VOLATILE
,
/* don't write variable to storage (args=none) */
VLC_CONFIG_PERSISTENT
,
/* always write variable to storage (args=none) */
VLC_CONFIG_RESTART
,
/* restart required to apply value change (args=none) */
VLC_CONFIG_PRIVATE
,
/* hide from user (args=none) */
VLC_CONFIG_NAME
,
/* command line name (args=const char *, vlc_callback_t) */
VLC_CONFIG_DESC
,
/* description (args=const char *, const char *) */
VLC_CONFIG_VALUE
,
/* actual value (args=int/double/const char *) */
VLC_CONFIG_RANGE
,
/* minimum value (args=int/double/const char * twice) */
VLC_CONFIG_ADVANCED
,
/* enable advanced flag (args=none) */
VLC_CONFIG_VOLATILE
,
/* don't write variable to storage (args=none) */
VLC_CONFIG_PERSISTENT
,
/* always write variable to storage (args=none) */
VLC_CONFIG_RESTART
,
/* restart required to apply value change (args=none) */
VLC_CONFIG_PRIVATE
,
/* hide from user (args=none) */
VLC_CONFIG_REMOVED
,
/* tag as no longer supported (args=none) */
VLC_CONFIG_CAPABILITY
,
/* capability for a module or list thereof (args=const char*) */
}
vlc_config_t
;
...
...
@@ -334,7 +358,8 @@ VLC_EXPORT( int, vlc_config_set, (module_config_t *, vlc_config_t, ...) );
#define add_module( name, psz_caps, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_MODULE, name, text, longtext, advc, p_callback, value ); \
p_config[i_config].psz_type = psz_caps
vlc_config_set (p_config + i_config, VLC_CONFIG_CAPABILITY, \
(const char *)(psz_caps))
#define add_module_cat( name, i_subcategory, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_MODULE_CAT, name, text, longtext, advc, p_callback, value ); \
...
...
@@ -342,7 +367,8 @@ VLC_EXPORT( int, vlc_config_set, (module_config_t *, vlc_config_t, ...) );
#define add_module_list( name, psz_caps, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_MODULE_LIST, name, text, longtext, advc, p_callback, value ); \
p_config[i_config].psz_type = psz_caps
vlc_config_set (p_config + i_config, VLC_CONFIG_CAPABILITY, \
(const char *)(psz_caps))
#define add_module_list_cat( name, i_subcategory, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_MODULE_LIST_CAT, name, text, longtext, advc, p_callback, value ); \
...
...
@@ -386,7 +412,7 @@ VLC_EXPORT( int, vlc_config_set, (module_config_t *, vlc_config_t, ...) );
add_type_inner( type ); \
vlc_config_set (p_config + i_config, VLC_CONFIG_NAME, \
(const char *)(name), (vlc_callback_t)NULL); \
p_config[ i_config ].psz_current = "SUPPRESSED"
vlc_config_set (p_config + i_config, VLC_CONFIG_REMOVED)
#define add_obsolete_bool( name ) \
add_obsolete_inner( name, CONFIG_ITEM_BOOL )
...
...
src/config/core.c
View file @
1f9d8d6c
...
...
@@ -540,9 +540,9 @@ int config_Duplicate( module_t *p_module, const module_config_t *p_orig,
p_module
->
p_config
[
i
].
saved
.
psz
=
NULL
;
}
p_module
->
p_config
[
i
].
psz_type
=
strdupnull
(
p_orig
[
i
].
psz_type
)
;
p_module
->
p_config
[
i
].
psz_type
=
p_orig
[
i
].
psz_type
;
p_module
->
p_config
[
i
].
psz_name
=
p_orig
[
i
].
psz_name
;
p_module
->
p_config
[
i
].
psz_current
=
strdupnull
(
p_orig
[
i
].
psz_current
)
;
p_module
->
p_config
[
i
].
psz_current
=
p_orig
[
i
].
psz_current
;
p_module
->
p_config
[
i
].
psz_text
=
p_orig
[
i
].
psz_text
;
p_module
->
p_config
[
i
].
psz_longtext
=
p_orig
[
i
].
psz_longtext
;
...
...
@@ -628,7 +628,6 @@ void config_Free( module_t *p_module )
free
(
(
char
*
)
p_item
->
psz_type
);
free
(
(
char
*
)
p_item
->
psz_name
);
free
(
(
char
*
)
p_item
->
psz_current
);
free
(
(
char
*
)
p_item
->
psz_text
);
free
(
(
char
*
)
p_item
->
psz_longtext
);
...
...
src/modules/entry.c
View file @
1f9d8d6c
...
...
@@ -259,6 +259,19 @@ int vlc_config_set (module_config_t *restrict item, vlc_config_t id, ...)
item
->
b_internal
=
VLC_TRUE
;
ret
=
0
;
break
;
case
VLC_CONFIG_REMOVED
:
item
->
psz_current
=
"SUPPRESSED"
;
ret
=
0
;
break
;
case
VLC_CONFIG_CAPABILITY
:
{
const
char
*
cap
=
va_arg
(
ap
,
const
char
*
);
item
->
psz_type
=
cap
?
strdup
(
cap
)
:
NULL
;
ret
=
0
;
break
;
}
}
va_end
(
ap
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment