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
8d98b9f5
Commit
8d98b9f5
authored
May 05, 2003
by
Sigmund Augdal Helberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implemented VLC_VAR_TIME using two ints
parent
269a9ae6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
include/vlc/vlc.h
include/vlc/vlc.h
+2
-1
src/misc/variables.c
src/misc/variables.c
+11
-2
No files found.
include/vlc/vlc.h
View file @
8d98b9f5
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* vlc.h: global header for vlc
* vlc.h: global header for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc.h,v 1.2
2 2003/01/28 02:03:32 sam
Exp $
* $Id: vlc.h,v 1.2
3 2003/05/05 15:21:28 sigmunau
Exp $
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
...
@@ -42,6 +42,7 @@ typedef union
...
@@ -42,6 +42,7 @@ typedef union
void
*
p_address
;
void
*
p_address
;
vlc_object_t
*
p_object
;
vlc_object_t
*
p_object
;
vlc_list_t
*
p_list
;
vlc_list_t
*
p_list
;
struct
{
int
i_low
,
i_high
;
}
time
;
/* Make sure the structure is at least 64bits */
/* Make sure the structure is at least 64bits */
struct
{
char
a
,
b
,
c
,
d
,
e
,
f
,
g
,
h
;
}
padding
;
struct
{
char
a
,
b
,
c
,
d
,
e
,
f
,
g
,
h
;
}
padding
;
...
...
src/misc/variables.c
View file @
8d98b9f5
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* variables.c: routines for object variables handling
* variables.c: routines for object variables handling
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: variables.c,v 1.2
2 2003/05/04 22:42:18 gbazin
Exp $
* $Id: variables.c,v 1.2
3 2003/05/05 15:21:27 sigmunau
Exp $
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Authors: Samuel Hocevar <sam@zoy.org>
*
*
...
@@ -44,6 +44,13 @@ struct callback_entry_t
...
@@ -44,6 +44,13 @@ struct callback_entry_t
*****************************************************************************/
*****************************************************************************/
static
int
CmpBool
(
vlc_value_t
v
,
vlc_value_t
w
)
{
return
v
.
b_bool
?
w
.
b_bool
?
0
:
1
:
w
.
b_bool
?
-
1
:
0
;
}
static
int
CmpBool
(
vlc_value_t
v
,
vlc_value_t
w
)
{
return
v
.
b_bool
?
w
.
b_bool
?
0
:
1
:
w
.
b_bool
?
-
1
:
0
;
}
static
int
CmpInt
(
vlc_value_t
v
,
vlc_value_t
w
)
{
return
v
.
i_int
==
w
.
i_int
?
0
:
v
.
i_int
>
w
.
i_int
?
1
:
-
1
;
}
static
int
CmpInt
(
vlc_value_t
v
,
vlc_value_t
w
)
{
return
v
.
i_int
==
w
.
i_int
?
0
:
v
.
i_int
>
w
.
i_int
?
1
:
-
1
;
}
static
int
CmpTime
(
vlc_value_t
v
,
vlc_value_t
w
)
{
mtime_t
v_time
,
w_time
;
v_time
=
(
(
mtime_t
)
v
.
time
.
i_high
<<
32
)
+
v
.
time
.
i_low
;
w_time
=
(
(
mtime_t
)
w
.
time
.
i_high
<<
32
)
+
w
.
time
.
i_low
;
return
v_time
==
w_time
?
0
:
v_time
>
w_time
?
1
:
-
1
;
}
static
int
CmpString
(
vlc_value_t
v
,
vlc_value_t
w
)
{
return
strcmp
(
v
.
psz_string
,
w
.
psz_string
);
}
static
int
CmpString
(
vlc_value_t
v
,
vlc_value_t
w
)
{
return
strcmp
(
v
.
psz_string
,
w
.
psz_string
);
}
static
int
CmpFloat
(
vlc_value_t
v
,
vlc_value_t
w
)
{
return
v
.
f_float
==
w
.
f_float
?
0
:
v
.
f_float
>
w
.
f_float
?
1
:
-
1
;
}
static
int
CmpFloat
(
vlc_value_t
v
,
vlc_value_t
w
)
{
return
v
.
f_float
==
w
.
f_float
?
0
:
v
.
f_float
>
w
.
f_float
?
1
:
-
1
;
}
static
int
CmpAddress
(
vlc_value_t
v
,
vlc_value_t
w
)
{
return
v
.
p_address
==
w
.
p_address
?
0
:
v
.
p_address
>
w
.
p_address
?
1
:
-
1
;
}
static
int
CmpAddress
(
vlc_value_t
v
,
vlc_value_t
w
)
{
return
v
.
p_address
==
w
.
p_address
?
0
:
v
.
p_address
>
w
.
p_address
?
1
:
-
1
;
}
...
@@ -226,7 +233,9 @@ int __var_Create( vlc_object_t *p_this, const char *psz_name, int i_type )
...
@@ -226,7 +233,9 @@ int __var_Create( vlc_object_t *p_this, const char *psz_name, int i_type )
p_var
->
val
.
f_float
=
0
.
0
;
p_var
->
val
.
f_float
=
0
.
0
;
break
;
break
;
case
VLC_VAR_TIME
:
case
VLC_VAR_TIME
:
/* FIXME: TODO */
p_var
->
pf_cmp
=
CmpTime
;
p_var
->
val
.
time
.
i_low
=
0
;
p_var
->
val
.
time
.
i_high
=
0
;
break
;
break
;
case
VLC_VAR_ADDRESS
:
case
VLC_VAR_ADDRESS
:
p_var
->
pf_cmp
=
CmpAddress
;
p_var
->
pf_cmp
=
CmpAddress
;
...
...
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