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
75c438d3
Commit
75c438d3
authored
May 06, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use config_GetCacheDir internally
parent
d9d67e17
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
13 deletions
+9
-13
src/input/meta.c
src/input/meta.c
+5
-5
src/libvlc-common.c
src/libvlc-common.c
+0
-2
src/libvlc.h
src/libvlc.h
+0
-1
src/modules/cache.c
src/modules/cache.c
+4
-5
No files found.
src/input/meta.c
View file @
75c438d3
...
...
@@ -239,15 +239,15 @@ static void __ArtCacheGetDirPath( vlc_object_t *p_obj,
const
char
*
psz_title
,
const
char
*
psz_artist
,
const
char
*
psz_album
)
{
char
*
psz_cachedir
=
config_GetCacheDir
();
if
(
!
EMPTY_STR
(
psz_artist
)
&&
!
EMPTY_STR
(
psz_album
)
)
{
char
*
psz_album_sanitized
=
ArtCacheGetSanitizedFileName
(
psz_album
);
char
*
psz_artist_sanitized
=
ArtCacheGetSanitizedFileName
(
psz_artist
);
snprintf
(
psz_dir
,
PATH_MAX
,
"%s"
DIR_SEP
"art"
DIR_SEP
"artistalbum"
DIR_SEP
"%s"
DIR_SEP
"%s"
,
libvlc_priv
(
p_obj
->
p_libvlc
)
->
psz_cachedir
,
psz_artist_sanitized
,
psz_album_sanitized
);
psz_cachedir
,
psz_artist_sanitized
,
psz_album_sanitized
);
free
(
psz_album_sanitized
);
free
(
psz_artist_sanitized
);
}
...
...
@@ -256,10 +256,10 @@ static void __ArtCacheGetDirPath( vlc_object_t *p_obj,
char
*
psz_title_sanitized
=
ArtCacheGetSanitizedFileName
(
psz_title
);
snprintf
(
psz_dir
,
PATH_MAX
,
"%s"
DIR_SEP
"art"
DIR_SEP
"title"
DIR_SEP
"%s"
,
libvlc_priv
(
p_obj
->
p_libvlc
)
->
psz_cachedir
,
psz_title_sanitized
);
psz_cachedir
,
psz_title_sanitized
);
free
(
psz_title_sanitized
);
}
free
(
psz_cachedir
);
}
...
...
src/libvlc-common.c
View file @
75c438d3
...
...
@@ -298,7 +298,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
p_libvlc
->
psz_homedir
=
config_GetHomeDir
();
priv
->
psz_configdir
=
config_GetUserConfDir
();
priv
->
psz_datadir
=
config_GetUserDataDir
();
priv
->
psz_cachedir
=
config_GetCacheDir
();
priv
->
psz_configfile
=
config_GetCustomConfigFile
(
p_libvlc
);
/* Check for plugins cache options */
...
...
@@ -1064,7 +1063,6 @@ int libvlc_InternalDestroy( libvlc_int_t *p_libvlc, bool b_release )
FREENULL
(
p_libvlc
->
psz_homedir
);
free
(
priv
->
psz_configdir
);
free
(
priv
->
psz_datadir
);
free
(
priv
->
psz_cachedir
);
FREENULL
(
priv
->
psz_configfile
);
var_DelCallback
(
p_libvlc
,
"key-pressed"
,
vlc_key_to_action
,
p_libvlc
->
p_hotkeys
);
...
...
src/libvlc.h
View file @
75c438d3
...
...
@@ -213,7 +213,6 @@ typedef struct libvlc_priv_t
char
*
psz_configfile
;
///< location of config file
char
*
psz_configdir
;
///< user configuration directory
char
*
psz_datadir
;
///< user data directory
char
*
psz_cachedir
;
///< user cache directory
/* There is no real reason to keep a list of items, but not to break
* everything, let's keep it */
...
...
src/modules/cache.c
View file @
75c438d3
...
...
@@ -96,7 +96,7 @@ static char * CacheName ( void );
*****************************************************************************/
void
CacheLoad
(
vlc_object_t
*
p_this
)
{
char
*
psz_filename
,
*
psz_cachedir
;
char
*
psz_filename
,
*
psz_cachedir
=
config_GetCacheDir
()
;
FILE
*
file
;
int
i
,
j
,
i_size
,
i_read
;
char
p_cachestring
[
sizeof
(
"cache "
COPYRIGHT_MESSAGE
)];
...
...
@@ -106,7 +106,6 @@ void CacheLoad( vlc_object_t *p_this )
int32_t
i_file_size
,
i_marker
;
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
psz_cachedir
=
libvlc_priv
(
p_this
->
p_libvlc
)
->
psz_cachedir
;
if
(
!
psz_cachedir
)
/* XXX: this should never happen */
{
msg_Err
(
p_this
,
"Unable to get cache directory"
);
...
...
@@ -115,9 +114,9 @@ void CacheLoad( vlc_object_t *p_this )
i_size
=
asprintf
(
&
psz_filename
,
"%s"
DIR_SEP
"%s"
,
psz_cachedir
,
CacheName
()
);
free
(
psz_cachedir
);
if
(
i_size
<=
0
)
{
msg_Err
(
p_this
,
"out of memory"
);
return
;
}
...
...
@@ -454,14 +453,13 @@ void CacheSave( vlc_object_t *p_this )
"# For information about cache directory tags, see:
\r\n
"
"# http://www.brynosaurus.com/cachedir/
\r\n
"
;
char
*
psz_cachedir
;
char
*
psz_cachedir
=
config_GetCacheDir
()
;
FILE
*
file
;
int
i
,
j
,
i_cache
;
module_cache_t
**
pp_cache
;
uint32_t
i_file_size
=
0
;
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
psz_cachedir
=
libvlc_priv
(
p_this
->
p_libvlc
)
->
psz_cachedir
;
if
(
!
psz_cachedir
)
/* XXX: this should never happen */
{
msg_Err
(
p_this
,
"unable to get cache directory"
);
...
...
@@ -483,6 +481,7 @@ void CacheSave( vlc_object_t *p_this )
snprintf
(
psz_filename
,
sizeof
(
psz_filename
),
"%s"
DIR_SEP
"%s"
,
psz_cachedir
,
CacheName
()
);
free
(
psz_cachedir
);
msg_Dbg
(
p_this
,
"writing plugins cache %s"
,
psz_filename
);
file
=
utf8_fopen
(
psz_filename
,
"wb"
);
...
...
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