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
3ab859db
Commit
3ab859db
authored
Oct 12, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout: remove is_forced parameter in display size change control
parent
fa2a49e0
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
24 additions
and
92 deletions
+24
-92
modules/video_output/gl.c
modules/video_output/gl.c
+0
-8
modules/video_output/kva.c
modules/video_output/kva.c
+3
-15
modules/video_output/macosx.m
modules/video_output/macosx.m
+0
-9
modules/video_output/msw/common.c
modules/video_output/msw/common.c
+19
-23
modules/video_output/wayland/shm.c
modules/video_output/wayland/shm.c
+0
-7
modules/video_output/xcb/glx.c
modules/video_output/xcb/glx.c
+0
-8
modules/video_output/xcb/x11.c
modules/video_output/xcb/x11.c
+1
-14
modules/video_output/xcb/xvideo.c
modules/video_output/xcb/xvideo.c
+0
-7
src/video_output/display.c
src/video_output/display.c
+1
-1
No files found.
modules/video_output/gl.c
View file @
3ab859db
...
@@ -264,14 +264,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
...
@@ -264,14 +264,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
{
{
const
vout_display_cfg_t
*
c
=
va_arg
(
ap
,
const
vout_display_cfg_t
*
);
const
vout_display_cfg_t
*
c
=
va_arg
(
ap
,
const
vout_display_cfg_t
*
);
const
video_format_t
*
src
=
&
vd
->
source
;
const
video_format_t
*
src
=
&
vd
->
source
;
if
(
query
==
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
&&
va_arg
(
ap
,
int
))
{
vout_window_SetSize
(
sys
->
gl
->
surface
,
c
->
display
.
width
,
c
->
display
.
height
);
return
VLC_EGENERIC
;
}
vout_display_place_t
place
;
vout_display_place_t
place
;
vout_display_PlacePicture
(
&
place
,
src
,
c
,
false
);
vout_display_PlacePicture
(
&
place
,
src
,
c
,
false
);
...
...
modules/video_output/kva.c
View file @
3ab859db
...
@@ -480,22 +480,10 @@ static int Control( vout_display_t *vd, int query, va_list args )
...
@@ -480,22 +480,10 @@ static int Control( vout_display_t *vd, int query, va_list args )
case
VOUT_DISPLAY_CHANGE_ZOOM
:
case
VOUT_DISPLAY_CHANGE_ZOOM
:
{
{
const
vout_display_cfg_t
*
cfg
=
va_arg
(
args
,
const
vout_display_cfg_t
*
);
const
vout_display_cfg_t
*
cfg
=
va_arg
(
args
,
const
vout_display_cfg_t
*
);
bool
is_forced
=
query
==
VOUT_DISPLAY_CHANGE_ZOOM
||
va_arg
(
args
,
int
);
if
(
is_forced
)
{
if
(
sys
->
parent_window
)
{
vout_window_SetSize
(
sys
->
parent_window
,
cfg
->
display
.
width
,
cfg
->
display
.
height
);
}
else
WinPostMsg
(
sys
->
client
,
WM_VLC_SIZE_CHANGE
,
WinPostMsg
(
sys
->
client
,
WM_VLC_SIZE_CHANGE
,
MPFROMLONG
(
cfg
->
display
.
width
),
MPFROMLONG
(
cfg
->
display
.
width
),
MPFROMLONG
(
cfg
->
display
.
height
));
MPFROMLONG
(
cfg
->
display
.
height
));
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
...
modules/video_output/macosx.m
View file @
3ab859db
...
@@ -353,7 +353,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
...
@@ -353,7 +353,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
const
vout_display_cfg_t
*
cfg
;
const
vout_display_cfg_t
*
cfg
;
const
video_format_t
*
source
;
const
video_format_t
*
source
;
bool
is_forced
=
false
;
if
(
query
==
VOUT_DISPLAY_CHANGE_SOURCE_ASPECT
||
query
==
VOUT_DISPLAY_CHANGE_SOURCE_CROP
)
{
if
(
query
==
VOUT_DISPLAY_CHANGE_SOURCE_ASPECT
||
query
==
VOUT_DISPLAY_CHANGE_SOURCE_CROP
)
{
source
=
(
const
video_format_t
*
)
va_arg
(
ap
,
const
video_format_t
*
);
source
=
(
const
video_format_t
*
)
va_arg
(
ap
,
const
video_format_t
*
);
...
@@ -361,14 +360,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
...
@@ -361,14 +360,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
}
else
{
}
else
{
source
=
&
vd
->
source
;
source
=
&
vd
->
source
;
cfg
=
(
const
vout_display_cfg_t
*
)
va_arg
(
ap
,
const
vout_display_cfg_t
*
);
cfg
=
(
const
vout_display_cfg_t
*
)
va_arg
(
ap
,
const
vout_display_cfg_t
*
);
if
(
query
==
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
)
is_forced
=
(
bool
)
va_arg
(
ap
,
int
);
}
if
(
query
==
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
&&
is_forced
&&
vout_window_SetSize
(
sys
->
embed
,
cfg
->
display
.
width
,
cfg
->
display
.
height
))
{
[
o_pool
release
];
return
VLC_EGENERIC
;
}
}
/* we always use our current frame here, because we have some size constraints
/* we always use our current frame here, because we have some size constraints
...
...
modules/video_output/msw/common.c
View file @
3ab859db
...
@@ -553,14 +553,30 @@ int CommonControl(vout_display_t *vd, int query, va_list args)
...
@@ -553,14 +553,30 @@ int CommonControl(vout_display_t *vd, int query, va_list args)
vout_display_sys_t
*
sys
=
vd
->
sys
;
vout_display_sys_t
*
sys
=
vd
->
sys
;
switch
(
query
)
{
switch
(
query
)
{
case
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
:
/* const vout_display_cfg_t *p_cfg, int is_forced */
case
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
:
/* const vout_display_cfg_t *p_cfg */
{
/* Update dimensions */
const
vout_display_cfg_t
*
cfg
=
va_arg
(
args
,
const
vout_display_cfg_t
*
);
RECT
rect_window
=
{
.
top
=
0
,
.
left
=
0
,
.
right
=
cfg
->
display
.
width
,
.
bottom
=
cfg
->
display
.
height
,
};
AdjustWindowRect
(
&
rect_window
,
EventThreadGetWindowStyle
(
sys
->
event
),
0
);
SetWindowPos
(
sys
->
hwnd
,
0
,
0
,
0
,
rect_window
.
right
-
rect_window
.
left
,
rect_window
.
bottom
-
rect_window
.
top
,
SWP_NOMOVE
);
UpdateRects
(
vd
,
cfg
,
&
vd
->
source
,
false
);
return
VLC_SUCCESS
;
}
case
VOUT_DISPLAY_CHANGE_DISPLAY_FILLED
:
/* const vout_display_cfg_t *p_cfg */
case
VOUT_DISPLAY_CHANGE_DISPLAY_FILLED
:
/* const vout_display_cfg_t *p_cfg */
case
VOUT_DISPLAY_CHANGE_ZOOM
:
/* const vout_display_cfg_t *p_cfg */
case
VOUT_DISPLAY_CHANGE_ZOOM
:
/* const vout_display_cfg_t *p_cfg */
case
VOUT_DISPLAY_CHANGE_SOURCE_ASPECT
:
/* const video_format_t *p_source */
case
VOUT_DISPLAY_CHANGE_SOURCE_ASPECT
:
/* const video_format_t *p_source */
case
VOUT_DISPLAY_CHANGE_SOURCE_CROP
:
{
/* const video_format_t *p_source */
case
VOUT_DISPLAY_CHANGE_SOURCE_CROP
:
{
/* const video_format_t *p_source */
const
vout_display_cfg_t
*
cfg
;
const
vout_display_cfg_t
*
cfg
;
const
video_format_t
*
source
;
const
video_format_t
*
source
;
bool
is_forced
=
true
;
if
(
query
==
VOUT_DISPLAY_CHANGE_SOURCE_CROP
||
if
(
query
==
VOUT_DISPLAY_CHANGE_SOURCE_CROP
||
query
==
VOUT_DISPLAY_CHANGE_SOURCE_ASPECT
)
{
query
==
VOUT_DISPLAY_CHANGE_SOURCE_ASPECT
)
{
cfg
=
vd
->
cfg
;
cfg
=
vd
->
cfg
;
...
@@ -568,28 +584,8 @@ int CommonControl(vout_display_t *vd, int query, va_list args)
...
@@ -568,28 +584,8 @@ int CommonControl(vout_display_t *vd, int query, va_list args)
}
else
{
}
else
{
cfg
=
va_arg
(
args
,
const
vout_display_cfg_t
*
);
cfg
=
va_arg
(
args
,
const
vout_display_cfg_t
*
);
source
=
&
vd
->
source
;
source
=
&
vd
->
source
;
if
(
query
==
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
)
is_forced
=
va_arg
(
args
,
int
);
}
if
(
query
==
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
&&
is_forced
)
{
/* Update dimensions */
if
(
sys
->
parent_window
)
{
vout_window_SetSize
(
sys
->
parent_window
,
cfg
->
display
.
width
,
cfg
->
display
.
height
);
}
else
{
RECT
rect_window
;
rect_window
.
top
=
0
;
rect_window
.
left
=
0
;
rect_window
.
right
=
cfg
->
display
.
width
;
rect_window
.
bottom
=
cfg
->
display
.
height
;
AdjustWindowRect
(
&
rect_window
,
EventThreadGetWindowStyle
(
sys
->
event
),
0
);
SetWindowPos
(
sys
->
hwnd
,
0
,
0
,
0
,
rect_window
.
right
-
rect_window
.
left
,
rect_window
.
bottom
-
rect_window
.
top
,
SWP_NOMOVE
);
}
return
VLC_EGENERIC
;
}
}
UpdateRects
(
vd
,
cfg
,
source
,
is_forced
);
UpdateRects
(
vd
,
cfg
,
source
,
false
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
case
VOUT_DISPLAY_CHANGE_WINDOW_STATE
:
{
/* unsigned state */
case
VOUT_DISPLAY_CHANGE_WINDOW_STATE
:
{
/* unsigned state */
...
...
modules/video_output/wayland/shm.c
View file @
3ab859db
...
@@ -305,13 +305,6 @@ static int Control(vout_display_t *vd, int query, va_list ap)
...
@@ -305,13 +305,6 @@ static int Control(vout_display_t *vd, int query, va_list ap)
cfg
=
va_arg
(
ap
,
const
vout_display_cfg_t
*
);
cfg
=
va_arg
(
ap
,
const
vout_display_cfg_t
*
);
}
}
if
(
query
==
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
&&
va_arg
(
ap
,
int
))
{
vout_window_SetSize
(
sys
->
embed
,
cfg
->
display
.
width
,
cfg
->
display
.
height
);
return
VLC_EGENERIC
;
}
vout_display_place_t
place
;
vout_display_place_t
place
;
vout_display_PlacePicture
(
&
place
,
&
vd
->
source
,
vd
->
cfg
,
false
);
vout_display_PlacePicture
(
&
place
,
&
vd
->
source
,
vd
->
cfg
,
false
);
...
...
modules/video_output/xcb/glx.c
View file @
3ab859db
...
@@ -248,14 +248,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
...
@@ -248,14 +248,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
cfg
=
(
const
vout_display_cfg_t
*
)
va_arg
(
ap
,
const
vout_display_cfg_t
*
);
cfg
=
(
const
vout_display_cfg_t
*
)
va_arg
(
ap
,
const
vout_display_cfg_t
*
);
}
}
/* */
if
(
query
==
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
&&
va_arg
(
ap
,
int
))
{
vout_window_SetSize
(
sys
->
gl
->
surface
,
cfg
->
display
.
width
,
cfg
->
display
.
height
);
return
VLC_EGENERIC
;
/* Always fail. See x11.c for rationale. */
}
vout_display_place_t
place
;
vout_display_place_t
place
;
vout_display_PlacePicture
(
&
place
,
source
,
cfg
,
false
);
vout_display_PlacePicture
(
&
place
,
source
,
cfg
,
false
);
...
...
modules/video_output/xcb/x11.c
View file @
3ab859db
...
@@ -477,21 +477,8 @@ static int Control (vout_display_t *vd, int query, va_list ap)
...
@@ -477,21 +477,8 @@ static int Control (vout_display_t *vd, int query, va_list ap)
{
{
const
vout_display_cfg_t
*
p_cfg
=
const
vout_display_cfg_t
*
p_cfg
=
(
const
vout_display_cfg_t
*
)
va_arg
(
ap
,
const
vout_display_cfg_t
*
);
(
const
vout_display_cfg_t
*
)
va_arg
(
ap
,
const
vout_display_cfg_t
*
);
const
bool
is_forced
=
(
bool
)
va_arg
(
ap
,
int
);
if
(
is_forced
)
{
/* Changing the dimensions of the parent window takes place
* asynchronously (in the X server). Also it might fail or result
* in different dimensions than requested. Request the size change
* and return a failure since the size is not (yet) changed.
* If the change eventually succeeds, HandleParentStructure()
* will trigger a non-forced display size change later. */
vout_window_SetSize
(
sys
->
embed
,
p_cfg
->
display
.
width
,
p_cfg
->
display
.
height
);
return
VLC_EGENERIC
;
}
vout_display_place_t
place
;
vout_display_place_t
place
;
vout_display_PlacePicture
(
&
place
,
&
vd
->
source
,
p_cfg
,
false
);
vout_display_PlacePicture
(
&
place
,
&
vd
->
source
,
p_cfg
,
false
);
if
(
place
.
width
!=
vd
->
fmt
.
i_visible_width
||
if
(
place
.
width
!=
vd
->
fmt
.
i_visible_width
||
...
...
modules/video_output/xcb/xvideo.c
View file @
3ab859db
...
@@ -773,13 +773,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
...
@@ -773,13 +773,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
cfg
=
(
const
vout_display_cfg_t
*
)
va_arg
(
ap
,
const
vout_display_cfg_t
*
);
cfg
=
(
const
vout_display_cfg_t
*
)
va_arg
(
ap
,
const
vout_display_cfg_t
*
);
}
}
if
(
query
==
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
&&
va_arg
(
ap
,
int
))
{
vout_window_SetSize
(
p_sys
->
embed
,
cfg
->
display
.
width
,
cfg
->
display
.
height
);
return
VLC_EGENERIC
;
/* Always fail. See x11.c for rationale. */
}
vout_display_place_t
place
;
vout_display_place_t
place
;
vout_display_PlacePicture
(
&
place
,
source
,
cfg
,
false
);
vout_display_PlacePicture
(
&
place
,
source
,
cfg
,
false
);
p_sys
->
width
=
place
.
width
;
p_sys
->
width
=
place
.
width
;
...
...
src/video_output/display.c
View file @
3ab859db
...
@@ -926,7 +926,7 @@ bool vout_ManageDisplay(vout_display_t *vd, bool allow_reset_pictures)
...
@@ -926,7 +926,7 @@ bool vout_ManageDisplay(vout_display_t *vd, bool allow_reset_pictures)
osys
->
height_saved
=
osys
->
cfg
.
display
.
height
;
osys
->
height_saved
=
osys
->
cfg
.
display
.
height
;
if
(
vout_display_Control
(
vd
,
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
,
if
(
vout_display_Control
(
vd
,
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
,
&
cfg
,
false
))
{
&
cfg
))
{
msg_Err
(
vd
,
"Failed to resize display"
);
msg_Err
(
vd
,
"Failed to resize display"
);
/* We ignore the resized */
/* We ignore the resized */
...
...
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