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
24f2d5eb
Commit
24f2d5eb
authored
Sep 21, 2006
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* fix rc backport
parent
365a7bce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
86 additions
and
1 deletion
+86
-1
modules/control/rc.c
modules/control/rc.c
+86
-1
No files found.
modules/control/rc.c
View file @
24f2d5eb
...
...
@@ -497,6 +497,13 @@ static void RegisterCallbacks( intf_thread_t *p_intf )
var_Create
(
p_intf
,
"normal"
,
VLC_VAR_VOID
|
VLC_VAR_ISCOMMAND
);
var_AddCallback
(
p_intf
,
"normal"
,
Input
,
NULL
);
var_Create
(
p_intf
,
"atrack"
,
VLC_VAR_STRING
|
VLC_VAR_ISCOMMAND
);
var_AddCallback
(
p_intf
,
"atrack"
,
Input
,
NULL
);
var_Create
(
p_intf
,
"vtrack"
,
VLC_VAR_STRING
|
VLC_VAR_ISCOMMAND
);
var_AddCallback
(
p_intf
,
"vtrack"
,
Input
,
NULL
);
var_Create
(
p_intf
,
"strack"
,
VLC_VAR_STRING
|
VLC_VAR_ISCOMMAND
);
var_AddCallback
(
p_intf
,
"strack"
,
Input
,
NULL
);
/* audio commands */
var_Create
(
p_intf
,
"volume"
,
VLC_VAR_STRING
|
VLC_VAR_ISCOMMAND
);
var_AddCallback
(
p_intf
,
"volume"
,
Volume
,
NULL
);
...
...
@@ -919,6 +926,9 @@ static void Help( intf_thread_t *p_intf, vlc_bool_t b_longhelp)
msg_rc
(
_
(
"| voldown [X] . . . . lower audio volume X steps"
));
msg_rc
(
_
(
"| adev [X] . . . . . . . . . set/get audio device"
));
msg_rc
(
_
(
"| achan [X]. . . . . . . . set/get audio channels"
));
msg_rc
(
_
(
"| atrack [X] . . . . . . . . . set/get audio track"
));
msg_rc
(
_
(
"| vtrack [X] . . . . . . . . . set/get video track"
));
msg_rc
(
_
(
"| strack [X] . . . . . . . set/get subtitles track"
));
msg_rc
(
_
(
"| menu [on|off|up|down|left|right|select] use menu"
));
msg_rc
(
"| "
);
...
...
@@ -1219,6 +1229,81 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
vlc_object_release
(
p_input
);
return
VLC_SUCCESS
;
}
else
if
(
!
strcmp
(
psz_cmd
,
"atrack"
)
||
!
strcmp
(
psz_cmd
,
"vtrack"
)
||
!
strcmp
(
psz_cmd
,
"strack"
)
)
{
char
*
psz_variable
;
vlc_value_t
val_name
;
int
i_error
;
if
(
!
strcmp
(
psz_cmd
,
"atrack"
)
)
{
psz_variable
=
"audio-es"
;
}
else
if
(
!
strcmp
(
psz_cmd
,
"vtrack"
)
)
{
psz_variable
=
"video-es"
;
}
else
{
psz_variable
=
"spu-es"
;
}
/* Get the descriptive name of the variable */
var_Change
(
p_input
,
psz_variable
,
VLC_VAR_GETTEXT
,
&
val_name
,
NULL
);
if
(
!
val_name
.
psz_string
)
val_name
.
psz_string
=
strdup
(
psz_variable
);
if
(
newval
.
psz_string
&&
*
newval
.
psz_string
)
{
/* set */
vlc_value_t
val
;
val
.
i_int
=
atoi
(
newval
.
psz_string
);
i_error
=
var_Set
(
p_input
,
psz_variable
,
val
);
}
else
{
/* get */
vlc_value_t
val
,
text
;
int
i
,
i_value
;
if
(
var_Get
(
p_input
,
psz_variable
,
&
val
)
<
0
)
{
vlc_object_release
(
p_input
);
return
VLC_EGENERIC
;
}
i_value
=
val
.
i_int
;
if
(
var_Change
(
p_input
,
psz_variable
,
VLC_VAR_GETLIST
,
&
val
,
&
text
)
<
0
)
{
vlc_object_release
(
p_input
);
return
VLC_EGENERIC
;
}
msg_rc
(
"+----[ %s ]"
,
val_name
.
psz_string
);
for
(
i
=
0
;
i
<
val
.
p_list
->
i_count
;
i
++
)
{
if
(
i_value
==
val
.
p_list
->
p_values
[
i
].
i_int
)
msg_rc
(
"| %i - %s *"
,
val
.
p_list
->
p_values
[
i
].
i_int
,
text
.
p_list
->
p_values
[
i
].
psz_string
);
else
msg_rc
(
"| %i - %s"
,
val
.
p_list
->
p_values
[
i
].
i_int
,
text
.
p_list
->
p_values
[
i
].
psz_string
);
}
var_Change
(
p_input
,
psz_variable
,
VLC_VAR_FREELIST
,
&
val
,
&
text
);
msg_rc
(
"+----[ end of %s ]"
,
val_name
.
psz_string
);
if
(
val_name
.
psz_string
)
free
(
val_name
.
psz_string
);
i_error
=
VLC_SUCCESS
;
}
vlc_object_release
(
p_input
);
return
i_error
;
}
/* Never reached. */
vlc_object_release
(
p_input
);
...
...
@@ -1316,7 +1401,7 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
if
(
p_item
)
{
msg_rc
(
"trying to enqueue %s to playlist"
,
newval
.
psz_string
);
playlist_
PlaylistAddInput
(
p_playlist
,
p_item
,
playlist_
AddItem
(
p_playlist
,
p_item
,
PLAYLIST_APPEND
,
PLAYLIST_END
);
}
}
...
...
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