Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
fb6ad569
Commit
fb6ad569
authored
May 05, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
May 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/videorenderer: Resize the window in video_renderer_connect().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e5729cf8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
70 deletions
+26
-70
filtergraph.c
dlls/quartz/tests/filtergraph.c
+2
-2
videorenderer.c
dlls/quartz/tests/videorenderer.c
+15
-15
videorenderer.c
dlls/quartz/videorenderer.c
+9
-53
No files found.
dlls/quartz/tests/filtergraph.c
View file @
fb6ad569
...
@@ -246,8 +246,8 @@ static void test_basic_video(IFilterGraph2 *graph)
...
@@ -246,8 +246,8 @@ static void test_basic_video(IFilterGraph2 *graph)
ok
(
hr
==
S_OK
,
"Cannot get destination position returned: %x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Cannot get destination position returned: %x
\n
"
,
hr
);
ok
(
left
==
0
,
"expected 0, got %d
\n
"
,
left
);
ok
(
left
==
0
,
"expected 0, got %d
\n
"
,
left
);
ok
(
top
==
0
,
"expected 0, got %d
\n
"
,
top
);
ok
(
top
==
0
,
"expected 0, got %d
\n
"
,
top
);
todo_wine
ok
(
width
==
window_width
,
"expected %d, got %d
\n
"
,
window_width
,
width
);
ok
(
width
==
window_width
,
"expected %d, got %d
\n
"
,
window_width
,
width
);
todo_wine
ok
(
height
==
video_height
,
"expected %d, got %d
\n
"
,
video_height
,
height
);
ok
(
height
==
video_height
,
"expected %d, got %d
\n
"
,
video_height
,
height
);
hr
=
IBasicVideo_SetDestinationPosition
(
pbv
,
0
,
0
,
0
,
0
);
hr
=
IBasicVideo_SetDestinationPosition
(
pbv
,
0
,
0
,
0
,
0
);
ok
(
hr
==
E_INVALIDARG
,
"IBasicVideo_SetDestinationPosition returned: %x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"IBasicVideo_SetDestinationPosition returned: %x
\n
"
,
hr
);
...
...
dlls/quartz/tests/videorenderer.c
View file @
fb6ad569
...
@@ -1855,21 +1855,21 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our
...
@@ -1855,21 +1855,21 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
hr
=
IVideoWindow_get_Width
(
window
,
&
width
);
hr
=
IVideoWindow_get_Width
(
window
,
&
width
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
hr
=
IVideoWindow_get_Height
(
window
,
&
height
);
hr
=
IVideoWindow_get_Height
(
window
,
&
height
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
height
==
expect_height
,
"Got height %d.
\n
"
,
height
);
ok
(
height
==
expect_height
,
"Got height %d.
\n
"
,
height
);
hr
=
IVideoWindow_GetWindowPosition
(
window
,
&
left
,
&
top
,
&
width
,
&
height
);
hr
=
IVideoWindow_GetWindowPosition
(
window
,
&
left
,
&
top
,
&
width
,
&
height
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
left
==
0
,
"Got left %d.
\n
"
,
left
);
ok
(
left
==
0
,
"Got left %d.
\n
"
,
left
);
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
todo_wine
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
todo_wine
ok
(
height
==
expect_height
,
"Got height %d.
\n
"
,
height
);
ok
(
height
==
expect_height
,
"Got height %d.
\n
"
,
height
);
GetWindowRect
(
hwnd
,
&
rect
);
GetWindowRect
(
hwnd
,
&
rect
);
ok
(
rect
.
left
==
0
,
"Got window left %d.
\n
"
,
rect
.
left
);
ok
(
rect
.
left
==
0
,
"Got window left %d.
\n
"
,
rect
.
left
);
ok
(
rect
.
top
==
0
,
"Got window top %d.
\n
"
,
rect
.
top
);
ok
(
rect
.
top
==
0
,
"Got window top %d.
\n
"
,
rect
.
top
);
todo_wine
ok
(
rect
.
right
==
expect_width
,
"Got window right %d.
\n
"
,
rect
.
right
);
ok
(
rect
.
right
==
expect_width
,
"Got window right %d.
\n
"
,
rect
.
right
);
todo_wine
ok
(
rect
.
bottom
==
expect_height
,
"Got window bottom %d.
\n
"
,
rect
.
bottom
);
ok
(
rect
.
bottom
==
expect_height
,
"Got window bottom %d.
\n
"
,
rect
.
bottom
);
hr
=
IVideoWindow_put_Left
(
window
,
10
);
hr
=
IVideoWindow_put_Left
(
window
,
10
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
@@ -1882,21 +1882,21 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our
...
@@ -1882,21 +1882,21 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
hr
=
IVideoWindow_get_Width
(
window
,
&
width
);
hr
=
IVideoWindow_get_Width
(
window
,
&
width
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
hr
=
IVideoWindow_get_Height
(
window
,
&
height
);
hr
=
IVideoWindow_get_Height
(
window
,
&
height
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
height
==
expect_height
,
"Got height %d.
\n
"
,
height
);
ok
(
height
==
expect_height
,
"Got height %d.
\n
"
,
height
);
hr
=
IVideoWindow_GetWindowPosition
(
window
,
&
left
,
&
top
,
&
width
,
&
height
);
hr
=
IVideoWindow_GetWindowPosition
(
window
,
&
left
,
&
top
,
&
width
,
&
height
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
left
==
10
,
"Got left %d.
\n
"
,
left
);
ok
(
left
==
10
,
"Got left %d.
\n
"
,
left
);
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
todo_wine
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
todo_wine
ok
(
height
==
expect_height
,
"Got height %d.
\n
"
,
height
);
ok
(
height
==
expect_height
,
"Got height %d.
\n
"
,
height
);
GetWindowRect
(
hwnd
,
&
rect
);
GetWindowRect
(
hwnd
,
&
rect
);
ok
(
rect
.
left
==
10
,
"Got window left %d.
\n
"
,
rect
.
left
);
ok
(
rect
.
left
==
10
,
"Got window left %d.
\n
"
,
rect
.
left
);
ok
(
rect
.
top
==
0
,
"Got window top %d.
\n
"
,
rect
.
top
);
ok
(
rect
.
top
==
0
,
"Got window top %d.
\n
"
,
rect
.
top
);
todo_wine
ok
(
rect
.
right
==
10
+
expect_width
,
"Got window right %d.
\n
"
,
rect
.
right
);
ok
(
rect
.
right
==
10
+
expect_width
,
"Got window right %d.
\n
"
,
rect
.
right
);
todo_wine
ok
(
rect
.
bottom
==
expect_height
,
"Got window bottom %d.
\n
"
,
rect
.
bottom
);
ok
(
rect
.
bottom
==
expect_height
,
"Got window bottom %d.
\n
"
,
rect
.
bottom
);
hr
=
IVideoWindow_put_Height
(
window
,
200
);
hr
=
IVideoWindow_put_Height
(
window
,
200
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
@@ -1909,7 +1909,7 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our
...
@@ -1909,7 +1909,7 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
hr
=
IVideoWindow_get_Width
(
window
,
&
width
);
hr
=
IVideoWindow_get_Width
(
window
,
&
width
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
hr
=
IVideoWindow_get_Height
(
window
,
&
height
);
hr
=
IVideoWindow_get_Height
(
window
,
&
height
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
height
==
200
,
"Got height %d.
\n
"
,
height
);
ok
(
height
==
200
,
"Got height %d.
\n
"
,
height
);
...
@@ -1917,12 +1917,12 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our
...
@@ -1917,12 +1917,12 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
left
==
10
,
"Got left %d.
\n
"
,
left
);
ok
(
left
==
10
,
"Got left %d.
\n
"
,
left
);
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
todo_wine
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
ok
(
height
==
200
,
"Got height %d.
\n
"
,
height
);
ok
(
height
==
200
,
"Got height %d.
\n
"
,
height
);
GetWindowRect
(
hwnd
,
&
rect
);
GetWindowRect
(
hwnd
,
&
rect
);
ok
(
rect
.
left
==
10
,
"Got window left %d.
\n
"
,
rect
.
left
);
ok
(
rect
.
left
==
10
,
"Got window left %d.
\n
"
,
rect
.
left
);
ok
(
rect
.
top
==
0
,
"Got window top %d.
\n
"
,
rect
.
top
);
ok
(
rect
.
top
==
0
,
"Got window top %d.
\n
"
,
rect
.
top
);
todo_wine
ok
(
rect
.
right
==
10
+
expect_width
,
"Got window right %d.
\n
"
,
rect
.
right
);
ok
(
rect
.
right
==
10
+
expect_width
,
"Got window right %d.
\n
"
,
rect
.
right
);
ok
(
rect
.
bottom
==
200
,
"Got window bottom %d.
\n
"
,
rect
.
bottom
);
ok
(
rect
.
bottom
==
200
,
"Got window bottom %d.
\n
"
,
rect
.
bottom
);
hr
=
IVideoWindow_SetWindowPosition
(
window
,
100
,
200
,
300
,
400
);
hr
=
IVideoWindow_SetWindowPosition
(
window
,
100
,
200
,
300
,
400
);
...
...
dlls/quartz/videorenderer.c
View file @
fb6ad569
...
@@ -44,11 +44,8 @@ struct video_renderer
...
@@ -44,11 +44,8 @@ struct video_renderer
IOverlay
IOverlay_iface
;
IOverlay
IOverlay_iface
;
BOOL
init
;
RECT
SourceRect
;
RECT
SourceRect
;
RECT
DestRect
;
RECT
DestRect
;
RECT
WindowPos
;
LONG
VideoWidth
;
LONG
VideoWidth
;
LONG
VideoHeight
;
LONG
VideoHeight
;
LONG
FullScreenMode
;
LONG
FullScreenMode
;
...
@@ -89,53 +86,6 @@ static const BITMAPINFOHEADER *get_bitmap_header(const AM_MEDIA_TYPE *mt)
...
@@ -89,53 +86,6 @@ static const BITMAPINFOHEADER *get_bitmap_header(const AM_MEDIA_TYPE *mt)
static
void
VideoRenderer_AutoShowWindow
(
struct
video_renderer
*
This
)
static
void
VideoRenderer_AutoShowWindow
(
struct
video_renderer
*
This
)
{
{
if
(
!
This
->
init
&&
(
!
This
->
WindowPos
.
right
||
!
This
->
WindowPos
.
top
))
{
DWORD
style
=
GetWindowLongW
(
This
->
baseControlWindow
.
hwnd
,
GWL_STYLE
);
DWORD
style_ex
=
GetWindowLongW
(
This
->
baseControlWindow
.
hwnd
,
GWL_EXSTYLE
);
if
(
!
This
->
WindowPos
.
right
)
{
if
(
This
->
DestRect
.
right
)
{
This
->
WindowPos
.
left
=
This
->
DestRect
.
left
;
This
->
WindowPos
.
right
=
This
->
DestRect
.
right
;
}
else
{
This
->
WindowPos
.
left
=
This
->
SourceRect
.
left
;
This
->
WindowPos
.
right
=
This
->
SourceRect
.
right
;
}
}
if
(
!
This
->
WindowPos
.
bottom
)
{
if
(
This
->
DestRect
.
bottom
)
{
This
->
WindowPos
.
top
=
This
->
DestRect
.
top
;
This
->
WindowPos
.
bottom
=
This
->
DestRect
.
bottom
;
}
else
{
This
->
WindowPos
.
top
=
This
->
SourceRect
.
top
;
This
->
WindowPos
.
bottom
=
This
->
SourceRect
.
bottom
;
}
}
AdjustWindowRectEx
(
&
This
->
WindowPos
,
style
,
FALSE
,
style_ex
);
TRACE
(
"WindowPos: %s
\n
"
,
wine_dbgstr_rect
(
&
This
->
WindowPos
));
SetWindowPos
(
This
->
baseControlWindow
.
hwnd
,
NULL
,
This
->
WindowPos
.
left
,
This
->
WindowPos
.
top
,
This
->
WindowPos
.
right
-
This
->
WindowPos
.
left
,
This
->
WindowPos
.
bottom
-
This
->
WindowPos
.
top
,
SWP_NOZORDER
|
SWP_NOMOVE
|
SWP_DEFERERASE
);
GetClientRect
(
This
->
baseControlWindow
.
hwnd
,
&
This
->
DestRect
);
}
else
if
(
!
This
->
init
)
This
->
DestRect
=
This
->
WindowPos
;
This
->
init
=
TRUE
;
if
(
This
->
baseControlWindow
.
AutoShow
)
if
(
This
->
baseControlWindow
.
AutoShow
)
ShowWindow
(
This
->
baseControlWindow
.
hwnd
,
SW_SHOW
);
ShowWindow
(
This
->
baseControlWindow
.
hwnd
,
SW_SHOW
);
}
}
...
@@ -280,10 +230,18 @@ static HRESULT video_renderer_connect(struct strmbase_renderer *iface, const AM_
...
@@ -280,10 +230,18 @@ static HRESULT video_renderer_connect(struct strmbase_renderer *iface, const AM_
{
{
struct
video_renderer
*
filter
=
impl_from_strmbase_renderer
(
iface
);
struct
video_renderer
*
filter
=
impl_from_strmbase_renderer
(
iface
);
const
BITMAPINFOHEADER
*
bitmap_header
=
get_bitmap_header
(
mt
);
const
BITMAPINFOHEADER
*
bitmap_header
=
get_bitmap_header
(
mt
);
HWND
window
=
filter
->
baseControlWindow
.
hwnd
;
RECT
rect
;
filter
->
VideoWidth
=
bitmap_header
->
biWidth
;
filter
->
VideoWidth
=
bitmap_header
->
biWidth
;
filter
->
VideoHeight
=
abs
(
bitmap_header
->
biHeight
);
filter
->
VideoHeight
=
abs
(
bitmap_header
->
biHeight
);
SetRect
(
&
filter
->
SourceRect
,
0
,
0
,
filter
->
VideoWidth
,
filter
->
VideoHeight
);
SetRect
(
&
rect
,
0
,
0
,
filter
->
VideoWidth
,
filter
->
VideoHeight
);
filter
->
SourceRect
=
filter
->
DestRect
=
rect
;
AdjustWindowRectEx
(
&
rect
,
GetWindowLongW
(
window
,
GWL_STYLE
),
FALSE
,
GetWindowLongW
(
window
,
GWL_EXSTYLE
));
SetWindowPos
(
window
,
NULL
,
0
,
0
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
SWP_NOMOVE
|
SWP_NOZORDER
|
SWP_NOACTIVATE
);
return
S_OK
;
return
S_OK
;
}
}
...
@@ -511,7 +469,6 @@ static HRESULT WINAPI VideoWindow_put_FullScreenMode(IVideoWindow *iface, LONG f
...
@@ -511,7 +469,6 @@ static HRESULT WINAPI VideoWindow_put_FullScreenMode(IVideoWindow *iface, LONG f
SetWindowPos
(
filter
->
baseControlWindow
.
hwnd
,
HWND_TOP
,
0
,
0
,
SetWindowPos
(
filter
->
baseControlWindow
.
hwnd
,
HWND_TOP
,
0
,
0
,
GetSystemMetrics
(
SM_CXSCREEN
),
GetSystemMetrics
(
SM_CYSCREEN
),
SWP_SHOWWINDOW
);
GetSystemMetrics
(
SM_CXSCREEN
),
GetSystemMetrics
(
SM_CYSCREEN
),
SWP_SHOWWINDOW
);
GetWindowRect
(
filter
->
baseControlWindow
.
hwnd
,
&
filter
->
DestRect
);
GetWindowRect
(
filter
->
baseControlWindow
.
hwnd
,
&
filter
->
DestRect
);
filter
->
WindowPos
=
filter
->
DestRect
;
}
}
else
else
{
{
...
@@ -521,7 +478,6 @@ static HRESULT WINAPI VideoWindow_put_FullScreenMode(IVideoWindow *iface, LONG f
...
@@ -521,7 +478,6 @@ static HRESULT WINAPI VideoWindow_put_FullScreenMode(IVideoWindow *iface, LONG f
GetClientRect
(
filter
->
baseControlWindow
.
hwnd
,
&
filter
->
DestRect
);
GetClientRect
(
filter
->
baseControlWindow
.
hwnd
,
&
filter
->
DestRect
);
SetWindowPos
(
filter
->
baseControlWindow
.
hwnd
,
0
,
filter
->
DestRect
.
left
,
filter
->
DestRect
.
top
,
SetWindowPos
(
filter
->
baseControlWindow
.
hwnd
,
0
,
filter
->
DestRect
.
left
,
filter
->
DestRect
.
top
,
filter
->
DestRect
.
right
,
filter
->
DestRect
.
bottom
,
SWP_NOZORDER
|
SWP_SHOWWINDOW
);
filter
->
DestRect
.
right
,
filter
->
DestRect
.
bottom
,
SWP_NOZORDER
|
SWP_SHOWWINDOW
);
filter
->
WindowPos
=
filter
->
DestRect
;
}
}
filter
->
FullScreenMode
=
fullscreen
;
filter
->
FullScreenMode
=
fullscreen
;
...
...
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