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
04e363a9
Commit
04e363a9
authored
Aug 19, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plugin: use separate description command for lists and list callbacks
parent
b8a57f96
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
include/vlc_plugin.h
include/vlc_plugin.h
+12
-8
src/modules/entry.c
src/modules/entry.c
+4
-2
No files found.
include/vlc_plugin.h
View file @
04e363a9
...
@@ -91,13 +91,19 @@ enum vlc_module_properties
...
@@ -91,13 +91,19 @@ enum vlc_module_properties
VLC_CONFIG_DESC
,
VLC_CONFIG_DESC
,
/* description (args=const char *, const char *, const char *) */
/* description (args=const char *, const char *, const char *) */
VLC_CONFIG_LIST
,
VLC_CONFIG_LIST_OBSOLETE
,
/* possible values list
/* unused (ignored) */
* (args=const char *, size_t, const <type> *, const char *const *) */
VLC_CONFIG_ADD_ACTION_OBSOLETE
,
VLC_CONFIG_ADD_ACTION_OBSOLETE
,
/* unused (ignored) */
/* unused (ignored) */
VLC_CONFIG_LIST
,
/* list of suggested values
* (args=size_t, const <type> *, const char *const *) */
VLC_CONFIG_LIST_CB
,
/* callback for suggested values (args=size_t (*)(<type> **, char ***)) */
/* Insert new VLC_CONFIG_* here */
/* Insert new VLC_CONFIG_* here */
};
};
...
@@ -473,18 +479,16 @@ VLC_METADATA_EXPORTS
...
@@ -473,18 +479,16 @@ VLC_METADATA_EXPORTS
vlc_config_set (VLC_CONFIG_LIST, \
vlc_config_set (VLC_CONFIG_LIST, \
(size_t)(sizeof (list) / sizeof (char *)), \
(size_t)(sizeof (list) / sizeof (char *)), \
(const char *const *)(list), \
(const char *const *)(list), \
(const char *const *)(list_text), \
(const char *const *)(list_text));
(vlc_callback_t)NULL);
#define change_string_cb( cb ) \
#define change_string_cb( cb ) \
vlc_config_set (VLC_CONFIG_LIST
, 0, NULL, NULL, (vlc_callback_t)
(cb));
vlc_config_set (VLC_CONFIG_LIST
_CB,
(cb));
#define change_integer_list( list, list_text ) \
#define change_integer_list( list, list_text ) \
vlc_config_set (VLC_CONFIG_LIST, \
vlc_config_set (VLC_CONFIG_LIST, \
(size_t)(sizeof (list) / sizeof (int)), \
(size_t)(sizeof (list) / sizeof (int)), \
(const int *)(list), \
(const int *)(list), \
(const char *const *)(list_text), \
(const char *const *)(list_text));
(vlc_callback_t)(NULL));
#define change_integer_range( minv, maxv ) \
#define change_integer_range( minv, maxv ) \
vlc_config_set (VLC_CONFIG_RANGE, (int64_t)(minv), (int64_t)(maxv));
vlc_config_set (VLC_CONFIG_RANGE, (int64_t)(minv), (int64_t)(maxv));
...
...
src/modules/entry.c
View file @
04e363a9
...
@@ -417,12 +417,14 @@ static int vlc_plugin_setter (void *plugin, void *tgt, int propid, ...)
...
@@ -417,12 +417,14 @@ static int vlc_plugin_setter (void *plugin, void *tgt, int propid, ...)
dtext
[
len
]
=
NULL
;
dtext
[
len
]
=
NULL
;
}
}
item
->
ppsz_list_text
=
dtext
;
item
->
ppsz_list_text
=
dtext
;
item
->
i_list
=
len
;
item
->
i_list
=
len
;
item
->
pf_update_list
=
va_arg
(
ap
,
vlc_callback_t
);
break
;
break
;
}
}
case
VLC_CONFIG_LIST_CB
:
item
->
pf_update_list
=
va_arg
(
ap
,
vlc_callback_t
);
break
;
default:
default:
fprintf
(
stderr
,
"LibVLC: unknown module property %d
\n
"
,
propid
);
fprintf
(
stderr
,
"LibVLC: unknown module property %d
\n
"
,
propid
);
fprintf
(
stderr
,
"LibVLC: too old to use this module?
\n
"
);
fprintf
(
stderr
,
"LibVLC: too old to use this module?
\n
"
);
...
...
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