Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
Steve Lhomme
VLC
Commits
b296f18c
Commit
b296f18c
authored
Jun 15, 2016
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: remove unused "position-offset" variable
parent
848f58d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
25 deletions
+11
-25
include/vlc_input.h
include/vlc_input.h
+1
-1
src/input/var.c
src/input/var.c
+10
-24
No files found.
include/vlc_input.h
View file @
b296f18c
...
...
@@ -272,7 +272,7 @@ struct input_thread_t
* The read-write variables are:
* - state (\see input_state_e)
* - rate
* - position
, position-offset
* - position
* - time, time-offset
* - title, next-title, prev-title
* - chapter, next-chapter, next-chapter-prev
...
...
src/input/var.c
View file @
b296f18c
...
...
@@ -91,7 +91,6 @@ static const vlc_input_callback_t p_input_callbacks[] =
CALLBACK
(
"state"
,
StateCallback
),
CALLBACK
(
"rate"
,
RateCallback
),
CALLBACK
(
"position"
,
PositionCallback
),
CALLBACK
(
"position-offset"
,
PositionCallback
),
CALLBACK
(
"time"
,
TimeCallback
),
CALLBACK
(
"time-offset"
,
TimeOffsetCallback
),
CALLBACK
(
"bookmark"
,
BookmarkCallback
),
...
...
@@ -146,7 +145,6 @@ void input_ControlVarInit ( input_thread_t *p_input )
/* Position */
var_Create
(
p_input
,
"position"
,
VLC_VAR_FLOAT
);
var_Create
(
p_input
,
"position-offset"
,
VLC_VAR_FLOAT
);
/* Time */
var_Create
(
p_input
,
"time"
,
VLC_VAR_INTEGER
);
...
...
@@ -586,32 +584,20 @@ static int PositionCallback( vlc_object_t *p_this, char const *psz_cmd,
void
*
p_data
)
{
input_thread_t
*
p_input
=
(
input_thread_t
*
)
p_this
;
VLC_UNUSED
(
oldval
);
VLC_UNUSED
(
p_data
);
if
(
!
strcmp
(
psz_cmd
,
"position-offset"
)
)
{
float
f_position
=
var_GetFloat
(
p_input
,
"position"
)
+
newval
.
f_float
;
if
(
f_position
<
0
.
f
)
f_position
=
0
.
f
;
else
if
(
f_position
>
1
.
f
)
f_position
=
1
.
f
;
var_SetFloat
(
p_this
,
"position"
,
f_position
);
}
else
{
/* Update "length" for better intf behaviour */
const
int64_t
i_length
=
var_GetInteger
(
p_input
,
"length"
);
if
(
i_length
>
0
&&
newval
.
f_float
>=
0
.
f
&&
newval
.
f_float
<=
1
.
f
)
{
vlc_value_t
val
;
VLC_UNUSED
(
psz_cmd
);
VLC_UNUSED
(
oldval
);
VLC_UNUSED
(
p_data
);
val
.
i_int
=
i_length
*
newval
.
f_float
;
var_Change
(
p_input
,
"time"
,
VLC_VAR_SETVALUE
,
&
val
,
NULL
);
}
/* Update "length" for better intf behaviour */
const
int64_t
i_length
=
var_GetInteger
(
p_input
,
"length"
);
if
(
i_length
>
0
&&
newval
.
f_float
>=
0
.
f
&&
newval
.
f_float
<=
1
.
f
)
{
vlc_value_t
val
;
/* */
input_ControlPush
(
p_input
,
INPUT_CONTROL_SET_POSITION
,
&
newval
);
val
.
i_int
=
i_length
*
newval
.
f_float
;
var_Change
(
p_input
,
"time"
,
VLC_VAR_SETVALUE
,
&
val
,
NULL
);
}
input_ControlPush
(
p_input
,
INPUT_CONTROL_SET_POSITION
,
&
newval
);
return
VLC_SUCCESS
;
}
...
...
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