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
9f1c2185
Commit
9f1c2185
authored
Sep 10, 2010
by
Arnaud Vallat
Committed by
Rémi Denis-Courmont
Sep 11, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend libvlc Media Player API for DVD menu navigation
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
f40bd5fd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
1 deletion
+57
-1
include/vlc/libvlc_media_player.h
include/vlc/libvlc_media_player.h
+21
-1
src/control/media_player.c
src/control/media_player.c
+35
-0
src/libvlc.sym
src/libvlc.sym
+1
-0
No files found.
include/vlc/libvlc_media_player.h
View file @
9f1c2185
...
...
@@ -95,6 +95,18 @@ typedef enum libvlc_video_marquee_option_t {
libvlc_marquee_Y
}
libvlc_video_marquee_option_t
;
/**
* Navigation mode
*/
typedef
enum
libvlc_navigate_mode_t
{
libvlc_navigate_activate
=
0
,
libvlc_navigate_up
,
libvlc_navigate_down
,
libvlc_navigate_left
,
libvlc_navigate_right
,
}
libvlc_navigate_mode_t
;
/**
* Create an empty Media Player object
*
...
...
@@ -549,7 +561,15 @@ VLC_PUBLIC_API int libvlc_media_player_can_pause( libvlc_media_player_t *p_mi );
*/
VLC_PUBLIC_API
void
libvlc_media_player_next_frame
(
libvlc_media_player_t
*
p_mi
);
/**
* Navigate through DVD Menu
*
* \param p_mi the Media Player
* \param navigate the Navigation mode
* \version libVLC 1.2.0 or later
*/
VLC_PUBLIC_API
void
libvlc_media_player_navigate
(
libvlc_media_player_t
*
p_mi
,
unsigned
navigate
);
/**
* Release (free) libvlc_track_description_t
...
...
src/control/media_player.c
View file @
9f1c2185
...
...
@@ -34,6 +34,7 @@
#include <vlc_demux.h>
#include <vlc_input.h>
#include <vlc_vout.h>
#include <vlc_keys.h>
#include "libvlc.h"
...
...
@@ -41,6 +42,22 @@
#include "media_internal.h" // libvlc_media_set_state()
#include "media_player_internal.h"
/*
* mapping of libvlc_navigate_mode_t to vlc_key_t
*/
static
const
vlc_key_t
libvlc_navigate_to_action
[]
=
{
ACTIONID_NAV_ACTIVATE
,
ACTIONID_NAV_UP
,
ACTIONID_NAV_DOWN
,
ACTIONID_NAV_LEFT
,
ACTIONID_NAV_RIGHT
};
static
const
uint32_t
libvlc_navigate_to_action_size
=
\
sizeof
(
libvlc_navigate_to_action
)
/
sizeof
(
libvlc_navigate_to_action
[
0
]
);
static
int
input_seekable_changed
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
...
...
@@ -1200,6 +1217,24 @@ int libvlc_media_player_is_seekable( libvlc_media_player_t *p_mi )
return
b_seekable
;
}
void
libvlc_media_player_navigate
(
libvlc_media_player_t
*
p_mi
,
unsigned
navigate
)
{
input_thread_t
*
p_input_thread
;
if
(
navigate
>
libvlc_navigate_to_action_size
)
return
;
p_input_thread
=
libvlc_get_input_thread
(
p_mi
);
if
(
!
p_input_thread
)
return
;
var_SetInteger
(
p_mi
->
p_libvlc_instance
->
p_libvlc_int
,
"key-action"
,
libvlc_navigate_to_action
[
navigate
]
);
vlc_object_release
(
p_input_thread
);
}
/* internal function, used by audio, video */
libvlc_track_description_t
*
libvlc_get_track_description
(
libvlc_media_player_t
*
p_mi
,
...
...
src/libvlc.sym
View file @
9f1c2185
...
...
@@ -149,6 +149,7 @@ libvlc_media_player_set_title
libvlc_media_player_set_xwindow
libvlc_media_player_stop
libvlc_media_player_will_play
libvlc_media_player_navigate
libvlc_media_release
libvlc_media_retain
libvlc_media_save_meta
...
...
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