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
e3d6e004
Commit
e3d6e004
authored
Nov 20, 2002
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/control/rc/rc.c: added commands to navigate between chapters and titles.
parent
1a53328a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
130 additions
and
1 deletion
+130
-1
modules/control/rc/rc.c
modules/control/rc/rc.c
+130
-1
No files found.
modules/control/rc/rc.c
View file @
e3d6e004
...
...
@@ -2,7 +2,7 @@
* rc.c : remote control stdin/stdout plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: rc.c,v 1.1
0 2002/11/14 22:38:47 massiot
Exp $
* $Id: rc.c,v 1.1
1 2002/11/20 15:34:39 gbazin
Exp $
*
* Authors: Peter Surda <shurdeek@panorama.sth.ac.at>
*
...
...
@@ -153,6 +153,19 @@ static void Run( intf_thread_t *p_intf )
var_Create
(
p_intf
,
"next"
,
VLC_VAR_COMMAND
);
var_Set
(
p_intf
,
"next"
,
(
vlc_value_t
)(
void
*
)
Playlist
);
var_Create
(
p_intf
,
"title"
,
VLC_VAR_COMMAND
);
var_Set
(
p_intf
,
"title"
,
(
vlc_value_t
)(
void
*
)
Playlist
);
var_Create
(
p_intf
,
"title_n"
,
VLC_VAR_COMMAND
);
var_Set
(
p_intf
,
"title_n"
,
(
vlc_value_t
)(
void
*
)
Playlist
);
var_Create
(
p_intf
,
"title_p"
,
VLC_VAR_COMMAND
);
var_Set
(
p_intf
,
"title_p"
,
(
vlc_value_t
)(
void
*
)
Playlist
);
var_Create
(
p_intf
,
"chapter"
,
VLC_VAR_COMMAND
);
var_Set
(
p_intf
,
"chapter"
,
(
vlc_value_t
)(
void
*
)
Playlist
);
var_Create
(
p_intf
,
"chapter_n"
,
VLC_VAR_COMMAND
);
var_Set
(
p_intf
,
"chapter_n"
,
(
vlc_value_t
)(
void
*
)
Playlist
);
var_Create
(
p_intf
,
"chapter_p"
,
VLC_VAR_COMMAND
);
var_Set
(
p_intf
,
"chapter_p"
,
(
vlc_value_t
)(
void
*
)
Playlist
);
var_Create
(
p_intf
,
"volume"
,
VLC_VAR_COMMAND
);
var_Set
(
p_intf
,
"volume"
,
(
vlc_value_t
)(
void
*
)
Volume
);
var_Create
(
p_intf
,
"volup"
,
VLC_VAR_COMMAND
);
...
...
@@ -386,6 +399,12 @@ static void Run( intf_thread_t *p_intf )
printf
(
"| stop . . . . . . . . . . . . . . . . stop stream
\n
"
);
printf
(
"| next . . . . . . . . . . . . next playlist item
\n
"
);
printf
(
"| prev . . . . . . . . . . previous playlist item
\n
"
);
printf
(
"| title [X] . . . . set/get title in current item
\n
"
);
printf
(
"| title_n . . . . . . next title in current item
\n
"
);
printf
(
"| title_p . . . . previous title in current item
\n
"
);
printf
(
"| chapter [X] . . set/get chapter in current item
\n
"
);
printf
(
"| chapter_n . . . . next chapter in current item
\n
"
);
printf
(
"| chapter_p . . previous chapter in current item
\n
"
);
printf
(
"|
\n
"
);
printf
(
"| r X . . . seek in seconds, for instance `r 3.5'
\n
"
);
printf
(
"| pause . . . . . . . . . . . . . . toggle pause
\n
"
);
...
...
@@ -445,6 +464,115 @@ static int Playlist( vlc_object_t *p_this, char *psz_cmd, char *psz_arg )
vlc_object_release
(
p_input
);
return
VLC_SUCCESS
;
}
else
if
(
!
strcmp
(
psz_cmd
,
"chapter"
)
||
!
strcmp
(
psz_cmd
,
"chapter_n"
)
||
!
strcmp
(
psz_cmd
,
"chapter_p"
)
)
{
int
i_chapter
=
0
;
if
(
!
strcmp
(
psz_cmd
,
"chapter"
)
)
{
if
(
*
psz_arg
)
{
/* Set. */
i_chapter
=
atoi
(
psz_arg
);
}
else
{
/* Get. */
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
printf
(
"Currently playing chapter %d
\n
"
,
p_input
->
stream
.
p_selected_area
->
i_part
);
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
vlc_object_release
(
p_input
);
return
VLC_SUCCESS
;
}
}
else
if
(
!
strcmp
(
psz_cmd
,
"chapter_n"
)
)
{
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
i_chapter
=
p_input
->
stream
.
p_selected_area
->
i_part
+
1
;
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
}
else
if
(
!
strcmp
(
psz_cmd
,
"chapter_p"
)
)
{
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
i_chapter
=
p_input
->
stream
.
p_selected_area
->
i_part
-
1
;
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
}
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
if
(
(
i_chapter
>
0
)
&&
(
i_chapter
<=
p_input
->
stream
.
p_selected_area
->
i_part_nb
)
)
{
p_input
->
stream
.
p_selected_area
->
i_part
=
i_chapter
;
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
input_ChangeArea
(
p_input
,
(
input_area_t
*
)
p_input
->
stream
.
p_selected_area
);
input_SetStatus
(
p_input
,
INPUT_STATUS_PLAY
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
}
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
vlc_object_release
(
p_input
);
return
VLC_SUCCESS
;
}
else
if
(
!
strcmp
(
psz_cmd
,
"title"
)
||
!
strcmp
(
psz_cmd
,
"title_n"
)
||
!
strcmp
(
psz_cmd
,
"title_p"
)
)
{
int
i_title
=
0
;
if
(
!
strcmp
(
psz_cmd
,
"title"
)
)
{
if
(
*
psz_arg
)
{
/* Set. */
i_title
=
atoi
(
psz_arg
);
}
else
{
/* Get. */
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
printf
(
"Currently playing title %d
\n
"
,
p_input
->
stream
.
p_selected_area
->
i_id
);
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
vlc_object_release
(
p_input
);
return
VLC_SUCCESS
;
}
}
else
if
(
!
strcmp
(
psz_cmd
,
"title_n"
)
)
{
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
i_title
=
p_input
->
stream
.
p_selected_area
->
i_id
+
1
;
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
}
else
if
(
!
strcmp
(
psz_cmd
,
"title_p"
)
)
{
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
i_title
=
p_input
->
stream
.
p_selected_area
->
i_id
-
1
;
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
}
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
if
(
(
i_title
>
0
)
&&
(
i_title
<=
p_input
->
stream
.
p_selected_area
->
i_part_nb
)
)
{
p_input
->
stream
.
p_selected_area
->
i_part
=
i_title
;
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
input_ChangeArea
(
p_input
,
(
input_area_t
*
)
p_input
->
stream
.
pp_areas
[
i_title
]
);
input_SetStatus
(
p_input
,
INPUT_STATUS_PLAY
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
}
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
vlc_object_release
(
p_input
);
return
VLC_SUCCESS
;
}
p_playlist
=
vlc_object_find
(
p_input
,
VLC_OBJECT_PLAYLIST
,
FIND_PARENT
);
...
...
@@ -473,6 +601,7 @@ static int Playlist( vlc_object_t *p_this, char *psz_cmd, char *psz_arg )
playlist_Stop
(
p_playlist
);
}
vlc_object_release
(
p_playlist
);
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