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
80cb2948
Commit
80cb2948
authored
Sep 28, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove vlc_global()
parent
75ba8eb9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
27 deletions
+19
-27
src/libvlc.h
src/libvlc.h
+0
-1
src/misc/threads.c
src/misc/threads.c
+18
-6
src/misc/variables.c
src/misc/variables.c
+0
-19
src/misc/win32_specific.c
src/misc/win32_specific.c
+1
-1
No files found.
src/libvlc.h
View file @
80cb2948
...
...
@@ -146,7 +146,6 @@ __vlc_custom_create (vlc_object_t *p_this, size_t i_size, int i_type,
*/
extern
module_bank_t
*
p_module_bank
;
vlc_object_t
*
vlc_global
(
void
);
extern
char
*
psz_vlcpath
;
/**
...
...
src/misc/threads.c
View file @
80cb2948
...
...
@@ -59,12 +59,6 @@ static vlc_threadvar_t cancel_key;
*/
static
vlc_object_t
*
p_root
;
vlc_object_t
*
vlc_global
(
void
)
{
assert
(
i_initializations
>
0
);
return
p_root
;
}
#ifdef HAVE_EXECINFO_H
# include <execinfo.h>
#endif
...
...
@@ -1110,3 +1104,21 @@ void vlc_control_cancel (int cmd, ...)
va_end
(
ap
);
#endif
}
#undef var_AcquireMutex
/**
* Finds a process-wide mutex, creates it if needed, and locks it.
* Unlock with vlc_mutex_unlock().
*/
vlc_mutex_t
*
var_AcquireMutex
(
const
char
*
name
)
{
vlc_value_t
val
;
if
(
var_Create
(
p_root
,
name
,
VLC_VAR_MUTEX
)
)
return
NULL
;
var_Get
(
p_root
,
name
,
&
val
);
vlc_mutex_lock
(
val
.
p_address
);
return
val
.
p_address
;
}
src/misc/variables.c
View file @
80cb2948
...
...
@@ -849,25 +849,6 @@ int __var_Get( vlc_object_t *p_this, const char *psz_name, vlc_value_t *p_val )
}
#undef var_AcquireMutex
/**
* Finds a process-wide mutex, creates it if needed, and locks it.
* Unlock with vlc_mutex_unlock().
*/
vlc_mutex_t
*
var_AcquireMutex
(
const
char
*
name
)
{
vlc_object_t
*
p_global
=
vlc_global
();
vlc_value_t
val
;
if
(
var_Create
(
p_global
,
name
,
VLC_VAR_MUTEX
)
)
return
NULL
;
var_Get
(
p_global
,
name
,
&
val
);
vlc_mutex_lock
(
val
.
p_address
);
return
val
.
p_address
;
}
/**
* Register a callback in a variable
*
...
...
src/misc/win32_specific.c
View file @
80cb2948
...
...
@@ -369,7 +369,7 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
void
system_End
(
libvlc_int_t
*
p_this
)
{
HWND
ipcwindow
;
if
(
p_this
&&
vlc_global
()
)
if
(
p_this
)
{
free
(
psz_vlcpath
);
psz_vlcpath
=
NULL
;
...
...
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