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
d3ebbe58
Commit
d3ebbe58
authored
Dec 30, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Helpers for var_Inherit()
parent
9fd89d7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
include/vlc_variables.h
include/vlc_variables.h
+49
-0
No files found.
include/vlc_variables.h
View file @
d3ebbe58
...
@@ -718,6 +718,55 @@ static inline int __var_ToggleBool( vlc_object_t *p_obj, const char *psz_name )
...
@@ -718,6 +718,55 @@ static inline int __var_ToggleBool( vlc_object_t *p_obj, const char *psz_name )
* __var_ToggleBool() with automatic casting
* __var_ToggleBool() with automatic casting
*/
*/
#define var_ToggleBool(a,b) __var_ToggleBool( VLC_OBJECT(a),b )
#define var_ToggleBool(a,b) __var_ToggleBool( VLC_OBJECT(a),b )
LIBVLC_USED
static
inline
int
var_InheritInteger
(
vlc_object_t
*
obj
,
const
char
*
name
)
{
vlc_value_t
val
;
if
(
var_Inherit
(
obj
,
name
,
VLC_VAR_INTEGER
,
&
val
)
)
val
.
i_int
=
0
;
return
val
.
i_int
;
}
#define var_InheritInteger(o, n) var_InheritInteger(VLC_OBJECT(o), n)
LIBVLC_USED
static
inline
float
var_InheritFloat
(
vlc_object_t
*
obj
,
const
char
*
name
)
{
vlc_value_t
val
;
if
(
var_Inherit
(
obj
,
name
,
VLC_VAR_FLOAT
,
&
val
)
)
val
.
f_float
=
0
.;
return
val
.
f_float
;
}
#define var_InheritFloat(o, n) var_InheritFloat(VLC_OBJECT(o), n)
LIBVLC_USED
LIBVLC_MALLOC
static
inline
char
*
var_InheritString
(
vlc_object_t
*
obj
,
const
char
*
name
)
{
vlc_value_t
val
;
if
(
var_Inherit
(
obj
,
name
,
VLC_VAR_STRING
,
&
val
)
)
val
.
psz_string
=
NULL
;
else
if
(
val
.
psz_string
&&
!*
val
.
psz_string
)
{
free
(
val
.
psz_string
);
val
.
psz_string
=
NULL
;
}
return
val
.
psz_string
;
}
#define var_InheritString(o, n) var_InheritString(VLC_OBJECT(o), n)
static
inline
mtime_t
var_InheritTime
(
vlc_object_t
*
obj
,
const
char
*
name
)
{
vlc_value_t
val
;
if
(
var_Inherit
(
obj
,
name
,
VLC_VAR_TIME
,
&
val
)
)
val
.
i_time
=
0
;
return
val
.
i_time
;
}
#define var_InheritTime(o, n) var_InheritTime(VLC_OBJECT(o), n)
/**
/**
* @}
* @}
*/
*/
...
...
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