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
16430c45
Commit
16430c45
authored
Oct 19, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxva2: Add GetCreationParameters().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6194f506
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
10 deletions
+27
-10
main.c
dlls/dxva2/main.c
+25
-6
dxva2.c
dlls/dxva2/tests/dxva2.c
+2
-4
No files found.
dlls/dxva2/main.c
View file @
16430c45
...
...
@@ -71,6 +71,10 @@ struct video_processor
LONG
refcount
;
IDirectXVideoProcessorService
*
service
;
GUID
device
;
DXVA2_VideoDesc
video_desc
;
D3DFORMAT
rt_format
;
unsigned
int
max_substreams
;
};
static
BOOL
dxva_array_reserve
(
void
**
elements
,
size_t
*
capacity
,
size_t
count
,
size_t
size
)
...
...
@@ -170,14 +174,25 @@ static HRESULT WINAPI video_processor_GetVideoProcessorService(IDirectXVideoProc
}
static
HRESULT
WINAPI
video_processor_GetCreationParameters
(
IDirectXVideoProcessor
*
iface
,
GUID
*
device
,
DXVA2_VideoDesc
*
video_desc
,
D3DFORMAT
*
rt_format
,
UINT
*
maxstreams
)
GUID
*
device
,
DXVA2_VideoDesc
*
video_desc
,
D3DFORMAT
*
rt_format
,
UINT
*
max
_sub
streams
)
{
FIXME
(
"%p, %p, %p, %p, %p.
\n
"
,
iface
,
device
,
video_desc
,
rt_format
,
maxstreams
);
struct
video_processor
*
processor
=
impl_from_IDirectXVideoProcessor
(
iface
);
TRACE
(
"%p, %p, %p, %p, %p.
\n
"
,
iface
,
device
,
video_desc
,
rt_format
,
max_substreams
);
if
(
!
device
&&
!
video_desc
&&
!
rt_format
&&
!
maxstreams
)
if
(
!
device
&&
!
video_desc
&&
!
rt_format
&&
!
max
_sub
streams
)
return
E_INVALIDARG
;
return
E_NOTIMPL
;
if
(
device
)
*
device
=
processor
->
device
;
if
(
video_desc
)
*
video_desc
=
processor
->
video_desc
;
if
(
rt_format
)
*
rt_format
=
processor
->
rt_format
;
if
(
max_substreams
)
*
max_substreams
=
processor
->
max_substreams
;
return
S_OK
;
}
static
HRESULT
WINAPI
video_processor_GetVideoProcessorCaps
(
IDirectXVideoProcessor
*
iface
,
...
...
@@ -376,12 +391,12 @@ static HRESULT WINAPI device_manager_processor_service_GetFilterPropertyRange(
}
static
HRESULT
WINAPI
device_manager_processor_service_CreateVideoProcessor
(
IDirectXVideoProcessorService
*
iface
,
REFGUID
device
guid
,
const
DXVA2_VideoDesc
*
video_desc
,
D3DFORMAT
rt_format
,
UINT
max_substreams
,
REFGUID
device
,
const
DXVA2_VideoDesc
*
video_desc
,
D3DFORMAT
rt_format
,
UINT
max_substreams
,
IDirectXVideoProcessor
**
processor
)
{
struct
video_processor
*
object
;
FIXME
(
"%p, %s, %p, %d, %u, %p.
\n
"
,
iface
,
debugstr_guid
(
device
guid
),
video_desc
,
rt_format
,
max_substreams
,
FIXME
(
"%p, %s, %p, %d, %u, %p.
\n
"
,
iface
,
debugstr_guid
(
device
),
video_desc
,
rt_format
,
max_substreams
,
processor
);
/* FIXME: validate render target format */
...
...
@@ -393,6 +408,10 @@ static HRESULT WINAPI device_manager_processor_service_CreateVideoProcessor(IDir
object
->
refcount
=
1
;
object
->
service
=
iface
;
IDirectXVideoProcessorService_AddRef
(
object
->
service
);
object
->
device
=
*
device
;
object
->
video_desc
=
*
video_desc
;
object
->
rt_format
=
rt_format
;
object
->
max_substreams
=
max_substreams
;
*
processor
=
&
object
->
IDirectXVideoProcessor_iface
;
...
...
dlls/dxva2/tests/dxva2.c
View file @
16430c45
...
...
@@ -420,15 +420,13 @@ static void test_video_processor(void)
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirectXVideoProcessor_GetCreationParameters
(
processor
,
&
guid
,
NULL
,
NULL
,
NULL
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
guid
,
&
DXVA2_VideoProcSoftwareDevice
),
"Unexpected device guid.
\n
"
);
}
hr
=
IDirectXVideoProcessor_GetCreationParameters
(
processor
,
NULL
,
NULL
,
&
format
,
NULL
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
format
==
D3DFMT_A8R8G8B8
,
"Unexpected format %u.
\n
"
,
format
);
}
IDirectXVideoProcessor_Release
(
processor
);
IDirectXVideoProcessor_Release
(
processor2
);
...
...
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