Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
e2262479
Commit
e2262479
authored
Feb 11, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc_video_get_cursor: get the current mouse video coordinates
parent
b5f800b6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
0 deletions
+40
-0
include/vlc/libvlc_media_player.h
include/vlc/libvlc_media_player.h
+26
-0
src/control/video.c
src/control/video.c
+13
-0
src/libvlc.sym
src/libvlc.sym
+1
-0
No files found.
include/vlc/libvlc_media_player.h
View file @
e2262479
...
...
@@ -588,6 +588,32 @@ int libvlc_video_get_height( libvlc_media_player_t *p_mi );
VLC_DEPRECATED_API
int
libvlc_video_get_width
(
libvlc_media_player_t
*
p_mi
);
/**
* Get the mouse pointer coordinates over a video.
* Coordinates are expressed in terms of the decoded video resolution,
* <b>not</b> in terms of pixels on the screen/viewport (to get the latter,
* you can query your windowing system directly).
*
* Either of the coordinates may be negative or larger than the corresponding
* dimension of the video, if the cursor is outside the rendering area.
*
* @warning The coordinates may be out-of-date if the pointer is not located
* on the video rendering area. LibVLC does not track the pointer if it is
* outside of the video widget.
*
* @note LibVLC does not support multiple pointers (it does of course support
* multiple input devices sharing the same pointer) at the moment.
*
* \param p_mi media player
* \param num number of the video (starting from, and most commonly 0)
* \param px pointer to get the abscissa [OUT]
* \param py pointer to get the ordinate [OUT]
* \return 0 on success, -1 if the specified video does not exist
*/
VLC_PUBLIC_API
int
libvlc_video_get_cursor
(
libvlc_media_player_t
*
p_mi
,
unsigned
num
,
int
*
px
,
int
*
py
);
/**
* Get the current video scaling factor.
* See also libvlc_video_set_scale().
...
...
src/control/video.c
View file @
e2262479
...
...
@@ -186,6 +186,19 @@ int libvlc_video_get_width( libvlc_media_player_t *p_mi )
return
width
;
}
int
libvlc_video_get_cursor
(
libvlc_media_player_t
*
mp
,
unsigned
num
,
int
*
px
,
int
*
py
)
{
vout_thread_t
*
p_vout
=
GetVout
(
mp
,
num
);
if
(
p_vout
==
NULL
)
return
-
1
;
*
px
=
var_GetInteger
(
p_vout
,
"mouse-x"
);
*
py
=
var_GetInteger
(
p_vout
,
"mouse-y"
);
vlc_object_release
(
p_vout
);
return
0
;
}
unsigned
libvlc_media_player_has_vout
(
libvlc_media_player_t
*
p_mi
)
{
size_t
n
;
...
...
src/libvlc.sym
View file @
e2262479
...
...
@@ -165,6 +165,7 @@ libvlc_video_get_chapter_description
libvlc_video_get_crop_geometry
libvlc_video_get_size
libvlc_video_get_height
libvlc_video_get_cursor
libvlc_video_get_logo_int
libvlc_video_get_marquee_int
libvlc_video_get_marquee_string
...
...
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