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
cfe59a4f
Commit
cfe59a4f
authored
Mar 05, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config_GetDataDir(): returns path to VLC installed shared data
parent
b17c9671
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
include/configuration.h
include/configuration.h
+1
-0
include/vlc_symbols.h
include/vlc_symbols.h
+3
-0
src/misc/configuration.c
src/misc/configuration.c
+24
-0
No files found.
include/configuration.h
View file @
cfe59a4f
...
...
@@ -181,6 +181,7 @@ VLC_EXPORT( void, __config_PutPsz, (vlc_object_t *, const char *, const char
VLC_EXPORT
(
int
,
__config_LoadCmdLine
,
(
vlc_object_t
*
,
int
*
,
char
*
[],
vlc_bool_t
)
);
VLC_EXPORT
(
char
*
,
config_GetHomeDir
,
(
void
)
);
VLC_EXPORT
(
char
*
,
config_GetUserDir
,
(
void
)
);
VLC_EXPORT
(
const
char
*
,
config_GetDataDir
,
(
const
vlc_object_t
*
)
);
VLC_EXPORT
(
int
,
__config_LoadConfigFile
,
(
vlc_object_t
*
,
const
char
*
)
);
VLC_EXPORT
(
int
,
__config_SaveConfigFile
,
(
vlc_object_t
*
,
const
char
*
)
);
VLC_EXPORT
(
void
,
__config_ResetAll
,
(
vlc_object_t
*
)
);
...
...
include/vlc_symbols.h
View file @
cfe59a4f
...
...
@@ -476,6 +476,7 @@ struct module_symbols_t
int
(
*
utf8_mkdir_inner
)
(
const
char
*
filename
);
vlm_media_t
*
(
*
vlm_MediaSearch_inner
)
(
vlm_t
*
,
const
char
*
);
int
(
*
playlist_TreeMove_inner
)
(
playlist_t
*
,
playlist_item_t
*
,
playlist_item_t
*
,
int
,
int
);
const
char
*
(
*
config_GetDataDir_inner
)
(
const
vlc_object_t
*
);
};
# if defined (__PLUGIN__)
# define aout_FiltersCreatePipeline (p_symbols)->aout_FiltersCreatePipeline_inner
...
...
@@ -932,6 +933,7 @@ struct module_symbols_t
# define utf8_mkdir (p_symbols)->utf8_mkdir_inner
# define vlm_MediaSearch (p_symbols)->vlm_MediaSearch_inner
# define playlist_TreeMove (p_symbols)->playlist_TreeMove_inner
# define config_GetDataDir (p_symbols)->config_GetDataDir_inner
# elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__)
/******************************************************************
* STORE_SYMBOLS: store VLC APIs into p_symbols for plugin access.
...
...
@@ -1391,6 +1393,7 @@ struct module_symbols_t
((p_symbols)->utf8_mkdir_inner) = utf8_mkdir; \
((p_symbols)->vlm_MediaSearch_inner) = vlm_MediaSearch; \
((p_symbols)->playlist_TreeMove_inner) = playlist_TreeMove; \
((p_symbols)->config_GetDataDir_inner) = config_GetDataDir; \
(p_symbols)->net_ConvertIPv4_deprecated = NULL; \
(p_symbols)->__stats_CounterGet_deprecated = NULL; \
(p_symbols)->__stats_TimerDumpAll_deprecated = NULL; \
...
...
src/misc/configuration.c
View file @
cfe59a4f
...
...
@@ -1676,6 +1676,30 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[],
return
0
;
}
/**
* config_GetDataDir: find directory where shared data is installed
*
* @return a string (always succeeds).
*/
const
char
*
config_GetDataDir
(
const
vlc_object_t
*
p_this
)
{
#if defined (WIN32) || defined (UNDER_CE)
return
p_this
->
p_libvlc
->
psz_vlcpath
;
#elif defined(__APPLE__) || defined (SYS_BEOS)
static
char
path
[
PATH_MAX
]
=
""
;
if
(
*
path
==
'\0'
)
{
snprintf
(
path
,
sizeof
(
path
),
"%s/share"
,
p_this
->
p_libvlc
->
psz_vlcpath
);
path
[
sizeof
(
path
)
-
1
]
=
'\0'
;
}
return
path
;
#else
return
DATA_PATH
;
#endif
}
/*****************************************************************************
* config_GetHomeDir, config_GetUserDir: find the user's home directory.
*****************************************************************************
...
...
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