Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
ce750377
Commit
ce750377
authored
Oct 24, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added VOUT_DISPLAY_EVENT_ON_TOP (vout display).
parent
657524ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
8 deletions
+29
-8
include/vlc_vout_display.h
include/vlc_vout_display.h
+6
-1
src/video_output/display.c
src/video_output/display.c
+23
-7
No files found.
include/vlc_vout_display.h
View file @
ce750377
...
...
@@ -133,7 +133,7 @@ enum {
VOUT_DISPLAY_CHANGE_FULLSCREEN
,
/* const vout_display_cfg_t *p_cfg */
/* Ask the module to acknowledge/refuse the "always on top" state change
* after being requested externally */
* after being requested externally
or by VOUT_DISPLAY_EVENT_ON_TOP
*/
VOUT_DISPLAY_CHANGE_ON_TOP
,
/* int b_on_top */
/* Ask the module to acknowledge/refuse the display size change requested
...
...
@@ -173,6 +173,7 @@ enum {
VOUT_DISPLAY_EVENT_PICTURES_INVALID
,
/* The buffer are now invalid and need to be changed */
VOUT_DISPLAY_EVENT_FULLSCREEN
,
VOUT_DISPLAY_EVENT_ON_TOP
,
VOUT_DISPLAY_EVENT_DISPLAY_SIZE
,
/* The display size need to change : int i_width, int i_height, bool is_fullscreen */
...
...
@@ -337,6 +338,10 @@ static inline void vout_display_SendEventFullscreen(vout_display_t *vd, bool is_
{
vout_display_SendEvent
(
vd
,
VOUT_DISPLAY_EVENT_FULLSCREEN
,
is_fullscreen
);
}
static
inline
void
vout_display_SendEventOnTop
(
vout_display_t
*
vd
,
bool
is_on_top
)
{
vout_display_SendEvent
(
vd
,
VOUT_DISPLAY_EVENT_ON_TOP
,
is_on_top
);
}
/* The mouse position (State and Moved event) must be expressed against vout_display_t::source unit */
static
inline
void
vout_display_SendEventMouseState
(
vout_display_t
*
vd
,
int
x
,
int
y
,
int
button_mask
)
{
...
...
src/video_output/display.c
View file @
ce750377
...
...
@@ -568,6 +568,20 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args)
break
;
}
case
VOUT_DISPLAY_EVENT_ON_TOP
:
{
const
int
is_on_top
=
(
int
)
va_arg
(
args
,
int
);
msg_Dbg
(
vd
,
"VoutDisplayEvent 'on top' %d"
,
is_on_top
);
vlc_mutex_lock
(
&
osys
->
lock
);
if
(
!
is_on_top
!=
!
osys
->
is_on_top
)
{
osys
->
ch_on_top
=
true
;
osys
->
is_on_top
=
is_on_top
;
}
vlc_mutex_unlock
(
&
osys
->
lock
);
break
;
}
case
VOUT_DISPLAY_EVENT_DISPLAY_SIZE
:
{
const
int
width
=
(
int
)
va_arg
(
args
,
int
);
const
int
height
=
(
int
)
va_arg
(
args
,
int
);
...
...
@@ -657,6 +671,10 @@ void vout_ManageDisplay(vout_display_t *vd)
bool
is_fullscreen
=
osys
->
is_fullscreen
;
osys
->
ch_fullscreen
=
false
;
bool
ch_on_top
=
osys
->
ch_on_top
;
bool
is_on_top
=
osys
->
is_on_top
;
osys
->
ch_on_top
=
false
;
bool
ch_display_size
=
osys
->
ch_display_size
;
int
display_width
=
osys
->
display_width
;
int
display_height
=
osys
->
display_height
;
...
...
@@ -674,7 +692,7 @@ void vout_ManageDisplay(vout_display_t *vd)
!
reset_pictures
&&
!
osys
->
ch_display_filled
&&
!
osys
->
ch_zoom
&&
!
osys
->
ch_on_top
&&
!
ch_on_top
&&
!
osys
->
ch_sar
&&
!
osys
->
ch_crop
)
break
;
...
...
@@ -776,16 +794,12 @@ void vout_ManageDisplay(vout_display_t *vd)
vout_SendEventZoom
(
osys
->
vout
,
osys
->
cfg
.
zoom
.
num
,
osys
->
cfg
.
zoom
.
den
);
}
/* */
if
(
osys
->
ch_on_top
)
{
bool
is_on_top
=
osys
->
is_on_top
;
if
(
ch_on_top
)
{
if
(
vout_display_Control
(
vd
,
VOUT_DISPLAY_CHANGE_ON_TOP
,
is_on_top
))
{
msg_Err
(
vd
,
"Failed to set on top"
);
is_on_top
=
osys
->
is_on_top_initial
;
}
osys
->
is_on_top_initial
=
osys
->
is_on_top
=
is_on_top
;
osys
->
ch_on_top
=
false
;
osys
->
is_on_top_initial
=
is_on_top
;
/* */
vout_SendEventOnTop
(
osys
->
vout
,
osys
->
is_on_top_initial
);
...
...
@@ -957,10 +971,12 @@ void vout_SetDisplayOnTop(vout_display_t *vd, bool is_on_top)
{
vout_display_owner_sys_t
*
osys
=
vd
->
owner
.
sys
;
vlc_mutex_lock
(
&
osys
->
lock
);
if
(
!
osys
->
is_on_top
!=
!
is_on_top
)
{
osys
->
ch_on_top
=
true
;
osys
->
is_on_top
=
is_on_top
;
}
vlc_mutex_unlock
(
&
osys
->
lock
);
}
void
vout_SetDisplayAspect
(
vout_display_t
*
vd
,
unsigned
sar_num
,
unsigned
sar_den
)
{
...
...
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