Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
df5b86aa
Commit
df5b86aa
authored
Jun 02, 2004
by
Yoann Peronneau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/control/hotkeys.c : Display simultaneously time position and slider when seeking.
parent
50b65815
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
28 deletions
+43
-28
modules/control/hotkeys.c
modules/control/hotkeys.c
+43
-28
No files found.
modules/control/hotkeys.c
View file @
df5b86aa
...
...
@@ -66,6 +66,7 @@ static int ActionKeyCB( vlc_object_t *, char const *,
static
void
PlayBookmark
(
intf_thread_t
*
,
int
);
static
void
SetBookmark
(
intf_thread_t
*
,
int
);
static
int
GetPosition
(
intf_thread_t
*
);
static
void
DisplayPosition
(
input_thread_t
*
);
/*****************************************************************************
* Module descriptor
...
...
@@ -377,8 +378,11 @@ static void Run( intf_thread_t *p_intf )
{
val
.
i_time
=
-
10000000
;
var_Set
(
p_input
,
"time-offset"
,
val
);
if
(
p_vout
)
{
if
(
!
p_vout
->
p_parent_intf
||
p_vout
->
b_fullscreen
)
{
DisplayPosition
(
p_input
);
vout_OSDSlider
(
VLC_OBJECT
(
p_intf
),
POSITION_CHAN
,
GetPosition
(
p_intf
),
OSD_HOR_SLIDER
);
}
...
...
@@ -388,6 +392,7 @@ static void Run( intf_thread_t *p_intf )
_
(
"Jump -10 seconds"
)
);
}
}
}
else
if
(
i_action
==
ACTIONID_JUMP_FORWARD_10SEC
&&
b_seekable
)
{
val
.
i_time
=
10000000
;
...
...
@@ -396,6 +401,7 @@ static void Run( intf_thread_t *p_intf )
{
if
(
!
p_vout
->
p_parent_intf
||
p_vout
->
b_fullscreen
)
{
DisplayPosition
(
p_input
);
vout_OSDSlider
(
VLC_OBJECT
(
p_intf
),
POSITION_CHAN
,
GetPosition
(
p_intf
),
OSD_HOR_SLIDER
);
}
...
...
@@ -414,6 +420,7 @@ static void Run( intf_thread_t *p_intf )
{
if
(
!
p_vout
->
p_parent_intf
||
p_vout
->
b_fullscreen
)
{
DisplayPosition
(
p_input
);
vout_OSDSlider
(
VLC_OBJECT
(
p_intf
),
POSITION_CHAN
,
GetPosition
(
p_intf
),
OSD_HOR_SLIDER
);
}
...
...
@@ -432,6 +439,7 @@ static void Run( intf_thread_t *p_intf )
{
if
(
!
p_vout
->
p_parent_intf
||
p_vout
->
b_fullscreen
)
{
DisplayPosition
(
p_input
);
vout_OSDSlider
(
VLC_OBJECT
(
p_intf
),
POSITION_CHAN
,
GetPosition
(
p_intf
),
OSD_HOR_SLIDER
);
}
...
...
@@ -450,6 +458,7 @@ static void Run( intf_thread_t *p_intf )
{
if
(
!
p_vout
->
p_parent_intf
||
p_vout
->
b_fullscreen
)
{
DisplayPosition
(
p_input
);
vout_OSDSlider
(
VLC_OBJECT
(
p_intf
),
POSITION_CHAN
,
GetPosition
(
p_intf
),
OSD_HOR_SLIDER
);
}
...
...
@@ -468,6 +477,7 @@ static void Run( intf_thread_t *p_intf )
{
if
(
!
p_vout
->
p_parent_intf
||
p_vout
->
b_fullscreen
)
{
DisplayPosition
(
p_input
);
vout_OSDSlider
(
VLC_OBJECT
(
p_intf
),
POSITION_CHAN
,
GetPosition
(
p_intf
),
OSD_HOR_SLIDER
);
}
...
...
@@ -520,26 +530,7 @@ static void Run( intf_thread_t *p_intf )
}
else
if
(
i_action
==
ACTIONID_POSITION
)
{
char
psz_duration
[
MSTRTIME_MAX_SIZE
];
char
psz_time
[
MSTRTIME_MAX_SIZE
];
vlc_value_t
time
;
mtime_t
i_seconds
;
var_Get
(
p_input
,
"time"
,
&
time
);
i_seconds
=
time
.
i_time
/
1000000
;
secstotimestr
(
psz_time
,
i_seconds
);
var_Get
(
p_input
,
"length"
,
&
time
);
if
(
time
.
i_time
>
0
)
{
secstotimestr
(
psz_duration
,
time
.
i_time
/
1000000
);
vout_OSDMessage
(
p_input
,
POSITION_CHAN
,
"%s / %s"
,
psz_time
,
psz_duration
);
}
else
if
(
i_seconds
>
0
)
{
vout_OSDMessage
(
p_input
,
POSITION_CHAN
,
psz_time
);
}
DisplayPosition
(
p_input
);
}
else
if
(
i_action
>=
ACTIONID_PLAY_BOOKMARK1
&&
i_action
<=
ACTIONID_PLAY_BOOKMARK10
)
...
...
@@ -680,3 +671,27 @@ static int GetPosition( intf_thread_t *p_intf )
}
return
-
1
;
}
static
void
DisplayPosition
(
input_thread_t
*
p_input
)
{
char
psz_duration
[
MSTRTIME_MAX_SIZE
];
char
psz_time
[
MSTRTIME_MAX_SIZE
];
vlc_value_t
time
;
mtime_t
i_seconds
;
var_Get
(
p_input
,
"time"
,
&
time
);
i_seconds
=
time
.
i_time
/
1000000
;
secstotimestr
(
psz_time
,
i_seconds
);
var_Get
(
p_input
,
"length"
,
&
time
);
if
(
time
.
i_time
>
0
)
{
secstotimestr
(
psz_duration
,
time
.
i_time
/
1000000
);
vout_OSDMessage
(
p_input
,
POSITION_CHAN
,
"%s / %s"
,
psz_time
,
psz_duration
);
}
else
if
(
i_seconds
>
0
)
{
vout_OSDMessage
(
p_input
,
POSITION_CHAN
,
psz_time
);
}
}
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