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
b64f5e0b
Commit
b64f5e0b
authored
Jul 03, 2013
by
Mark Lee
Committed by
Rémi Denis-Courmont
Jul 06, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc: add API to control display of the video title
parent
3e454fd4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
0 deletions
+46
-0
include/vlc/libvlc_media_player.h
include/vlc/libvlc_media_player.h
+26
-0
lib/libvlc.sym
lib/libvlc.sym
+1
-0
lib/media_player.c
lib/media_player.c
+19
-0
No files found.
include/vlc/libvlc_media_player.h
View file @
b64f5e0b
...
...
@@ -120,6 +120,22 @@ typedef enum libvlc_navigate_mode_t
libvlc_navigate_right
}
libvlc_navigate_mode_t
;
/**
* Enumeration of values used to set position (e.g. of video title).
*/
typedef
enum
libvlc_position_t
{
libvlc_position_disable
=-
1
,
libvlc_position_center
,
libvlc_position_left
,
libvlc_position_right
,
libvlc_position_top
,
libvlc_position_top_left
,
libvlc_position_top_right
,
libvlc_position_bottom
,
libvlc_position_bottom_left
,
libvlc_position_bottom_right
}
libvlc_position_t
;
/**
* Create an empty Media Player object
*
...
...
@@ -823,6 +839,16 @@ LIBVLC_API void libvlc_media_player_next_frame( libvlc_media_player_t *p_mi );
LIBVLC_API
void
libvlc_media_player_navigate
(
libvlc_media_player_t
*
p_mi
,
unsigned
navigate
);
/**
* Set if, and how, the video title will be shown when media is played.
*
* \param p_mi the media player
* \param position position at which to display the title, or libvlc_position_disable to prevent the title from being displayed
* \param timeout title display timeout in milliseconds (ignored if libvlc_position_disable)
* \version libVLC 2.1.0 or later
*/
LIBVLC_API
void
libvlc_media_player_set_video_title_display
(
libvlc_media_player_t
*
p_mi
,
libvlc_position_t
position
,
unsigned
int
timeout
);
/**
* Release (free) libvlc_track_description_t
*
...
...
lib/libvlc.sym
View file @
b64f5e0b
...
...
@@ -164,6 +164,7 @@ libvlc_media_player_set_xwindow
libvlc_media_player_stop
libvlc_media_player_will_play
libvlc_media_player_navigate
libvlc_media_player_set_video_title_display
libvlc_media_release
libvlc_media_retain
libvlc_media_save_meta
...
...
lib/media_player.c
View file @
b64f5e0b
...
...
@@ -457,6 +457,11 @@ libvlc_media_player_new( libvlc_instance_t *instance )
var_Create
(
mp
,
"amem-rate"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
mp
,
"amem-channels"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
/* Video Title */
var_Create
(
mp
,
"video-title-show"
,
VLC_VAR_BOOL
);
var_Create
(
mp
,
"video-title-position"
,
VLC_VAR_INTEGER
);
var_Create
(
mp
,
"video-title-timeout"
,
VLC_VAR_INTEGER
);
mp
->
p_md
=
NULL
;
mp
->
state
=
libvlc_NothingSpecial
;
mp
->
p_libvlc_instance
=
instance
;
...
...
@@ -1385,3 +1390,17 @@ void libvlc_media_player_next_frame( libvlc_media_player_t *p_mi )
vlc_object_release
(
p_input_thread
);
}
}
void
libvlc_media_player_set_video_title_display
(
libvlc_media_player_t
*
p_mi
,
libvlc_position_t
position
,
unsigned
timeout
)
{
if
(
position
!=
libvlc_position_disable
)
{
var_SetBool
(
p_mi
,
"video-title-show"
,
true
);
var_SetInteger
(
p_mi
,
"video-title-position"
,
position
);
var_SetInteger
(
p_mi
,
"video-title-timeout"
,
timeout
);
}
else
{
var_SetBool
(
p_mi
,
"video-title-show"
,
false
);
}
}
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