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
1a11a808
Commit
1a11a808
authored
Feb 15, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VOUT_SET_STAY_ON_TOP: call vout_Control in a thread-safe fashion
parent
f62e78e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
include/vlc_vout.h
include/vlc_vout.h
+5
-2
src/video_output/video_output.c
src/video_output/video_output.c
+8
-0
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+6
-2
No files found.
include/vlc_vout.h
View file @
1a11a808
...
@@ -506,8 +506,9 @@ struct vout_thread_t
...
@@ -506,8 +506,9 @@ struct vout_thread_t
/**@{*/
/**@{*/
uint16_t
i_changes
;
/**< changes made to the thread.
uint16_t
i_changes
;
/**< changes made to the thread.
\see \ref vout_changes */
\see \ref vout_changes */
bool
b_fullscreen
;
/**< toogle fullscreen display */
unsigned
b_fullscreen
:
1
;
/**< toogle fullscreen display */
bool
b_autoscale
;
/**< auto scaling picture or not */
unsigned
b_autoscale
:
1
;
/**< auto scaling picture or not */
unsigned
b_on_top
:
1
;
/**< stay always on top of other windows */
int
i_zoom
;
/**< scaling factor if no auto */
int
i_zoom
;
/**< scaling factor if no auto */
unsigned
int
i_window_width
;
/**< video window width */
unsigned
int
i_window_width
;
/**< video window width */
unsigned
int
i_window_height
;
/**< video window height */
unsigned
int
i_window_height
;
/**< video window height */
...
@@ -569,6 +570,8 @@ struct vout_thread_t
...
@@ -569,6 +570,8 @@ struct vout_thread_t
#define VOUT_INTF_CHANGE 0x0004
#define VOUT_INTF_CHANGE 0x0004
/** b_autoscale changed */
/** b_autoscale changed */
#define VOUT_SCALE_CHANGE 0x0008
#define VOUT_SCALE_CHANGE 0x0008
/** b_on_top changed */
#define VOUT_ON_TOP_CHANGE 0x0010
/** b_cursor changed */
/** b_cursor changed */
#define VOUT_CURSOR_CHANGE 0x0020
#define VOUT_CURSOR_CHANGE 0x0020
/** b_fullscreen changed */
/** b_fullscreen changed */
...
...
src/video_output/video_output.c
View file @
1a11a808
...
@@ -1265,6 +1265,14 @@ static void* RunThread( void *p_this )
...
@@ -1265,6 +1265,14 @@ static void* RunThread( void *p_this )
break
;
break
;
}
}
while
(
p_vout
->
i_changes
&
VOUT_ON_TOP_CHANGE
)
{
p_vout
->
i_changes
&=
~
VOUT_ON_TOP_CHANGE
;
vlc_mutex_unlock
(
&
p_vout
->
change_lock
);
vout_Control
(
p_vout
,
VOUT_SET_STAY_ON_TOP
,
p_vout
->
b_on_top
);
vlc_mutex_lock
(
&
p_vout
->
change_lock
);
}
if
(
p_vout
->
i_changes
&
VOUT_SIZE_CHANGE
)
if
(
p_vout
->
i_changes
&
VOUT_SIZE_CHANGE
)
{
{
/* this must only happen when the vout plugin is incapable of
/* this must only happen when the vout plugin is incapable of
...
...
src/video_output/vout_intf.c
View file @
1a11a808
...
@@ -1221,13 +1221,17 @@ static int OnTopCallback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -1221,13 +1221,17 @@ static int OnTopCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
vout_Control
(
p_vout
,
VOUT_SET_STAY_ON_TOP
,
newval
.
b_bool
);
(
void
)
psz_cmd
;
(
void
)
oldval
;
(
void
)
p_data
;
vlc_mutex_lock
(
&
p_vout
->
change_lock
);
p_vout
->
i_changes
|=
VOUT_ON_TOP_CHANGE
;
p_vout
->
b_on_top
=
newval
.
b_bool
;
vlc_mutex_unlock
(
&
p_vout
->
change_lock
);
/* Modify libvlc as well because the vout might have to be restarted */
/* Modify libvlc as well because the vout might have to be restarted */
var_Create
(
p_vout
->
p_libvlc
,
"video-on-top"
,
VLC_VAR_BOOL
);
var_Create
(
p_vout
->
p_libvlc
,
"video-on-top"
,
VLC_VAR_BOOL
);
var_Set
(
p_vout
->
p_libvlc
,
"video-on-top"
,
newval
);
var_Set
(
p_vout
->
p_libvlc
,
"video-on-top"
,
newval
);
(
void
)
psz_cmd
;
(
void
)
oldval
;
(
void
)
p_data
;
return
VLC_SUCCESS
;
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