Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
3d0196c7
Commit
3d0196c7
authored
Dec 18, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Good riddance the helper module
parent
92fc113b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
99 deletions
+0
-99
src/config/config.h
src/config/config.h
+0
-3
src/config/core.c
src/config/core.c
+0
-38
src/libvlc-common.c
src/libvlc-common.c
+0
-51
src/libvlc-module.c
src/libvlc-module.c
+0
-7
No files found.
src/config/config.h
View file @
3d0196c7
...
...
@@ -34,9 +34,6 @@ extern "C" {
int
config_CreateDir
(
vlc_object_t
*
,
const
char
*
);
int
config_AutoSaveConfigFile
(
vlc_object_t
*
);
/* TODO: remove this, only used for helper module */
int
config_Duplicate
(
module_t
*
,
module_config_t
*
,
size_t
);
void
config_Free
(
module_t
*
);
void
config_SetCallbacks
(
module_config_t
*
,
module_config_t
*
,
size_t
);
...
...
src/config/core.c
View file @
3d0196c7
...
...
@@ -479,44 +479,6 @@ module_config_t *config_FindConfig( vlc_object_t *p_this, const char *psz_name )
return
NULL
;
}
/*****************************************************************************
* config_Duplicate: creates a duplicate of a module's configuration data.
*****************************************************************************
* Unfortunatly we cannot work directly with the module's config data as
* this module might be unloaded from memory at any time (remember HideModule).
* This is why we need to create an exact copy of the config data.
*****************************************************************************/
int
config_Duplicate
(
module_t
*
p_module
,
module_config_t
*
p_orig
,
size_t
n
)
{
const
module_config_t
*
p_item
,
*
p_end
=
p_orig
+
n
;
/* Calculate the structure length */
for
(
p_item
=
p_orig
;
p_item
<
p_end
;
p_item
++
)
{
if
(
p_item
->
i_type
&
CONFIG_ITEM
)
{
p_module
->
i_config_items
++
;
}
if
(
p_item
->
i_type
==
CONFIG_ITEM_BOOL
)
{
p_module
->
i_bool_items
++
;
}
}
p_module
->
p_config
=
p_orig
;
p_module
->
confsize
=
n
;
/* Do the duplication job */
for
(
size_t
i
=
0
;
i
<
n
;
i
++
)
{
p_module
->
p_config
[
i
].
p_lock
=
&
p_module
->
object_lock
;
}
return
VLC_SUCCESS
;
}
/*****************************************************************************
* config_Free: frees a duplicated module's configuration data.
*****************************************************************************
...
...
src/libvlc-common.c
View file @
3d0196c7
...
...
@@ -247,7 +247,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
char
*
psz_control
=
NULL
;
vlc_bool_t
b_exit
=
VLC_FALSE
;
int
i_ret
=
VLC_EEXIT
;
module_t
*
p_help_module
=
NULL
;
playlist_t
*
p_playlist
=
NULL
;
vlc_value_t
val
;
#if defined( ENABLE_NLS ) \
...
...
@@ -289,25 +288,8 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
* options) */
module_InitBank
(
p_libvlc
);
/* Hack: insert the help module here */
p_help_module
=
vlc_module_create
(
VLC_OBJECT
(
p_libvlc
)
);
if
(
p_help_module
==
NULL
)
{
module_EndBank
(
p_libvlc
);
return
VLC_EGENERIC
;
}
p_help_module
->
psz_object_name
=
"help"
;
p_help_module
->
psz_longname
=
N_
(
"Help options"
);
config_Duplicate
(
p_help_module
,
libvlc_config
,
libvlc_config_count
);
vlc_object_attach
(
p_help_module
,
libvlc_global
.
p_module_bank
);
/* End hack */
if
(
config_LoadCmdLine
(
p_libvlc
,
&
i_argc
,
ppsz_argv
,
VLC_TRUE
)
)
{
vlc_object_detach
(
p_help_module
);
p_help_module
->
p_config
=
NULL
;
p_help_module
->
confsize
=
0
;
vlc_object_destroy
(
p_help_module
);
module_EndBank
(
p_libvlc
);
return
VLC_EGENERIC
;
}
...
...
@@ -340,10 +322,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
libvlc_global
.
p_module_bank
->
b_cache_delete
=
VLC_TRUE
;
}
/* Hack: remove the help module here */
vlc_object_detach
(
p_help_module
);
/* End hack */
/* Will be re-done properly later on */
p_libvlc
->
i_verbose
=
config_GetInt
(
p_libvlc
,
"verbose"
);
...
...
@@ -414,8 +392,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
if
(
b_exit
)
{
p_help_module
->
p_config
=
NULL
;
p_help_module
->
confsize
=
0
;
vlc_object_destroy
(
p_help_module
);
module_EndBank
(
p_libvlc
);
return
i_ret
;
}
...
...
@@ -467,10 +443,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
msg_Dbg
(
p_libvlc
,
"module bank initialized, found %i modules"
,
libvlc_global
.
p_module_bank
->
i_children
);
/* Hack: insert the help module here */
vlc_object_attach
(
p_help_module
,
libvlc_global
.
p_module_bank
);
/* End hack */
/* Check for help on modules */
if
(
(
p_tmp
=
config_GetPsz
(
p_libvlc
,
"module"
))
)
{
...
...
@@ -503,29 +475,19 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
/* Check for config file options */
if
(
config_GetInt
(
p_libvlc
,
"reset-config"
)
)
{
vlc_object_detach
(
p_help_module
);
config_ResetAll
(
p_libvlc
);
config_LoadCmdLine
(
p_libvlc
,
&
i_argc
,
ppsz_argv
,
VLC_TRUE
);
config_SaveConfigFile
(
p_libvlc
,
NULL
);
vlc_object_attach
(
p_help_module
,
libvlc_global
.
p_module_bank
);
}
if
(
config_GetInt
(
p_libvlc
,
"save-config"
)
)
{
vlc_object_detach
(
p_help_module
);
config_LoadConfigFile
(
p_libvlc
,
NULL
);
config_LoadCmdLine
(
p_libvlc
,
&
i_argc
,
ppsz_argv
,
VLC_TRUE
);
config_SaveConfigFile
(
p_libvlc
,
NULL
);
vlc_object_attach
(
p_help_module
,
libvlc_global
.
p_module_bank
);
}
/* Hack: remove the help module here */
vlc_object_detach
(
p_help_module
);
/* End hack */
if
(
b_exit
)
{
p_help_module
->
p_config
=
NULL
;
p_help_module
->
confsize
=
0
;
vlc_object_destroy
(
p_help_module
);
module_EndBank
(
p_libvlc
);
return
i_ret
;
}
...
...
@@ -540,10 +502,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
*/
config_LoadConfigFile
(
p_libvlc
,
NULL
);
/* Hack: insert the help module here */
vlc_object_attach
(
p_help_module
,
libvlc_global
.
p_module_bank
);
/* End hack */
/*
* Override configuration with command line settings
*/
...
...
@@ -556,19 +514,10 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
"that they are valid.
\n
"
);
PauseConsole
();
#endif
vlc_object_detach
(
p_help_module
);
p_help_module
->
p_config
=
NULL
;
p_help_module
->
confsize
=
0
;
vlc_object_destroy
(
p_help_module
);
module_EndBank
(
p_libvlc
);
return
VLC_EGENERIC
;
}
/* Hack: remove the help module here */
vlc_object_detach
(
p_help_module
);
p_help_module
->
p_config
=
NULL
;
p_help_module
->
confsize
=
0
;
vlc_object_destroy
(
p_help_module
);
/* End hack */
/*
* System specific configuration
*/
...
...
src/libvlc-module.c
View file @
3d0196c7
...
...
@@ -2461,13 +2461,6 @@ vlc_module_begin();
set_capability
(
"main"
,
100
);
vlc_module_end
();
module_config_t
libvlc_config
[]
=
{
};
const
size_t
libvlc_config_count
=
sizeof
(
libvlc_config
)
/
sizeof
(
libvlc_config
[
0
]);
/*****************************************************************************
* End configuration.
*****************************************************************************/
...
...
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