Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
d70d1cda
Commit
d70d1cda
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/vmr9: Resize the window in vmr_connect().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0f6d8846
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
40 deletions
+39
-40
vmr7.c
dlls/quartz/tests/vmr7.c
+15
-15
vmr9.c
dlls/quartz/tests/vmr9.c
+15
-15
vmr9.c
dlls/quartz/vmr9.c
+9
-10
No files found.
dlls/quartz/tests/vmr7.c
View file @
d70d1cda
...
...
@@ -1825,21 +1825,21 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
hr
=
IVideoWindow_get_Width
(
window
,
&
width
);
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
);
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
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
left
==
0
,
"Got left %d.
\n
"
,
left
);
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
todo_wine
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
todo_wine
ok
(
height
==
expect_height
,
"Got height %d.
\n
"
,
height
);
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
ok
(
height
==
expect_height
,
"Got height %d.
\n
"
,
height
);
GetWindowRect
(
hwnd
,
&
rect
);
ok
(
rect
.
left
==
0
,
"Got window left %d.
\n
"
,
rect
.
left
);
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
);
todo_wine
ok
(
rect
.
bottom
==
expect_height
,
"Got window bottom %d.
\n
"
,
rect
.
bottom
);
ok
(
rect
.
right
==
expect_width
,
"Got window right %d.
\n
"
,
rect
.
right
);
ok
(
rect
.
bottom
==
expect_height
,
"Got window bottom %d.
\n
"
,
rect
.
bottom
);
hr
=
IVideoWindow_put_Left
(
window
,
10
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -1852,21 +1852,21 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
hr
=
IVideoWindow_get_Width
(
window
,
&
width
);
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
);
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
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
left
==
10
,
"Got left %d.
\n
"
,
left
);
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
todo_wine
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
todo_wine
ok
(
height
==
expect_height
,
"Got height %d.
\n
"
,
height
);
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
ok
(
height
==
expect_height
,
"Got height %d.
\n
"
,
height
);
GetWindowRect
(
hwnd
,
&
rect
);
ok
(
rect
.
left
==
10
,
"Got window left %d.
\n
"
,
rect
.
left
);
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
);
todo_wine
ok
(
rect
.
bottom
==
expect_height
,
"Got window bottom %d.
\n
"
,
rect
.
bottom
);
ok
(
rect
.
right
==
10
+
expect_width
,
"Got window right %d.
\n
"
,
rect
.
right
);
ok
(
rect
.
bottom
==
expect_height
,
"Got window bottom %d.
\n
"
,
rect
.
bottom
);
hr
=
IVideoWindow_put_Height
(
window
,
200
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -1879,7 +1879,7 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
hr
=
IVideoWindow_get_Width
(
window
,
&
width
);
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
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
height
==
200
,
"Got height %d.
\n
"
,
height
);
...
...
@@ -1887,12 +1887,12 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
left
==
10
,
"Got left %d.
\n
"
,
left
);
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
);
GetWindowRect
(
hwnd
,
&
rect
);
ok
(
rect
.
left
==
10
,
"Got window left %d.
\n
"
,
rect
.
left
);
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
);
hr
=
IVideoWindow_SetWindowPosition
(
window
,
100
,
200
,
300
,
400
);
...
...
dlls/quartz/tests/vmr9.c
View file @
d70d1cda
...
...
@@ -2067,21 +2067,21 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
hr
=
IVideoWindow_get_Width
(
window
,
&
width
);
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
);
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
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
left
==
0
,
"Got left %d.
\n
"
,
left
);
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
todo_wine
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
todo_wine
ok
(
height
==
expect_height
,
"Got height %d.
\n
"
,
height
);
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
ok
(
height
==
expect_height
,
"Got height %d.
\n
"
,
height
);
GetWindowRect
(
hwnd
,
&
rect
);
ok
(
rect
.
left
==
0
,
"Got window left %d.
\n
"
,
rect
.
left
);
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
);
todo_wine
ok
(
rect
.
bottom
==
expect_height
,
"Got window bottom %d.
\n
"
,
rect
.
bottom
);
ok
(
rect
.
right
==
expect_width
,
"Got window right %d.
\n
"
,
rect
.
right
);
ok
(
rect
.
bottom
==
expect_height
,
"Got window bottom %d.
\n
"
,
rect
.
bottom
);
hr
=
IVideoWindow_put_Left
(
window
,
10
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -2094,21 +2094,21 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
hr
=
IVideoWindow_get_Width
(
window
,
&
width
);
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
);
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
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
left
==
10
,
"Got left %d.
\n
"
,
left
);
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
todo_wine
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
todo_wine
ok
(
height
==
expect_height
,
"Got height %d.
\n
"
,
height
);
ok
(
width
==
expect_width
,
"Got width %d.
\n
"
,
width
);
ok
(
height
==
expect_height
,
"Got height %d.
\n
"
,
height
);
GetWindowRect
(
hwnd
,
&
rect
);
ok
(
rect
.
left
==
10
,
"Got window left %d.
\n
"
,
rect
.
left
);
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
);
todo_wine
ok
(
rect
.
bottom
==
expect_height
,
"Got window bottom %d.
\n
"
,
rect
.
bottom
);
ok
(
rect
.
right
==
10
+
expect_width
,
"Got window right %d.
\n
"
,
rect
.
right
);
ok
(
rect
.
bottom
==
expect_height
,
"Got window bottom %d.
\n
"
,
rect
.
bottom
);
hr
=
IVideoWindow_put_Height
(
window
,
200
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -2121,7 +2121,7 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our
ok
(
top
==
0
,
"Got top %d.
\n
"
,
top
);
hr
=
IVideoWindow_get_Width
(
window
,
&
width
);
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
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
height
==
200
,
"Got height %d.
\n
"
,
height
);
...
...
@@ -2129,12 +2129,12 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
left
==
10
,
"Got left %d.
\n
"
,
left
);
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
);
GetWindowRect
(
hwnd
,
&
rect
);
ok
(
rect
.
left
==
10
,
"Got window left %d.
\n
"
,
rect
.
left
);
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
);
hr
=
IVideoWindow_SetWindowPosition
(
window
,
100
,
200
,
300
,
400
);
...
...
dlls/quartz/vmr9.c
View file @
d70d1cda
...
...
@@ -381,9 +381,7 @@ static HRESULT initialize_device(struct quartz_vmr *filter, VMR9AllocationInfo *
}
}
SetRect
(
&
filter
->
source_rect
,
0
,
0
,
filter
->
bmiheader
.
biWidth
,
filter
->
bmiheader
.
biHeight
);
filter
->
num_surfaces
=
buffer_count
;
return
hr
;
}
...
...
@@ -483,14 +481,7 @@ static void vmr_start_stream(struct strmbase_renderer *iface)
TRACE
(
"(%p)
\n
"
,
This
);
IVMRImagePresenter9_StartPresenting
(
This
->
presenter
,
This
->
cookie
);
SetWindowPos
(
This
->
baseControlWindow
.
hwnd
,
NULL
,
This
->
source_rect
.
left
,
This
->
source_rect
.
top
,
This
->
source_rect
.
right
-
This
->
source_rect
.
left
,
This
->
source_rect
.
bottom
-
This
->
source_rect
.
top
,
SWP_NOZORDER
|
SWP_NOMOVE
|
SWP_DEFERERASE
);
ShowWindow
(
This
->
baseControlWindow
.
hwnd
,
SW_SHOW
);
GetClientRect
(
This
->
baseControlWindow
.
hwnd
,
&
This
->
target_rect
);
SetEvent
(
This
->
run_event
);
}
...
...
@@ -518,12 +509,20 @@ static HRESULT vmr_connect(struct strmbase_renderer *iface, const AM_MEDIA_TYPE
{
struct
quartz_vmr
*
filter
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
const
BITMAPINFOHEADER
*
bitmap_header
=
get_bitmap_header
(
mt
);
HWND
window
=
filter
->
baseControlWindow
.
hwnd
;
HRESULT
hr
;
RECT
rect
;
filter
->
bmiheader
=
*
bitmap_header
;
filter
->
VideoWidth
=
bitmap_header
->
biWidth
;
filter
->
VideoHeight
=
bitmap_header
->
biHeight
;
SetRect
(
&
filter
->
source_rect
,
0
,
0
,
filter
->
VideoWidth
,
filter
->
VideoHeight
);
SetRect
(
&
rect
,
0
,
0
,
filter
->
VideoWidth
,
filter
->
VideoHeight
);
filter
->
source_rect
=
filter
->
target_rect
=
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
);
if
(
filter
->
mode
||
SUCCEEDED
(
hr
=
IVMRFilterConfig9_SetRenderingMode
(
&
filter
->
IVMRFilterConfig9_iface
,
VMR9Mode_Windowed
)))
...
...
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