Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
79ca9d67
Commit
79ca9d67
authored
Aug 13, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not access the module bank directly from the cache
parent
1661fa70
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
12 deletions
+16
-12
src/modules/cache.c
src/modules/cache.c
+12
-10
src/modules/modules.c
src/modules/modules.c
+2
-1
src/modules/modules.h
src/modules/modules.h
+2
-1
No files found.
src/modules/cache.c
View file @
79ca9d67
...
@@ -634,23 +634,25 @@ void CacheMerge( vlc_object_t *p_this, module_t *p_cache, module_t *p_module )
...
@@ -634,23 +634,25 @@ void CacheMerge( vlc_object_t *p_this, module_t *p_cache, module_t *p_module )
}
}
/**
/**
* Looks up a plugin file in a
list
of cached plugins.
* Looks up a plugin file in a
table
of cached plugins.
*/
*/
module_t
*
CacheFind
(
module_
bank_t
*
p_bank
,
module_t
*
CacheFind
(
module_
cache_t
*
const
*
entries
,
size_t
count
,
const
char
*
path
,
const
struct
stat
*
st
)
const
char
*
path
,
const
struct
stat
*
st
)
{
{
module_cache_t
**
cache
=
p_bank
->
pp_loaded_cache
;
while
(
count
>
0
)
size_t
n
=
p_bank
->
i_loaded_cache
;
{
module_cache_t
*
entry
=
*
(
entries
++
);
for
(
size_t
i
=
0
;
i
<
n
;
i
++
)
if
(
!
strcmp
(
entry
->
path
,
path
)
if
(
!
strcmp
(
cache
[
i
]
->
path
,
path
)
&&
entry
->
mtime
==
st
->
st_mtime
&&
cache
[
i
]
->
mtime
==
st
->
st_mtime
&&
entry
->
size
==
st
->
st_size
)
&&
cache
[
i
]
->
size
==
st
->
st_size
)
{
{
module_t
*
module
=
cache
[
i
]
->
p_module
;
module_t
*
module
=
entry
->
p_module
;
cache
[
i
]
->
p_module
=
NULL
;
entry
->
p_module
=
NULL
;
/* Return NULL next time */
return
module
;
return
module
;
}
}
count
--
;
}
return
NULL
;
return
NULL
;
}
}
...
...
src/modules/modules.c
View file @
79ca9d67
...
@@ -969,7 +969,8 @@ static int AllocatePluginFile( vlc_object_t * p_this, module_bank_t *p_bank,
...
@@ -969,7 +969,8 @@ static int AllocatePluginFile( vlc_object_t * p_this, module_bank_t *p_bank,
p_module->psz_object_name, p_module->psz_longname ); */
p_module->psz_object_name, p_module->psz_longname ); */
/* Check our plugins cache first then load plugin if needed */
/* Check our plugins cache first then load plugin if needed */
if
(
mode
==
CACHE_USE
)
if
(
mode
==
CACHE_USE
)
p_module
=
CacheFind
(
p_bank
,
path
,
st
);
p_module
=
CacheFind
(
p_bank
->
pp_loaded_cache
,
p_bank
->
i_loaded_cache
,
path
,
st
);
if
(
p_module
==
NULL
)
if
(
p_module
==
NULL
)
p_module
=
AllocatePlugin
(
p_this
,
path
,
true
);
p_module
=
AllocatePlugin
(
p_this
,
path
,
true
);
if
(
p_module
==
NULL
)
if
(
p_module
==
NULL
)
...
...
src/modules/modules.h
View file @
79ca9d67
...
@@ -150,6 +150,7 @@ void CacheMerge (vlc_object_t *, module_t *, module_t *);
...
@@ -150,6 +150,7 @@ void CacheMerge (vlc_object_t *, module_t *, module_t *);
void
CacheDelete
(
vlc_object_t
*
,
const
char
*
);
void
CacheDelete
(
vlc_object_t
*
,
const
char
*
);
size_t
CacheLoad
(
vlc_object_t
*
,
const
char
*
,
module_cache_t
***
);
size_t
CacheLoad
(
vlc_object_t
*
,
const
char
*
,
module_cache_t
***
);
void
CacheSave
(
vlc_object_t
*
,
const
char
*
,
module_cache_t
*
const
*
,
size_t
);
void
CacheSave
(
vlc_object_t
*
,
const
char
*
,
module_cache_t
*
const
*
,
size_t
);
module_t
*
CacheFind
(
module_bank_t
*
,
const
char
*
,
const
struct
stat
*
);
module_t
*
CacheFind
(
module_cache_t
*
const
*
,
size_t
,
const
char
*
,
const
struct
stat
*
);
#endif
/* !LIBVLC_MODULES_H */
#endif
/* !LIBVLC_MODULES_H */
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