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
a6512b32
Commit
a6512b32
authored
Oct 22, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/sample: Implement SetDirectXManager().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
529eb284
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
+25
-2
sample.c
dlls/evr/sample.c
+25
-2
No files found.
dlls/evr/sample.c
View file @
a6512b32
...
...
@@ -21,6 +21,8 @@
#include "evr.h"
#include "mfapi.h"
#include "mferror.h"
#include "d3d9.h"
#include "dxva2api.h"
#include "wine/debug.h"
#include "wine/heap.h"
...
...
@@ -108,6 +110,7 @@ struct sample_allocator
IMFVideoSampleAllocatorNotify
*
callback
;
unsigned
int
free_samples
;
IDirect3DDeviceManager9
*
device_manager
;
CRITICAL_SECTION
cs
;
};
...
...
@@ -168,6 +171,8 @@ static ULONG WINAPI sample_allocator_Release(IMFVideoSampleAllocator *iface)
{
if
(
allocator
->
callback
)
IMFVideoSampleAllocatorNotify_Release
(
allocator
->
callback
);
if
(
allocator
->
device_manager
)
IDirect3DDeviceManager9_Release
(
allocator
->
device_manager
);
DeleteCriticalSection
(
&
allocator
->
cs
);
heap_free
(
allocator
);
}
...
...
@@ -178,9 +183,27 @@ static ULONG WINAPI sample_allocator_Release(IMFVideoSampleAllocator *iface)
static
HRESULT
WINAPI
sample_allocator_SetDirectXManager
(
IMFVideoSampleAllocator
*
iface
,
IUnknown
*
manager
)
{
FIXME
(
"%p, %p.
\n
"
,
iface
,
manager
);
struct
sample_allocator
*
allocator
=
impl_from_IMFVideoSampleAllocator
(
iface
);
IDirect3DDeviceManager9
*
device_manager
=
NULL
;
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
manager
);
if
(
manager
&&
FAILED
(
hr
=
IUnknown_QueryInterface
(
manager
,
&
IID_IDirect3DDeviceManager9
,
(
void
**
)
&
device_manager
)))
{
return
hr
;
}
EnterCriticalSection
(
&
allocator
->
cs
);
if
(
allocator
->
device_manager
)
IDirect3DDeviceManager9_Release
(
allocator
->
device_manager
);
allocator
->
device_manager
=
device_manager
;
LeaveCriticalSection
(
&
allocator
->
cs
);
return
S_OK
;
}
static
HRESULT
WINAPI
sample_allocator_UninitializeSampleAllocator
(
IMFVideoSampleAllocator
*
iface
)
...
...
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