Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
3ea2708d
Commit
3ea2708d
authored
Aug 16, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redumdant parameter to vlc_global
parent
7675aa3f
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
58 additions
and
64 deletions
+58
-64
include/vlc_configuration.h
include/vlc_configuration.h
+1
-2
include/vlc_objects.h
include/vlc_objects.h
+0
-1
modules/control/http/http.c
modules/control/http/http.c
+1
-1
modules/demux/playlist/luaplaylist.c
modules/demux/playlist/luaplaylist.c
+1
-1
modules/gui/skins2/win32/win32_factory.cpp
modules/gui/skins2/win32/win32_factory.cpp
+4
-4
modules/meta_engine/luameta.c
modules/meta_engine/luameta.c
+1
-1
modules/misc/gnutls.c
modules/misc/gnutls.c
+1
-1
src/input/vlm.c
src/input/vlm.c
+3
-3
src/libvlc-common.c
src/libvlc-common.c
+2
-2
src/libvlc.h
src/libvlc.h
+1
-5
src/libvlc.sym
src/libvlc.sym
+1
-1
src/misc/beos_specific.cpp
src/misc/beos_specific.cpp
+6
-6
src/misc/darwin_specific.c
src/misc/darwin_specific.c
+7
-7
src/misc/objects.c
src/misc/objects.c
+5
-5
src/misc/stats.c
src/misc/stats.c
+1
-1
src/misc/variables.c
src/misc/variables.c
+2
-1
src/misc/win32_specific.c
src/misc/win32_specific.c
+4
-4
src/modules/configuration.c
src/modules/configuration.c
+3
-4
src/modules/modules.c
src/modules/modules.c
+11
-11
src/network/httpd.c
src/network/httpd.c
+3
-3
No files found.
include/vlc_configuration.h
View file @
3ea2708d
...
@@ -210,8 +210,7 @@ VLC_EXPORT( module_t *, config_FindModule,( vlc_object_t *, const char * ) );
...
@@ -210,8 +210,7 @@ VLC_EXPORT( module_t *, config_FindModule,( vlc_object_t *, const char * ) );
VLC_EXPORT
(
int
,
config_Duplicate
,(
module_t
*
,
const
module_config_t
*
,
size_t
));
VLC_EXPORT
(
int
,
config_Duplicate
,(
module_t
*
,
const
module_config_t
*
,
size_t
));
#define config_GetDataDir( a ) __config_GetDataDir( VLC_OBJECT( a ) )
VLC_EXPORT
(
const
char
*
,
config_GetDataDir
,
(
void
));
VLC_EXPORT
(
const
char
*
,
__config_GetDataDir
,
(
const
vlc_object_t
*
));
#define config_GetType(a,b) __config_GetType(VLC_OBJECT(a),b)
#define config_GetType(a,b) __config_GetType(VLC_OBJECT(a),b)
#define config_GetInt(a,b) __config_GetInt(VLC_OBJECT(a),b)
#define config_GetInt(a,b) __config_GetInt(VLC_OBJECT(a),b)
...
...
include/vlc_objects.h
View file @
3ea2708d
...
@@ -109,7 +109,6 @@ VLC_EXPORT( void, __vlc_object_release, ( vlc_object_t * ) );
...
@@ -109,7 +109,6 @@ VLC_EXPORT( void, __vlc_object_release, ( vlc_object_t * ) );
VLC_EXPORT
(
vlc_list_t
*
,
__vlc_list_find
,
(
vlc_object_t
*
,
int
,
int
)
);
VLC_EXPORT
(
vlc_list_t
*
,
__vlc_list_find
,
(
vlc_object_t
*
,
int
,
int
)
);
VLC_EXPORT
(
void
,
vlc_list_release
,
(
vlc_list_t
*
)
);
VLC_EXPORT
(
void
,
vlc_list_release
,
(
vlc_list_t
*
)
);
VLC_EXPORT
(
libvlc_int_t
*
,
vlc_current_object
,
(
int
)
);
VLC_EXPORT
(
libvlc_int_t
*
,
vlc_current_object
,
(
int
)
);
VLC_EXPORT
(
vlc_object_t
*
,
vlc_global_object
,
(
void
)
);
/*}@*/
/*}@*/
...
...
modules/control/http/http.c
View file @
3ea2708d
...
@@ -290,7 +290,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -290,7 +290,7 @@ static int Open( vlc_object_t *p_this )
#if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
#if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
if
(
(
psz_src
=
config_GetPsz
(
p_intf
,
"http-src"
))
==
NULL
)
if
(
(
psz_src
=
config_GetPsz
(
p_intf
,
"http-src"
))
==
NULL
)
{
{
c
har
*
psz_vlcpath
=
config_GetDataDir
(
p_intf
);
c
onst
char
*
psz_vlcpath
=
config_GetDataDir
(
);
psz_src
=
malloc
(
strlen
(
psz_vlcpath
)
+
strlen
(
"/http"
)
+
1
);
psz_src
=
malloc
(
strlen
(
psz_vlcpath
)
+
strlen
(
"/http"
)
+
1
);
if
(
!
psz_src
)
return
VLC_ENOMEM
;
if
(
!
psz_src
)
return
VLC_ENOMEM
;
sprintf
(
psz_src
,
"%s/http"
,
psz_vlcpath
);
sprintf
(
psz_src
,
"%s/http"
,
psz_vlcpath
);
...
...
modules/demux/playlist/luaplaylist.c
View file @
3ea2708d
...
@@ -295,7 +295,7 @@ int E_(Import_LuaPlaylist)( vlc_object_t *p_this )
...
@@ -295,7 +295,7 @@ int E_(Import_LuaPlaylist)( vlc_object_t *p_this )
# if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
# if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
{
{
c
har
*
psz_vlcpath
=
config_GetDataDir
(
p_demux
);
c
onst
char
*
psz_vlcpath
=
config_GetDataDir
(
);
if
(
asprintf
(
&
ppsz_dir_list
[
1
],
"%s"
DIR_SEP
"luaplaylist"
,
psz_vlcpath
)
<
0
)
if
(
asprintf
(
&
ppsz_dir_list
[
1
],
"%s"
DIR_SEP
"luaplaylist"
,
psz_vlcpath
)
<
0
)
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
if
(
asprintf
(
&
ppsz_dir_list
[
2
],
"%s"
DIR_SEP
"share"
DIR_SEP
"luaplaylist"
,
psz_vlcpath
)
<
0
)
if
(
asprintf
(
&
ppsz_dir_list
[
2
],
"%s"
DIR_SEP
"share"
DIR_SEP
"luaplaylist"
,
psz_vlcpath
)
<
0
)
...
...
modules/gui/skins2/win32/win32_factory.cpp
View file @
3ea2708d
...
@@ -227,13 +227,13 @@ bool Win32Factory::init()
...
@@ -227,13 +227,13 @@ bool Win32Factory::init()
// Initialize the resource path
// Initialize the resource path
m_resourcePath
.
push_back
(
(
string
)
getIntf
()
->
p_libvlc
->
psz_homedir
+
m_resourcePath
.
push_back
(
(
string
)
getIntf
()
->
p_libvlc
->
psz_homedir
+
"
\\
"
+
CONFIG_DIR
+
"
\\
skins"
);
"
\\
"
+
CONFIG_DIR
+
"
\\
skins"
);
m_resourcePath
.
push_back
(
(
string
)
config_GetDataDir
(
getIntf
()
)
+
m_resourcePath
.
push_back
(
(
string
)
config_GetDataDir
()
+
"
\\
skins"
);
"
\\
skins"
);
m_resourcePath
.
push_back
(
(
string
)
config_GetDataDir
(
getIntf
()
)
+
m_resourcePath
.
push_back
(
(
string
)
config_GetDataDir
()
+
"
\\
skins2"
);
"
\\
skins2"
);
m_resourcePath
.
push_back
(
(
string
)
config_GetDataDir
(
getIntf
()
)
+
m_resourcePath
.
push_back
(
(
string
)
config_GetDataDir
()
+
"
\\
share
\\
skins"
);
"
\\
share
\\
skins"
);
m_resourcePath
.
push_back
(
(
string
)
config_GetDataDir
(
getIntf
()
)
+
m_resourcePath
.
push_back
(
(
string
)
config_GetDataDir
()
+
"
\\
share
\\
skins2"
);
"
\\
share
\\
skins2"
);
// All went well
// All went well
...
...
modules/meta_engine/luameta.c
View file @
3ea2708d
...
@@ -301,7 +301,7 @@ static int vlclua_scripts_batch_execute( vlc_object_t *p_this,
...
@@ -301,7 +301,7 @@ static int vlclua_scripts_batch_execute( vlc_object_t *p_this,
# if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
# if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
{
{
const
char
*
psz_vlcpath
=
config_GetDataDir
(
p_this
);
const
char
*
psz_vlcpath
=
config_GetDataDir
();
if
(
asprintf
(
&
ppsz_dir_list
[
1
],
"%s"
DIR_SEP
"%s"
,
psz_vlcpath
,
luadirname
)
<
0
)
if
(
asprintf
(
&
ppsz_dir_list
[
1
],
"%s"
DIR_SEP
"%s"
,
psz_vlcpath
,
luadirname
)
<
0
)
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
...
...
modules/misc/gnutls.c
View file @
3ea2708d
...
@@ -704,7 +704,7 @@ gnutls_ClientCreate( tls_t *p_tls )
...
@@ -704,7 +704,7 @@ gnutls_ClientCreate( tls_t *p_tls )
vlc_object_attach
(
p_session
,
p_tls
);
vlc_object_attach
(
p_session
,
p_tls
);
const
char
*
homedir
=
p_tls
->
p_libvlc
->
psz_homedir
,
const
char
*
homedir
=
p_tls
->
p_libvlc
->
psz_homedir
,
*
datadir
=
config_GetDataDir
(
(
vlc_object_t
*
)
p_session
);
*
datadir
=
config_GetDataDir
();
size_t
l1
=
strlen
(
homedir
),
l2
=
strlen
(
datadir
);
size_t
l1
=
strlen
(
homedir
),
l2
=
strlen
(
datadir
);
char
path
[((
l1
>
l2
)
?
l1
:
l2
)
+
sizeof
(
"/"
CONFIG_DIR
"/ssl/private"
)];
char
path
[((
l1
>
l2
)
?
l1
:
l2
)
+
sizeof
(
"/"
CONFIG_DIR
"/ssl/private"
)];
// > sizeof ("/"CONFIG_DIR"/ssl/certs")
// > sizeof ("/"CONFIG_DIR"/ssl/certs")
...
...
src/input/vlm.c
View file @
3ea2708d
...
@@ -90,8 +90,8 @@ vlm_t *__vlm_New ( vlc_object_t *p_this )
...
@@ -90,8 +90,8 @@ vlm_t *__vlm_New ( vlc_object_t *p_this )
char
*
psz_vlmconf
;
char
*
psz_vlmconf
;
/* Avoid multiple creation */
/* Avoid multiple creation */
if
(
var_Create
(
p_this
->
p_libvlc
_global
,
"vlm_mutex"
,
VLC_VAR_MUTEX
)
||
if
(
var_Create
(
p_this
->
p_libvlc
,
"vlm_mutex"
,
VLC_VAR_MUTEX
)
||
var_Get
(
p_this
->
p_libvlc
_global
,
"vlm_mutex"
,
&
lockval
)
)
var_Get
(
p_this
->
p_libvlc
,
"vlm_mutex"
,
&
lockval
)
)
return
NULL
;
return
NULL
;
vlc_mutex_lock
(
lockval
.
p_address
);
vlc_mutex_lock
(
lockval
.
p_address
);
...
@@ -163,7 +163,7 @@ void vlm_Delete( vlm_t *p_vlm )
...
@@ -163,7 +163,7 @@ void vlm_Delete( vlm_t *p_vlm )
{
{
vlc_value_t
lockval
;
vlc_value_t
lockval
;
var_Get
(
p_vlm
->
p_libvlc
_global
,
"vlm_mutex"
,
&
lockval
);
var_Get
(
p_vlm
->
p_libvlc
,
"vlm_mutex"
,
&
lockval
);
vlc_mutex_lock
(
lockval
.
p_address
);
vlc_mutex_lock
(
lockval
.
p_address
);
vlc_object_release
(
p_vlm
);
vlc_object_release
(
p_vlm
);
...
...
src/libvlc-common.c
View file @
3ea2708d
...
@@ -122,9 +122,9 @@ static int VerboseCallback( vlc_object_t *, char const *,
...
@@ -122,9 +122,9 @@ static int VerboseCallback( vlc_object_t *, char const *,
static
void
InitDeviceValues
(
libvlc_int_t
*
);
static
void
InitDeviceValues
(
libvlc_int_t
*
);
vlc_object_t
*
vlc_global_object
(
void
)
libvlc_global_data_t
*
vlc_global
(
void
)
{
{
return
VLC_OBJECT
(
&
libvlc_global
)
;
return
&
libvlc_global
;
}
}
/*****************************************************************************
/*****************************************************************************
...
...
src/libvlc.h
View file @
3ea2708d
...
@@ -74,11 +74,7 @@ struct libvlc_global_data_t
...
@@ -74,11 +74,7 @@ struct libvlc_global_data_t
#endif
#endif
};
};
#define vlc_global( a ) __vlc_global( VLC_OBJECT( a ) )
libvlc_global_data_t
*
vlc_global
(
void
);
static
inline
libvlc_global_data_t
*
__vlc_global
(
vlc_object_t
*
p_this
)
{
return
(
libvlc_global_data_t
*
)
p_this
->
p_libvlc_global
;
}
extern
uint32_t
cpu_flags
;
extern
uint32_t
cpu_flags
;
uint32_t
CPUCapabilities
(
void
);
uint32_t
CPUCapabilities
(
void
);
...
...
src/libvlc.sym
View file @
3ea2708d
...
@@ -4,7 +4,7 @@ sout_SessionSetMedia
...
@@ -4,7 +4,7 @@ sout_SessionSetMedia
vlc_b64_encode_binary
vlc_b64_encode_binary
vlc_strnlen
vlc_strnlen
stream_Block
stream_Block
__
config_GetDataDir
config_GetDataDir
__vlc_object_find_name
__vlc_object_find_name
__var_Command
__var_Command
net_Listen
net_Listen
...
...
src/misc/beos_specific.cpp
View file @
3ea2708d
...
@@ -80,11 +80,11 @@ static void AppThread( vlc_object_t *p_appthread );
...
@@ -80,11 +80,11 @@ static void AppThread( vlc_object_t *p_appthread );
*****************************************************************************/
*****************************************************************************/
void
system_Init
(
libvlc_int_t
*
p_this
,
int
*
pi_argc
,
char
*
ppsz_argv
[]
)
void
system_Init
(
libvlc_int_t
*
p_this
,
int
*
pi_argc
,
char
*
ppsz_argv
[]
)
{
{
vlc_global
(
p_this
)
->
p_appthread
=
vlc_global
()
->
p_appthread
=
(
vlc_object_t
*
)
vlc_object_create
(
p_this
,
sizeof
(
vlc_object_t
)
);
(
vlc_object_t
*
)
vlc_object_create
(
p_this
,
sizeof
(
vlc_object_t
)
);
/* Create the BApplication thread and wait for initialization */
/* Create the BApplication thread and wait for initialization */
vlc_thread_create
(
vlc_global
(
p_this
)
->
p_appthread
,
"app thread"
,
AppThread
,
vlc_thread_create
(
vlc_global
()
->
p_appthread
,
"app thread"
,
AppThread
,
VLC_THREAD_PRIORITY_LOW
,
VLC_TRUE
);
VLC_THREAD_PRIORITY_LOW
,
VLC_TRUE
);
}
}
...
@@ -103,10 +103,10 @@ void system_End( libvlc_int_t *p_this )
...
@@ -103,10 +103,10 @@ void system_End( libvlc_int_t *p_this )
/* Tell the BApplication to die */
/* Tell the BApplication to die */
be_app
->
PostMessage
(
REALLY_QUIT
);
be_app
->
PostMessage
(
REALLY_QUIT
);
vlc_thread_join
(
vlc_global
(
p_this
)
->
p_appthread
);
vlc_thread_join
(
vlc_global
()
->
p_appthread
);
vlc_object_destroy
(
vlc_global
(
p_this
)
->
p_appthread
);
vlc_object_destroy
(
vlc_global
()
->
p_appthread
);
free
(
vlc_global
(
p_this
)
->
psz_vlcpath
);
free
(
vlc_global
()
->
psz_vlcpath
);
}
}
/* following functions are local */
/* following functions are local */
...
@@ -173,7 +173,7 @@ void VlcApplication::ReadyToRun( )
...
@@ -173,7 +173,7 @@ void VlcApplication::ReadyToRun( )
BEntry
entry
(
&
info
.
ref
);
BEntry
entry
(
&
info
.
ref
);
entry
.
GetPath
(
&
path
);
entry
.
GetPath
(
&
path
);
path
.
GetParent
(
&
path
);
path
.
GetParent
(
&
path
);
vlc_global
(
p_this
)
->
psz_vlcpath
=
strdup
(
path
.
Path
()
);
vlc_global
()
->
psz_vlcpath
=
strdup
(
path
.
Path
()
);
/* Tell the main thread we are finished initializing the BApplication */
/* Tell the main thread we are finished initializing the BApplication */
vlc_thread_ready
(
p_this
);
vlc_thread_ready
(
p_this
);
...
...
src/misc/darwin_specific.c
View file @
3ea2708d
...
@@ -71,7 +71,7 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
...
@@ -71,7 +71,7 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
char
*
p_char
,
*
p_oldchar
=
&
i_dummy
;
char
*
p_char
,
*
p_oldchar
=
&
i_dummy
;
/* Get the full program path and name */
/* Get the full program path and name */
p_char
=
vlc_global
(
p_this
)
->
psz_vlcpath
=
strdup
(
ppsz_argv
[
0
]
);
p_char
=
vlc_global
()
->
psz_vlcpath
=
strdup
(
ppsz_argv
[
0
]
);
/* Remove trailing program name */
/* Remove trailing program name */
for
(
;
*
p_char
;
)
for
(
;
*
p_char
;
)
...
@@ -117,8 +117,8 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
...
@@ -117,8 +117,8 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
CFRelease
(
all_locales
);
CFRelease
(
all_locales
);
}
}
vlc_mutex_init
(
p_this
,
&
vlc_global
(
p_this
)
->
iconv_lock
);
vlc_mutex_init
(
p_this
,
&
vlc_global
()
->
iconv_lock
);
vlc_global
(
p_this
)
->
iconv_macosx
=
vlc_iconv_open
(
"UTF-8"
,
"UTF-8-MAC"
);
vlc_global
()
->
iconv_macosx
=
vlc_iconv_open
(
"UTF-8"
,
"UTF-8-MAC"
);
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -134,10 +134,10 @@ void system_Configure( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
...
@@ -134,10 +134,10 @@ void system_Configure( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
*****************************************************************************/
*****************************************************************************/
void
system_End
(
libvlc_int_t
*
p_this
)
void
system_End
(
libvlc_int_t
*
p_this
)
{
{
free
(
vlc_global
(
p_this
)
->
psz_vlcpath
);
free
(
vlc_global
()
->
psz_vlcpath
);
if
(
vlc_global
(
p_this
)
->
iconv_macosx
!=
(
vlc_iconv_t
)
-
1
)
if
(
vlc_global
()
->
iconv_macosx
!=
(
vlc_iconv_t
)
-
1
)
vlc_iconv_close
(
vlc_global
(
p_this
)
->
iconv_macosx
);
vlc_iconv_close
(
vlc_global
()
->
iconv_macosx
);
vlc_mutex_destroy
(
&
vlc_global
(
p_this
)
->
iconv_lock
);
vlc_mutex_destroy
(
&
vlc_global
()
->
iconv_lock
);
}
}
src/misc/objects.c
View file @
3ea2708d
...
@@ -160,7 +160,7 @@ vlc_object_t *vlc_custom_create( vlc_object_t *p_this, size_t i_size,
...
@@ -160,7 +160,7 @@ vlc_object_t *vlc_custom_create( vlc_object_t *p_this, size_t i_size,
}
}
else
else
{
{
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
(
p_this
);
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
p_new
->
p_libvlc_global
=
VLC_OBJECT
(
p_libvlc_global
);
p_new
->
p_libvlc_global
=
VLC_OBJECT
(
p_libvlc_global
);
p_new
->
p_libvlc
=
(
i_type
==
VLC_OBJECT_LIBVLC
)
?
(
libvlc_int_t
*
)
p_new
p_new
->
p_libvlc
=
(
i_type
==
VLC_OBJECT_LIBVLC
)
?
(
libvlc_int_t
*
)
p_new
:
p_this
->
p_libvlc
;
:
p_this
->
p_libvlc
;
...
@@ -414,7 +414,7 @@ void __vlc_object_destroy( vlc_object_t *p_this )
...
@@ -414,7 +414,7 @@ void __vlc_object_destroy( vlc_object_t *p_this )
}
}
else
else
{
{
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
(
p_this
);
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
int
i_index
;
int
i_index
;
vlc_mutex_lock
(
&
structure_lock
);
vlc_mutex_lock
(
&
structure_lock
);
...
@@ -473,7 +473,7 @@ void * __vlc_object_get( vlc_object_t *p_this, int i_id )
...
@@ -473,7 +473,7 @@ void * __vlc_object_get( vlc_object_t *p_this, int i_id )
{
{
int
i_max
,
i_middle
;
int
i_max
,
i_middle
;
vlc_object_t
**
pp_objects
;
vlc_object_t
**
pp_objects
;
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
(
p_this
);
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
vlc_mutex_lock
(
&
structure_lock
);
vlc_mutex_lock
(
&
structure_lock
);
...
@@ -722,7 +722,7 @@ vlc_list_t * __vlc_list_find( vlc_object_t *p_this, int i_type, int i_mode )
...
@@ -722,7 +722,7 @@ vlc_list_t * __vlc_list_find( vlc_object_t *p_this, int i_type, int i_mode )
vlc_list_t
*
p_list
;
vlc_list_t
*
p_list
;
vlc_object_t
**
pp_current
,
**
pp_end
;
vlc_object_t
**
pp_current
,
**
pp_end
;
int
i_count
=
0
,
i_index
=
0
;
int
i_count
=
0
,
i_index
=
0
;
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
(
p_this
);
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
vlc_mutex_lock
(
&
structure_lock
);
vlc_mutex_lock
(
&
structure_lock
);
...
@@ -793,7 +793,7 @@ vlc_list_t * __vlc_list_find( vlc_object_t *p_this, int i_type, int i_mode )
...
@@ -793,7 +793,7 @@ vlc_list_t * __vlc_list_find( vlc_object_t *p_this, int i_type, int i_mode )
static
int
DumpCommand
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
static
int
DumpCommand
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
{
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
(
p_this
);
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
(
void
)
oldval
;
(
void
)
p_data
;
(
void
)
oldval
;
(
void
)
p_data
;
if
(
*
psz_cmd
==
'l'
)
if
(
*
psz_cmd
==
'l'
)
...
...
src/misc/stats.c
View file @
3ea2708d
...
@@ -290,7 +290,7 @@ void __stats_TimerStart( vlc_object_t *p_obj, const char *psz_name,
...
@@ -290,7 +290,7 @@ void __stats_TimerStart( vlc_object_t *p_obj, const char *psz_name,
if
(
!
p_counter
)
if
(
!
p_counter
)
{
{
counter_sample_t
*
p_sample
;
counter_sample_t
*
p_sample
;
p_counter
=
stats_CounterCreate
(
p_obj
->
p_libvlc
_global
,
VLC_VAR_TIME
,
p_counter
=
stats_CounterCreate
(
p_obj
->
p_libvlc
,
VLC_VAR_TIME
,
STATS_TIMER
);
STATS_TIMER
);
if
(
!
p_counter
)
if
(
!
p_counter
)
{
{
...
...
src/misc/variables.c
View file @
3ea2708d
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#ifdef HAVE_STDLIB_H
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
/* realloc() */
# include <stdlib.h>
/* realloc() */
#endif
#endif
#include "libvlc.h"
/*****************************************************************************
/*****************************************************************************
* Private types
* Private types
...
@@ -834,7 +835,7 @@ int __var_Get( vlc_object_t *p_this, const char *psz_name, vlc_value_t *p_val )
...
@@ -834,7 +835,7 @@ int __var_Get( vlc_object_t *p_this, const char *psz_name, vlc_value_t *p_val )
*/
*/
vlc_mutex_t
*
var_GetGlobalMutex
(
const
char
*
name
)
vlc_mutex_t
*
var_GetGlobalMutex
(
const
char
*
name
)
{
{
vlc_object_t
*
p_global
=
vlc_global_object
();
libvlc_global_data_t
*
p_global
=
vlc_global
();
vlc_value_t
val
;
vlc_value_t
val
;
if
(
var_Create
(
p_global
,
name
,
VLC_VAR_MUTEX
)
)
if
(
var_Create
(
p_global
,
name
,
VLC_VAR_MUTEX
)
)
...
...
src/misc/win32_specific.c
View file @
3ea2708d
...
@@ -86,7 +86,7 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
...
@@ -86,7 +86,7 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
}
}
#endif
#endif
vlc_global
(
p_this
)
->
psz_vlcpath
=
strdup
(
psz_path
);
vlc_global
()
->
psz_vlcpath
=
strdup
(
psz_path
);
/* Set the default file-translation mode */
/* Set the default file-translation mode */
#if !defined( UNDER_CE )
#if !defined( UNDER_CE )
...
@@ -362,10 +362,10 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
...
@@ -362,10 +362,10 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
*****************************************************************************/
*****************************************************************************/
void
system_End
(
libvlc_int_t
*
p_this
)
void
system_End
(
libvlc_int_t
*
p_this
)
{
{
if
(
p_this
&&
p_this
->
p_libvlc_global
&&
vlc_global
(
p_this
)
->
psz_vlcpath
)
if
(
p_this
&&
vlc_global
()
)
{
{
free
(
vlc_global
(
p_this
)
->
psz_vlcpath
);
free
(
vlc_global
()
->
psz_vlcpath
);
vlc_global
(
p_this
)
->
psz_vlcpath
=
NULL
;
vlc_global
()
->
psz_vlcpath
=
NULL
;
}
}
WSACleanup
();
WSACleanup
();
...
...
src/modules/configuration.c
View file @
3ea2708d
...
@@ -1705,22 +1705,21 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[],
...
@@ -1705,22 +1705,21 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[],
*
*
* @return a string (always succeeds).
* @return a string (always succeeds).
*/
*/
const
char
*
__config_GetDataDir
(
const
vlc_object_t
*
p_this
)
const
char
*
config_GetDataDir
(
void
)
{
{
#if defined (WIN32) || defined (UNDER_CE)
#if defined (WIN32) || defined (UNDER_CE)
return
vlc_global
(
p_this
)
->
psz_vlcpath
;
return
vlc_global
()
->
psz_vlcpath
;
#elif defined(__APPLE__) || defined (SYS_BEOS)
#elif defined(__APPLE__) || defined (SYS_BEOS)
static
char
path
[
PATH_MAX
]
=
""
;
static
char
path
[
PATH_MAX
]
=
""
;
if
(
*
path
==
'\0'
)
if
(
*
path
==
'\0'
)
{
{
snprintf
(
path
,
sizeof
(
path
),
"%s/share"
,
snprintf
(
path
,
sizeof
(
path
),
"%s/share"
,
vlc_global
(
p_this
)
->
psz_vlcpath
);
vlc_global
()
->
psz_vlcpath
);
path
[
sizeof
(
path
)
-
1
]
=
'\0'
;
path
[
sizeof
(
path
)
-
1
]
=
'\0'
;
}
}
return
path
;
return
path
;
#else
#else
(
void
)
p_this
;
return
DATA_PATH
;
return
DATA_PATH
;
#endif
#endif
}
}
...
...
src/modules/modules.c
View file @
3ea2708d
...
@@ -171,7 +171,7 @@ void __module_InitBank( vlc_object_t *p_this )
...
@@ -171,7 +171,7 @@ void __module_InitBank( vlc_object_t *p_this )
{
{
module_bank_t
*
p_bank
=
NULL
;
module_bank_t
*
p_bank
=
NULL
;
vlc_value_t
lockval
;
vlc_value_t
lockval
;
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
(
p_this
);
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
var_Create
(
p_libvlc_global
,
"libvlc"
,
VLC_VAR_MUTEX
);
var_Create
(
p_libvlc_global
,
"libvlc"
,
VLC_VAR_MUTEX
);
var_Get
(
p_libvlc_global
,
"libvlc"
,
&
lockval
);
var_Get
(
p_libvlc_global
,
"libvlc"
,
&
lockval
);
...
@@ -214,7 +214,7 @@ void __module_EndBank( vlc_object_t *p_this )
...
@@ -214,7 +214,7 @@ void __module_EndBank( vlc_object_t *p_this )
{
{
module_t
*
p_next
=
NULL
;
module_t
*
p_next
=
NULL
;
vlc_value_t
lockval
;
vlc_value_t
lockval
;
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
(
p_this
);
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
var_Create
(
p_libvlc_global
,
"libvlc"
,
VLC_VAR_MUTEX
);
var_Create
(
p_libvlc_global
,
"libvlc"
,
VLC_VAR_MUTEX
);
var_Get
(
p_libvlc_global
,
"libvlc"
,
&
lockval
);
var_Get
(
p_libvlc_global
,
"libvlc"
,
&
lockval
);
...
@@ -302,7 +302,7 @@ void __module_EndBank( vlc_object_t *p_this )
...
@@ -302,7 +302,7 @@ void __module_EndBank( vlc_object_t *p_this )
static
void
module_LoadMain
(
vlc_object_t
*
p_this
)
static
void
module_LoadMain
(
vlc_object_t
*
p_this
)
{
{
vlc_value_t
lockval
;
vlc_value_t
lockval
;
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
(
p_this
);
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
var_Create
(
p_libvlc_global
,
"libvlc"
,
VLC_VAR_MUTEX
);
var_Create
(
p_libvlc_global
,
"libvlc"
,
VLC_VAR_MUTEX
);
var_Get
(
p_libvlc_global
,
"libvlc"
,
&
lockval
);
var_Get
(
p_libvlc_global
,
"libvlc"
,
&
lockval
);
...
@@ -328,7 +328,7 @@ static void module_LoadMain( vlc_object_t *p_this )
...
@@ -328,7 +328,7 @@ static void module_LoadMain( vlc_object_t *p_this )
void
__module_LoadBuiltins
(
vlc_object_t
*
p_this
)
void
__module_LoadBuiltins
(
vlc_object_t
*
p_this
)
{
{
vlc_value_t
lockval
;
vlc_value_t
lockval
;
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
(
p_this
);
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
var_Create
(
p_libvlc_global
,
"libvlc"
,
VLC_VAR_MUTEX
);
var_Create
(
p_libvlc_global
,
"libvlc"
,
VLC_VAR_MUTEX
);
var_Get
(
p_libvlc_global
,
"libvlc"
,
&
lockval
);
var_Get
(
p_libvlc_global
,
"libvlc"
,
&
lockval
);
...
@@ -356,7 +356,7 @@ void __module_LoadPlugins( vlc_object_t * p_this )
...
@@ -356,7 +356,7 @@ void __module_LoadPlugins( vlc_object_t * p_this )
{
{
#ifdef HAVE_DYNAMIC_PLUGINS
#ifdef HAVE_DYNAMIC_PLUGINS
vlc_value_t
lockval
;
vlc_value_t
lockval
;
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
(
p_this
);
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
var_Create
(
p_libvlc_global
,
"libvlc"
,
VLC_VAR_MUTEX
);
var_Create
(
p_libvlc_global
,
"libvlc"
,
VLC_VAR_MUTEX
);
var_Get
(
p_libvlc_global
,
"libvlc"
,
&
lockval
);
var_Get
(
p_libvlc_global
,
"libvlc"
,
&
lockval
);
...
@@ -830,7 +830,7 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
...
@@ -830,7 +830,7 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
#endif
#endif
{
{
if
(
0
>=
asprintf
(
&
psz_fullpath
,
"%s"
DIR_SEP
"%s"
,
if
(
0
>=
asprintf
(
&
psz_fullpath
,
"%s"
DIR_SEP
"%s"
,
vlc_global
(
p_this
)
->
psz_vlcpath
,
*
ppsz_path
)
)
vlc_global
()
->
psz_vlcpath
,
*
ppsz_path
)
)
psz_fullpath
=
NULL
;
psz_fullpath
=
NULL
;
}
}
else
else
...
@@ -1092,7 +1092,7 @@ static int AllocatePluginFile( vlc_object_t * p_this, char * psz_file,
...
@@ -1092,7 +1092,7 @@ static int AllocatePluginFile( vlc_object_t * p_this, char * psz_file,
if
(
p_module
)
if
(
p_module
)
{
{
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
(
p_this
);
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
/* Everything worked fine !
/* Everything worked fine !
* The module is ready to be added to the list. */
* The module is ready to be added to the list. */
...
@@ -1277,7 +1277,7 @@ static int AllocateBuiltinModule( vlc_object_t * p_this,
...
@@ -1277,7 +1277,7 @@ static int AllocateBuiltinModule( vlc_object_t * p_this,
/* msg_Dbg( p_this, "builtin \"%s\", %s",
/* msg_Dbg( p_this, "builtin \"%s\", %s",
p_module->psz_object_name, p_module->psz_longname ); */
p_module->psz_object_name, p_module->psz_longname ); */
vlc_object_attach
(
p_module
,
vlc_global
(
p_this
)
->
p_module_bank
);
vlc_object_attach
(
p_module
,
vlc_global
()
->
p_module_bank
);
return
0
;
return
0
;
}
}
...
@@ -1653,7 +1653,7 @@ static void CacheLoad( vlc_object_t *p_this )
...
@@ -1653,7 +1653,7 @@ static void CacheLoad( vlc_object_t *p_this )
int
i_cache
;
int
i_cache
;
module_cache_t
**
pp_cache
=
0
;
module_cache_t
**
pp_cache
=
0
;
int32_t
i_file_size
,
i_marker
;
int32_t
i_file_size
,
i_marker
;
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
(
p_this
);
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
psz_homedir
=
p_this
->
p_libvlc
->
psz_homedir
;
psz_homedir
=
p_this
->
p_libvlc
->
psz_homedir
;
if
(
!
psz_homedir
)
if
(
!
psz_homedir
)
...
@@ -2007,7 +2007,7 @@ static void CacheSave( vlc_object_t *p_this )
...
@@ -2007,7 +2007,7 @@ static void CacheSave( vlc_object_t *p_this )
int
i
,
j
,
i_cache
;
int
i
,
j
,
i_cache
;
module_cache_t
**
pp_cache
;
module_cache_t
**
pp_cache
;
int32_t
i_file_size
=
0
;
int32_t
i_file_size
=
0
;
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
(
p_this
);
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
psz_homedir
=
p_this
->
p_libvlc
->
psz_homedir
;
psz_homedir
=
p_this
->
p_libvlc
->
psz_homedir
;
if
(
!
psz_homedir
)
if
(
!
psz_homedir
)
...
@@ -2254,7 +2254,7 @@ static module_cache_t *CacheFind( vlc_object_t *p_this, char *psz_file,
...
@@ -2254,7 +2254,7 @@ static module_cache_t *CacheFind( vlc_object_t *p_this, char *psz_file,
{
{
module_cache_t
**
pp_cache
;
module_cache_t
**
pp_cache
;
int
i_cache
,
i
;
int
i_cache
,
i
;
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
(
p_this
);
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
pp_cache
=
p_libvlc_global
->
p_module_bank
->
pp_loaded_cache
;
pp_cache
=
p_libvlc_global
->
p_module_bank
->
pp_loaded_cache
;
i_cache
=
p_libvlc_global
->
p_module_bank
->
i_loaded_cache
;
i_cache
=
p_libvlc_global
->
p_module_bank
->
i_loaded_cache
;
...
...
src/network/httpd.c
View file @
3ea2708d
...
@@ -996,8 +996,8 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, const char *psz_hostname,
...
@@ -996,8 +996,8 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, const char *psz_hostname,
}
}
/* to be sure to avoid multiple creation */
/* to be sure to avoid multiple creation */
var_Create
(
p_this
->
p_libvlc
_global
,
"httpd_mutex"
,
VLC_VAR_MUTEX
);
var_Create
(
p_this
->
p_libvlc
,
"httpd_mutex"
,
VLC_VAR_MUTEX
);
var_Get
(
p_this
->
p_libvlc
_global
,
"httpd_mutex"
,
&
lockval
);
var_Get
(
p_this
->
p_libvlc
,
"httpd_mutex"
,
&
lockval
);
vlc_mutex_lock
(
lockval
.
p_address
);
vlc_mutex_lock
(
lockval
.
p_address
);
if
(
!
(
httpd
=
vlc_object_find
(
p_this
,
VLC_OBJECT_HTTPD
,
FIND_ANYWHERE
))
)
if
(
!
(
httpd
=
vlc_object_find
(
p_this
,
VLC_OBJECT_HTTPD
,
FIND_ANYWHERE
))
)
...
@@ -1138,7 +1138,7 @@ void httpd_HostDelete( httpd_host_t *host )
...
@@ -1138,7 +1138,7 @@ void httpd_HostDelete( httpd_host_t *host )
vlc_value_t
lockval
;
vlc_value_t
lockval
;
int
i
;
int
i
;
var_Get
(
httpd
->
p_libvlc
_global
,
"httpd_mutex"
,
&
lockval
);
var_Get
(
httpd
->
p_libvlc
,
"httpd_mutex"
,
&
lockval
);
vlc_mutex_lock
(
lockval
.
p_address
);
vlc_mutex_lock
(
lockval
.
p_address
);
host
->
i_ref
--
;
host
->
i_ref
--
;
...
...
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