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
b4f8c0f6
Commit
b4f8c0f6
authored
Sep 28, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move psz_vlcpath out of p_root
parent
87868182
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
30 deletions
+20
-30
src/config/dirs.c
src/config/dirs.c
+2
-3
src/libvlc.h
src/libvlc.h
+2
-14
src/misc/beos_specific.cpp
src/misc/beos_specific.cpp
+2
-2
src/misc/darwin_specific.c
src/misc/darwin_specific.c
+2
-2
src/misc/linux_specific.c
src/misc/linux_specific.c
+1
-1
src/misc/threads.c
src/misc/threads.c
+4
-3
src/misc/variables.c
src/misc/variables.c
+1
-1
src/misc/win32_specific.c
src/misc/win32_specific.c
+3
-3
src/modules/modules.c
src/modules/modules.c
+3
-1
No files found.
src/config/dirs.c
View file @
b4f8c0f6
...
...
@@ -64,8 +64,7 @@ const char *config_GetDataDir( void )
if
(
*
path
==
'\0'
)
{
snprintf
(
path
,
sizeof
(
path
),
"%s"
DIR_SEP
DIR_SHARE
,
vlc_global
()
->
psz_vlcpath
);
snprintf
(
path
,
sizeof
(
path
),
"%s"
DIR_SEP
DIR_SHARE
,
psz_vlcpath
);
path
[
sizeof
(
path
)
-
1
]
=
'\0'
;
}
return
path
;
...
...
@@ -155,7 +154,7 @@ const char *config_GetConfDir( void )
if
(
*
path
==
'\0'
)
{
snprintf
(
path
,
sizeof
(
path
),
"%s"
DIR_SEP
DIR_SHARE
,
/* FIXME: Duh? */
vlc_global
()
->
psz_vlcpath
);
psz_vlcpath
);
path
[
sizeof
(
path
)
-
1
]
=
'\0'
;
}
return
path
;
...
...
src/libvlc.h
View file @
b4f8c0f6
...
...
@@ -140,26 +140,14 @@ __vlc_custom_create (vlc_object_t *p_this, size_t i_size, int i_type,
#define vlc_custom_create(o, s, t, n) \
__vlc_custom_create(VLC_OBJECT(o), s, t, n)
/**
* libvlc_global_data_t (global variable)
*
* This structure has an unique instance, statically allocated in libvlc and
* never accessed from the outside. It stores process-wide VLC variables,
* mostly process-wide locks, and (currently) the module bank and objects tree.
*/
typedef
struct
libvlc_global_data_t
{
VLC_COMMON_MEMBERS
char
*
psz_vlcpath
;
}
libvlc_global_data_t
;
/**
* The module bank
*/
extern
module_bank_t
*
p_module_bank
;
libvlc_global_data_t
*
vlc_global
(
void
);
vlc_object_t
*
vlc_global
(
void
);
extern
char
*
psz_vlcpath
;
/**
* Private LibVLC data for each object.
...
...
src/misc/beos_specific.cpp
View file @
b4f8c0f6
...
...
@@ -112,7 +112,7 @@ void system_End( libvlc_int_t *p_this )
vlc_thread_join
(
p_appthread
);
vlc_object_release
(
p_appthread
);
free
(
vlc_global
()
->
psz_vlcpath
);
free
(
psz_vlcpath
);
}
/* following functions are local */
...
...
@@ -182,7 +182,7 @@ void VlcApplication::ReadyToRun( )
BEntry
entry
(
&
info
.
ref
);
entry
.
GetPath
(
&
path
);
path
.
GetParent
(
&
path
);
vlc_global
()
->
psz_vlcpath
=
strdup
(
path
.
Path
()
);
psz_vlcpath
=
strdup
(
path
.
Path
()
);
/* Tell the main thread we are finished initializing the BApplication */
vlc_thread_ready
(
p_this
);
...
...
src/misc/darwin_specific.c
View file @
b4f8c0f6
...
...
@@ -123,7 +123,7 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
p_char
=
strdup
(
ppsz_argv
[
0
]
);
}
vlc_global
()
->
psz_vlcpath
=
p_char
;
psz_vlcpath
=
p_char
;
/* Remove trailing program name */
for
(
;
*
p_char
;
)
...
...
@@ -186,6 +186,6 @@ void system_Configure( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv
void
system_End
(
libvlc_int_t
*
p_this
)
{
(
void
)
p_this
;
free
(
vlc_global
()
->
psz_vlcpath
);
free
(
psz_vlcpath
);
}
src/misc/linux_specific.c
View file @
b4f8c0f6
...
...
@@ -36,7 +36,7 @@ static void set_libvlc_path (void)
assert (strlen (LIBDIR) < sizeof (libvlc_path));
strcpy (libvlc_path, LIBDIR); /* fail safe */
vlc_global ()->
psz_vlcpath = libvlc_path;
psz_vlcpath = libvlc_path;
/* Find the path to libvlc (i.e. ourselves) */
FILE *maps = fopen ("/proc/self/maps", "rt");
...
...
src/misc/threads.c
View file @
b4f8c0f6
...
...
@@ -59,11 +59,12 @@ static vlc_threadvar_t cancel_key;
/**
* Global process-wide VLC object.
* Contains inter-instance data, such as the module cache and global mutexes.
* Contains the global named mutexes.
* TODO: remove it.
*/
static
libvlc_global_data
_t
*
p_root
;
static
vlc_object
_t
*
p_root
;
libvlc_global_data
_t
*
vlc_global
(
void
)
vlc_object
_t
*
vlc_global
(
void
)
{
assert
(
i_initializations
>
0
);
return
p_root
;
...
...
src/misc/variables.c
View file @
b4f8c0f6
...
...
@@ -856,7 +856,7 @@ int __var_Get( vlc_object_t *p_this, const char *psz_name, vlc_value_t *p_val )
*/
vlc_mutex_t
*
var_AcquireMutex
(
const
char
*
name
)
{
libvlc_global_data
_t
*
p_global
=
vlc_global
();
vlc_object
_t
*
p_global
=
vlc_global
();
vlc_value_t
val
;
if
(
var_Create
(
p_global
,
name
,
VLC_VAR_MUTEX
)
)
...
...
src/misc/win32_specific.c
View file @
b4f8c0f6
...
...
@@ -76,7 +76,7 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
}
#endif
vlc_global
()
->
psz_vlcpath
=
strdup
(
psz_path
);
psz_vlcpath
=
strdup
(
psz_path
);
/* Set the default file-translation mode */
#if !defined( UNDER_CE )
...
...
@@ -371,8 +371,8 @@ void system_End( libvlc_int_t *p_this )
HWND
ipcwindow
;
if
(
p_this
&&
vlc_global
()
)
{
free
(
vlc_global
()
->
psz_vlcpath
);
vlc_global
()
->
psz_vlcpath
=
NULL
;
free
(
psz_vlcpath
);
psz_vlcpath
=
NULL
;
}
if
(
ipcwindow
=
FindWindow
(
0
,
L"VLC ipc "
VERSION
)
)
...
...
src/modules/modules.c
View file @
b4f8c0f6
...
...
@@ -867,13 +867,15 @@ static char * copy_next_paths_token( char * paths, char ** remaining_paths )
return
path
;
}
extern
char
*
psz_vlcpath
=
NULL
;
/*****************************************************************************
* AllocateAllPlugins: load all plugin modules we can find.
*****************************************************************************/
#ifdef HAVE_DYNAMIC_PLUGINS
static
void
AllocateAllPlugins
(
vlc_object_t
*
p_this
)
{
const
char
*
vlcpath
=
vlc_global
()
->
psz_vlcpath
;
const
char
*
vlcpath
=
psz_vlcpath
;
int
count
,
i
;
char
*
path
;
vlc_array_t
*
arraypaths
=
vlc_array_new
();
...
...
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