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
b4b1caac
Commit
b4b1caac
authored
Oct 05, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup b_cache_delete
parent
024c28ef
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
17 deletions
+11
-17
src/libvlc.c
src/libvlc.c
+2
-8
src/modules/cache.c
src/modules/cache.c
+2
-2
src/modules/modules.c
src/modules/modules.c
+4
-4
src/modules/modules.h
src/modules/modules.h
+3
-3
No files found.
src/libvlc.c
View file @
b4b1caac
...
...
@@ -365,10 +365,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
priv
->
psz_configfile
=
config_GetCustomConfigFile
(
p_libvlc
);
/* Check for plugins cache options */
if
(
config_GetInt
(
p_libvlc
,
"reset-plugins-cache"
)
>
0
)
{
p_module_bank
->
b_cache_delete
=
true
;
}
bool
b_cache_delete
=
config_GetInt
(
p_libvlc
,
"reset-plugins-cache"
)
>
0
;
/* Will be re-done properly later on */
priv
->
i_verbose
=
config_GetInt
(
p_libvlc
,
"verbose"
);
...
...
@@ -459,8 +456,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
psz_language
=
config_GetPsz
(
p_libvlc
,
"language"
);
if
(
psz_language
&&
*
psz_language
&&
strcmp
(
psz_language
,
"auto"
)
)
{
bool
b_cache_delete
=
p_module_bank
->
b_cache_delete
;
/* Reset the default domain */
SetLanguage
(
psz_language
);
...
...
@@ -472,7 +467,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
if
(
!
config_GetInt
(
p_libvlc
,
"ignore-config"
)
)
config_LoadConfigFile
(
p_libvlc
,
"main"
);
config_LoadCmdLine
(
p_libvlc
,
&
i_argc
,
ppsz_argv
,
true
);
p_module_bank
->
b_cache_delete
=
b_cache_delete
;
}
free
(
psz_language
);
# endif
...
...
@@ -485,7 +479,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
* default values.
*/
module_LoadBuiltins
(
p_libvlc
);
module_LoadPlugins
(
p_libvlc
);
module_LoadPlugins
(
p_libvlc
,
b_cache_delete
);
if
(
p_libvlc
->
b_die
)
{
b_exit
=
true
;
...
...
src/modules/cache.c
View file @
b4b1caac
...
...
@@ -102,7 +102,7 @@ static int CacheSaveConfig ( module_t *, FILE * );
* actually load the dynamically loadable module.
* This allows us to only fully load plugins when they are actually used.
*****************************************************************************/
void
CacheLoad
(
vlc_object_t
*
p_this
)
void
CacheLoad
(
vlc_object_t
*
p_this
,
bool
b_delete
)
{
char
*
psz_filename
,
*
psz_cachedir
=
config_GetCacheDir
();
FILE
*
file
;
...
...
@@ -127,7 +127,7 @@ void CacheLoad( vlc_object_t *p_this )
}
free
(
psz_cachedir
);
if
(
p_module_bank
->
b_cache
_delete
)
if
(
b
_delete
)
{
#if !defined( UNDER_CE )
unlink
(
psz_filename
);
...
...
src/modules/modules.c
View file @
b4b1caac
...
...
@@ -129,7 +129,6 @@ void __module_InitBank( vlc_object_t *p_this )
p_bank
->
i_cache
=
p_bank
->
i_loaded_cache
=
0
;
p_bank
->
pp_cache
=
p_bank
->
pp_loaded_cache
=
NULL
;
p_bank
->
b_cache
=
p_bank
->
b_cache_dirty
=
p_bank
->
b_cache_delete
=
false
;
p_bank
->
head
=
NULL
;
/* Everything worked, attach the object */
...
...
@@ -236,6 +235,7 @@ void __module_LoadBuiltins( vlc_object_t * p_this )
ALLOCATE_ALL_BUILTINS
();
}
#undef module_LoadPlugins
/**
* Load all plugins
*
...
...
@@ -244,7 +244,7 @@ void __module_LoadBuiltins( vlc_object_t * p_this )
* \param p_this vlc object structure
* \return nothing
*/
void
__module_LoadPlugins
(
vlc_object_t
*
p_this
)
void
module_LoadPlugins
(
vlc_object_t
*
p_this
,
bool
b_cache_delete
)
{
#ifdef HAVE_DYNAMIC_PLUGINS
vlc_mutex_lock
(
&
global_lock
);
...
...
@@ -261,8 +261,8 @@ void __module_LoadPlugins( vlc_object_t * p_this )
if
(
config_GetInt
(
p_this
,
"plugins-cache"
)
)
p_module_bank
->
b_cache
=
true
;
if
(
p_module_bank
->
b_cache
||
p_module_bank
->
b_cache_delete
)
CacheLoad
(
p_this
);
if
(
p_module_bank
->
b_cache
||
b_cache_delete
)
CacheLoad
(
p_this
,
b_cache_delete
);
AllocateAllPlugins
(
p_this
);
#endif
...
...
src/modules/modules.h
View file @
b4b1caac
...
...
@@ -150,8 +150,8 @@ struct module_t
void
__module_InitBank
(
vlc_object_t
*
);
#define module_LoadBuiltins(a) __module_LoadBuiltins(VLC_OBJECT(a))
void
__module_LoadBuiltins
(
vlc_object_t
*
);
#define module_LoadPlugins(a) __module_LoadPlugins(VLC_OBJECT(a))
void
__module_LoadPlugins
(
vlc_object_t
*
);
void
module_LoadPlugins
(
vlc_object_t
*
,
bool
);
#define module_LoadPlugins(a,b) module_LoadPlugins(VLC_OBJECT(a),b)
#define module_EndBank(a) __module_EndBank(VLC_OBJECT(a))
void
__module_EndBank
(
vlc_object_t
*
);
#define module_ResetBank(a) __module_ResetBank(VLC_OBJECT(a))
...
...
@@ -164,7 +164,7 @@ void module_Unload (module_handle_t);
/* Plugins cache */
void
CacheMerge
(
vlc_object_t
*
,
module_t
*
,
module_t
*
);
void
CacheLoad
(
vlc_object_t
*
);
void
CacheLoad
(
vlc_object_t
*
,
bool
);
void
CacheSave
(
vlc_object_t
*
);
module_cache_t
*
CacheFind
(
const
char
*
,
int64_t
,
int64_t
);
...
...
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