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
4b4f77c3
Commit
4b4f77c3
authored
Aug 16, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
var_GetGlobalMutex() creates and gets a global mutex
parent
0df4f0cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
include/vlc_variables.h
include/vlc_variables.h
+2
-0
src/libvlc.sym
src/libvlc.sym
+1
-1
src/misc/variables.c
src/misc/variables.c
+17
-0
No files found.
include/vlc_variables.h
View file @
4b4f77c3
...
...
@@ -126,6 +126,8 @@ VLC_EXPORT( void, __var_OptionParse, ( vlc_object_t *, const char * ) );
#define var_Command(a,b,c,d,e) __var_Command( VLC_OBJECT( a ), b, c, d, e )
VLC_EXPORT
(
int
,
__var_Command
,
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
const
char
*
,
char
**
)
);
VLC_EXPORT
(
vlc_mutex_t
*
,
var_GetGlobalMutex
,
(
const
char
*
)
);
/**
* __var_Create() with automatic casting.
*/
...
...
src/libvlc.sym
View file @
4b4f77c3
...
...
@@ -342,6 +342,7 @@ __var_Create
__var_DelCallback
__var_Destroy
__var_Get
var_GetGlobalMutex
__var_OptionParse
__var_Set
__var_Type
...
...
@@ -362,7 +363,6 @@ VLC_VariableSet
__vlc_cond_destroy
__vlc_cond_init
vlc_current_object
vlc_global_object
vlc_error
VLC_Error
__vlc_execve
...
...
src/misc/variables.c
View file @
4b4f77c3
...
...
@@ -828,6 +828,23 @@ int __var_Get( vlc_object_t *p_this, const char *psz_name, vlc_value_t *p_val )
return
VLC_SUCCESS
;
}
/**
* Gets a process-wide mutex, creates it if needed.
*/
vlc_mutex_t
*
var_GetGlobalMutex
(
const
char
*
name
)
{
libvlc_global_data_t
*
p_global
=
vlc_global_object
();
vlc_value_t
val
;
if
(
var_Create
(
p_global
,
name
,
VLC_VAR_MUTEX
)
)
return
NULL
;
var_Get
(
p_global
,
&
val
);
return
val
.
p_lockval
;
}
/**
* Register a callback in a variable
*
...
...
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