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
a1bd506b
Commit
a1bd506b
authored
Oct 22, 2005
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* hotkeys.c: don't crash when there is no input
parent
6e701044
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
69 deletions
+68
-69
modules/control/hotkeys.c
modules/control/hotkeys.c
+68
-69
No files found.
modules/control/hotkeys.c
View file @
a1bd506b
...
...
@@ -327,50 +327,6 @@ static void Run( intf_thread_t *p_intf )
{
if
(
p_vout
)
vout_Control
(
p_vout
,
VOUT_SNAPSHOT
);
}
else
if
(
i_action
==
ACTIONID_SUBDELAY_DOWN
)
{
int64_t
i_delay
=
var_GetTime
(
p_input
,
"spu-delay"
);
i_delay
-=
50000
;
/* 50 ms */
var_SetTime
(
p_input
,
"spu-delay"
,
i_delay
);
ClearChannels
(
p_intf
,
p_vout
);
vout_OSDMessage
(
p_intf
,
DEFAULT_CHAN
,
"Subtitle delay %i ms"
,
(
int
)(
i_delay
/
1000
)
);
}
else
if
(
i_action
==
ACTIONID_SUBDELAY_UP
)
{
int64_t
i_delay
=
var_GetTime
(
p_input
,
"spu-delay"
);
i_delay
+=
50000
;
/* 50 ms */
var_SetTime
(
p_input
,
"spu-delay"
,
i_delay
);
ClearChannels
(
p_intf
,
p_vout
);
vout_OSDMessage
(
p_intf
,
DEFAULT_CHAN
,
"Subtitle delay %i ms"
,
(
int
)(
i_delay
/
1000
)
);
}
else
if
(
i_action
==
ACTIONID_AUDIODELAY_DOWN
)
{
int64_t
i_delay
=
var_GetTime
(
p_input
,
"audio-delay"
);
i_delay
-=
50000
;
/* 50 ms */
var_SetTime
(
p_input
,
"audio-delay"
,
i_delay
);
ClearChannels
(
p_intf
,
p_vout
);
vout_OSDMessage
(
p_intf
,
DEFAULT_CHAN
,
"Audio delay %i ms"
,
(
int
)(
i_delay
/
1000
)
);
}
else
if
(
i_action
==
ACTIONID_AUDIODELAY_UP
)
{
int64_t
i_delay
=
var_GetTime
(
p_input
,
"audio-delay"
);
i_delay
+=
50000
;
/* 50 ms */
var_SetTime
(
p_input
,
"audio-delay"
,
i_delay
);
ClearChannels
(
p_intf
,
p_vout
);
vout_OSDMessage
(
p_intf
,
DEFAULT_CHAN
,
"Audio delay %i ms"
,
(
int
)(
i_delay
/
1000
)
);
}
else
if
(
i_action
==
ACTIONID_FULLSCREEN
)
{
if
(
p_vout
)
...
...
@@ -390,31 +346,6 @@ static void Run( intf_thread_t *p_intf )
}
}
}
else
if
(
i_action
==
ACTIONID_PLAY
)
{
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
)
{
var_Get
(
p_input
,
"rate"
,
&
val
);
msg_Dbg
(
p_input
,
"rate %d"
,
val
.
i_int
);
if
(
val
.
i_int
!=
INPUT_RATE_DEFAULT
)
{
/* Return to normal speed */
val
.
i_int
=
INPUT_RATE_DEFAULT
;
var_Set
(
p_input
,
"rate"
,
val
);
}
else
{
ClearChannels
(
p_intf
,
p_vout
);
vout_OSDIcon
(
VLC_OBJECT
(
p_intf
),
DEFAULT_CHAN
,
OSD_PAUSE_ICON
);
playlist_Play
(
p_playlist
);
}
vlc_object_release
(
p_playlist
);
}
}
else
if
(
i_action
==
ACTIONID_PLAY_PAUSE
)
{
val
.
i_int
=
PLAYING_S
;
...
...
@@ -675,6 +606,74 @@ static void Run( intf_thread_t *p_intf )
val
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_input
,
"next-chapter"
,
val
);
}
else
if
(
i_action
==
ACTIONID_SUBDELAY_DOWN
)
{
int64_t
i_delay
=
var_GetTime
(
p_input
,
"spu-delay"
);
i_delay
-=
50000
;
/* 50 ms */
var_SetTime
(
p_input
,
"spu-delay"
,
i_delay
);
ClearChannels
(
p_intf
,
p_vout
);
vout_OSDMessage
(
p_intf
,
DEFAULT_CHAN
,
"Subtitle delay %i ms"
,
(
int
)(
i_delay
/
1000
)
);
}
else
if
(
i_action
==
ACTIONID_SUBDELAY_UP
)
{
int64_t
i_delay
=
var_GetTime
(
p_input
,
"spu-delay"
);
i_delay
+=
50000
;
/* 50 ms */
var_SetTime
(
p_input
,
"spu-delay"
,
i_delay
);
ClearChannels
(
p_intf
,
p_vout
);
vout_OSDMessage
(
p_intf
,
DEFAULT_CHAN
,
"Subtitle delay %i ms"
,
(
int
)(
i_delay
/
1000
)
);
}
else
if
(
i_action
==
ACTIONID_AUDIODELAY_DOWN
)
{
int64_t
i_delay
=
var_GetTime
(
p_input
,
"audio-delay"
);
i_delay
-=
50000
;
/* 50 ms */
var_SetTime
(
p_input
,
"audio-delay"
,
i_delay
);
ClearChannels
(
p_intf
,
p_vout
);
vout_OSDMessage
(
p_intf
,
DEFAULT_CHAN
,
"Audio delay %i ms"
,
(
int
)(
i_delay
/
1000
)
);
}
else
if
(
i_action
==
ACTIONID_AUDIODELAY_UP
)
{
int64_t
i_delay
=
var_GetTime
(
p_input
,
"audio-delay"
);
i_delay
+=
50000
;
/* 50 ms */
var_SetTime
(
p_input
,
"audio-delay"
,
i_delay
);
ClearChannels
(
p_intf
,
p_vout
);
vout_OSDMessage
(
p_intf
,
DEFAULT_CHAN
,
"Audio delay %i ms"
,
(
int
)(
i_delay
/
1000
)
);
}
else
if
(
i_action
==
ACTIONID_PLAY
)
{
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
)
{
var_Get
(
p_input
,
"rate"
,
&
val
);
msg_Dbg
(
p_input
,
"rate %d"
,
val
.
i_int
);
if
(
val
.
i_int
!=
INPUT_RATE_DEFAULT
)
{
/* Return to normal speed */
val
.
i_int
=
INPUT_RATE_DEFAULT
;
var_Set
(
p_input
,
"rate"
,
val
);
}
else
{
ClearChannels
(
p_intf
,
p_vout
);
vout_OSDIcon
(
VLC_OBJECT
(
p_intf
),
DEFAULT_CHAN
,
OSD_PAUSE_ICON
);
playlist_Play
(
p_playlist
);
}
vlc_object_release
(
p_playlist
);
}
}
}
}
}
...
...
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