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
95927941
Commit
95927941
authored
Oct 30, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/allocator: Use different buffer implementation for surface buffers.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
23a656a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
20 deletions
+17
-20
sample.c
dlls/evr/sample.c
+16
-15
evr.c
dlls/evr/tests/evr.c
+1
-5
No files found.
dlls/evr/sample.c
View file @
95927941
...
...
@@ -306,27 +306,28 @@ static HRESULT sample_allocator_create_samples(struct sample_allocator *allocato
for
(
i
=
0
;
i
<
sample_count
;
++
i
)
{
struct
queued_sample
*
queued_sample
=
heap_alloc
(
sizeof
(
*
queued_sample
));
IMFMediaBuffer
*
buffer
;
if
(
service
)
if
(
SUCCEEDED
(
hr
=
MFCreateVideoSampleFromSurface
(
NULL
,
&
sample
))
)
{
if
(
SUCCEEDED
(
hr
=
IDirectXVideoProcessorService_CreateSurface
(
service
,
width
,
height
,
0
,
format
,
D3DPOOL_DEFAULT
,
0
,
DXVA2_VideoProcessorRenderTarget
,
&
surface
,
NULL
)))
if
(
service
)
{
hr
=
MFCreateVideoSampleFromSurface
((
IUnknown
*
)
surface
,
&
sample
);
IDirect3DSurface9_Release
(
surface
);
if
(
SUCCEEDED
(
hr
=
IDirectXVideoProcessorService_CreateSurface
(
service
,
width
,
height
,
0
,
format
,
D3DPOOL_DEFAULT
,
0
,
DXVA2_VideoProcessorRenderTarget
,
&
surface
,
NULL
)))
{
hr
=
MFCreateDXSurfaceBuffer
(
&
IID_IDirect3DSurface9
,
(
IUnknown
*
)
surface
,
FALSE
,
&
buffer
);
IDirect3DSurface9_Release
(
surface
);
}
}
else
{
hr
=
MFCreate2DMediaBuffer
(
width
,
height
,
format
,
FALSE
,
&
buffer
);
}
}
else
{
IMFMediaBuffer
*
buffer
;
if
(
SUCCEEDED
(
hr
=
MFCreateVideoSampleFromSurface
(
NULL
,
&
sample
)
))
if
(
SUCCEEDED
(
hr
))
{
if
(
SUCCEEDED
(
hr
=
MFCreate2DMediaBuffer
(
width
,
height
,
format
,
FALSE
,
&
buffer
)))
{
hr
=
IMFSample_AddBuffer
(
sample
,
buffer
);
IMFMediaBuffer_Release
(
buffer
);
}
hr
=
IMFSample_AddBuffer
(
sample
,
buffer
);
IMFMediaBuffer_Release
(
buffer
);
}
}
...
...
dlls/evr/tests/evr.c
View file @
95927941
...
...
@@ -1468,17 +1468,13 @@ todo_wine
IDirect3DSurface9_Release
(
surface
);
hr
=
IMFMediaBuffer_QueryInterface
(
buffer
,
&
IID_IMF2DBuffer
,
(
void
**
)
&
unk
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
unk
);
IUnknown_Release
(
unk
);
hr
=
IMFMediaBuffer_Lock
(
buffer
,
&
data
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaBuffer_Unlock
(
buffer
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFSample_Release
(
sample
);
...
...
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