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
005ff29b
Commit
005ff29b
authored
Jan 04, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout: pass enum for window state instead of boolean (refs #10302)
parent
76d6f98e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
19 deletions
+15
-19
src/video_output/control.h
src/video_output/control.h
+1
-1
src/video_output/video_output.c
src/video_output/video_output.c
+6
-9
src/video_output/vout_internal.h
src/video_output/vout_internal.h
+1
-1
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+7
-8
No files found.
src/video_output/control.h
View file @
005ff29b
...
...
@@ -49,7 +49,7 @@ enum {
VOUT_CONTROL_STEP
,
/* time_ptr */
VOUT_CONTROL_FULLSCREEN
,
/* bool */
VOUT_CONTROL_
ON_TOP
,
/* bool
*/
VOUT_CONTROL_
WINDOW_STATE
,
/* unsigned
*/
VOUT_CONTROL_DISPLAY_FILLED
,
/* bool */
VOUT_CONTROL_ZOOM
,
/* pair */
...
...
src/video_output/video_output.c
View file @
005ff29b
...
...
@@ -499,10 +499,9 @@ void vout_ControlChangeFullscreen(vout_thread_t *vout, bool fullscreen)
vout_control_PushBool
(
&
vout
->
p
->
control
,
VOUT_CONTROL_FULLSCREEN
,
fullscreen
);
}
void
vout_ControlChange
OnTop
(
vout_thread_t
*
vout
,
bool
is_on_top
)
void
vout_ControlChange
WindowState
(
vout_thread_t
*
vout
,
unsigned
st
)
{
vout_control_PushBool
(
&
vout
->
p
->
control
,
VOUT_CONTROL_ON_TOP
,
is_on_top
);
vout_control_PushInteger
(
&
vout
->
p
->
control
,
VOUT_CONTROL_WINDOW_STATE
,
st
);
}
void
vout_ControlChangeDisplayFilled
(
vout_thread_t
*
vout
,
bool
is_filled
)
{
...
...
@@ -1254,11 +1253,9 @@ static void ThreadChangeFullscreen(vout_thread_t *vout, bool fullscreen)
vout_SetDisplayFullscreen
(
vout
->
p
->
display
.
vd
,
fullscreen
);
}
static
void
ThreadChange
OnTop
(
vout_thread_t
*
vout
,
bool
is_on_top
)
static
void
ThreadChange
WindowState
(
vout_thread_t
*
vout
,
unsigned
state
)
{
vout_SetWindowState
(
vout
->
p
->
display
.
vd
,
is_on_top
?
VOUT_WINDOW_STATE_ABOVE
:
VOUT_WINDOW_STATE_NORMAL
);
vout_SetWindowState
(
vout
->
p
->
display
.
vd
,
state
);
}
static
void
ThreadChangeDisplayFilled
(
vout_thread_t
*
vout
,
bool
is_filled
)
...
...
@@ -1499,8 +1496,8 @@ static int ThreadControl(vout_thread_t *vout, vout_control_cmd_t cmd)
case
VOUT_CONTROL_FULLSCREEN
:
ThreadChangeFullscreen
(
vout
,
cmd
.
u
.
boolean
);
break
;
case
VOUT_CONTROL_
ON_TOP
:
ThreadChange
OnTop
(
vout
,
cmd
.
u
.
boolean
);
case
VOUT_CONTROL_
WINDOW_STATE
:
ThreadChange
WindowState
(
vout
,
cmd
.
u
.
integer
);
break
;
case
VOUT_CONTROL_DISPLAY_FILLED
:
ThreadChangeDisplayFilled
(
vout
,
cmd
.
u
.
boolean
);
...
...
src/video_output/vout_internal.h
View file @
005ff29b
...
...
@@ -140,7 +140,7 @@ struct vout_thread_sys_t
/* TODO to move them to vlc_vout.h */
void
vout_ControlChangeFullscreen
(
vout_thread_t
*
,
bool
fullscreen
);
void
vout_ControlChange
OnTop
(
vout_thread_t
*
,
bool
is_on_top
);
void
vout_ControlChange
WindowState
(
vout_thread_t
*
,
unsigned
state
);
void
vout_ControlChangeDisplayFilled
(
vout_thread_t
*
,
bool
is_filled
);
void
vout_ControlChangeZoom
(
vout_thread_t
*
,
int
num
,
int
den
);
void
vout_ControlChangeSampleAspectRatio
(
vout_thread_t
*
,
unsigned
num
,
unsigned
den
);
...
...
src/video_output/vout_intf.c
View file @
005ff29b
...
...
@@ -59,7 +59,7 @@ static int ScaleCallback( vlc_object_t *, char const *,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
ZoomCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
OnTop
Callback
(
vlc_object_t
*
,
char
const
*
,
static
int
Above
Callback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
FullscreenCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
...
...
@@ -273,7 +273,7 @@ void vout_IntfInit( vout_thread_t *p_vout )
|
VLC_VAR_ISCOMMAND
);
text
.
psz_string
=
_
(
"Always on top"
);
var_Change
(
p_vout
,
"video-on-top"
,
VLC_VAR_SETTEXT
,
&
text
,
NULL
);
var_AddCallback
(
p_vout
,
"video-on-top"
,
OnTop
Callback
,
NULL
);
var_AddCallback
(
p_vout
,
"video-on-top"
,
Above
Callback
,
NULL
);
/* Add a variable to indicate whether we want window decoration or not */
var_Create
(
p_vout
,
"video-deco"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
...
...
@@ -622,13 +622,12 @@ static int ZoomCallback( vlc_object_t *obj, char const *name,
return
var_SetFloat
(
obj
,
"scale"
,
cur
.
f_float
);
}
static
int
OnTopCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_
data
)
static
int
AboveCallback
(
vlc_object_t
*
obj
,
char
const
*
name
,
vlc_value_t
prev
,
vlc_value_t
cur
,
void
*
data
)
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
(
void
)
psz_cmd
;
(
void
)
oldval
;
(
void
)
p_data
;
vout_ControlChangeOnTop
(
p_vout
,
newval
.
b_bool
);
vout_ControlChangeWindowState
(
(
vout_thread_t
*
)
obj
,
cur
.
b_bool
?
VOUT_WINDOW_STATE_ABOVE
:
VOUT_WINDOW_STATE_NORMAL
);
(
void
)
name
;
(
void
)
prev
;
(
void
)
data
;
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