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
d2a30424
Commit
d2a30424
authored
Feb 03, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat/allocator: Add support for MF_SA_BUFFERS_PER_SAMPLE.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d100d92f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
sample.c
dlls/mfplat/sample.c
+3
-1
mfplat.c
dlls/mfplat/tests/mfplat.c
+3
-1
No files found.
dlls/mfplat/sample.c
View file @
d2a30424
...
@@ -1355,12 +1355,15 @@ static HRESULT sample_allocator_initialize(struct sample_allocator *allocator, u
...
@@ -1355,12 +1355,15 @@ static HRESULT sample_allocator_initialize(struct sample_allocator *allocator, u
{
{
allocator
->
attributes
=
attributes
;
allocator
->
attributes
=
attributes
;
IMFAttributes_AddRef
(
allocator
->
attributes
);
IMFAttributes_AddRef
(
allocator
->
attributes
);
IMFAttributes_GetUINT32
(
attributes
,
&
MF_SA_BUFFERS_PER_SAMPLE
,
&
allocator
->
frame_desc
.
buffer_count
);
}
}
allocator
->
frame_desc
.
d3d9_format
=
subtype
.
Data1
;
allocator
->
frame_desc
.
d3d9_format
=
subtype
.
Data1
;
allocator
->
frame_desc
.
dxgi_format
=
MFMapDX9FormatToDXGIFormat
(
allocator
->
frame_desc
.
d3d9_format
);
allocator
->
frame_desc
.
dxgi_format
=
MFMapDX9FormatToDXGIFormat
(
allocator
->
frame_desc
.
d3d9_format
);
allocator
->
frame_desc
.
width
=
frame_size
>>
32
;
allocator
->
frame_desc
.
width
=
frame_size
>>
32
;
allocator
->
frame_desc
.
height
=
frame_size
;
allocator
->
frame_desc
.
height
=
frame_size
;
allocator
->
frame_desc
.
buffer_count
=
max
(
1
,
allocator
->
frame_desc
.
buffer_count
);
if
(
FAILED
(
hr
=
sample_allocator_get_surface_service
(
allocator
,
&
service
)))
if
(
FAILED
(
hr
=
sample_allocator_get_surface_service
(
allocator
,
&
service
)))
return
hr
;
return
hr
;
...
@@ -1673,7 +1676,6 @@ HRESULT WINAPI MFCreateVideoSampleAllocatorEx(REFIID riid, void **obj)
...
@@ -1673,7 +1676,6 @@ HRESULT WINAPI MFCreateVideoSampleAllocatorEx(REFIID riid, void **obj)
object
->
IMFVideoSampleAllocatorCallback_iface
.
lpVtbl
=
&
sample_allocator_callback_vtbl
;
object
->
IMFVideoSampleAllocatorCallback_iface
.
lpVtbl
=
&
sample_allocator_callback_vtbl
;
object
->
tracking_callback
.
lpVtbl
=
&
sample_allocator_tracking_callback_vtbl
;
object
->
tracking_callback
.
lpVtbl
=
&
sample_allocator_tracking_callback_vtbl
;
object
->
refcount
=
1
;
object
->
refcount
=
1
;
object
->
frame_desc
.
buffer_count
=
1
;
list_init
(
&
object
->
used_samples
);
list_init
(
&
object
->
used_samples
);
list_init
(
&
object
->
free_samples
);
list_init
(
&
object
->
free_samples
);
InitializeCriticalSection
(
&
object
->
cs
);
InitializeCriticalSection
(
&
object
->
cs
);
...
...
dlls/mfplat/tests/mfplat.c
View file @
d2a30424
...
@@ -6439,6 +6439,9 @@ todo_wine
...
@@ -6439,6 +6439,9 @@ todo_wine
hr
=
IMFAttributes_SetUINT32
(
attributes
,
&
MF_SA_BUFFERS_PER_SAMPLE
,
2
);
hr
=
IMFAttributes_SetUINT32
(
attributes
,
&
MF_SA_BUFFERS_PER_SAMPLE
,
2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoSampleAllocatorEx_AllocateSample
(
allocatorex
,
&
sample
);
ok
(
hr
==
MF_E_NOT_INITIALIZED
,
"Unexpected hr %#x.
\n
"
,
hr
);
EXPECT_REF
(
attributes
,
1
);
EXPECT_REF
(
attributes
,
1
);
hr
=
IMFVideoSampleAllocatorEx_InitializeSampleAllocatorEx
(
allocatorex
,
0
,
0
,
attributes
,
video_type
);
hr
=
IMFVideoSampleAllocatorEx_InitializeSampleAllocatorEx
(
allocatorex
,
0
,
0
,
attributes
,
video_type
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
...
@@ -6454,7 +6457,6 @@ todo_wine
...
@@ -6454,7 +6457,6 @@ todo_wine
hr
=
IMFSample_GetBufferCount
(
sample
,
&
buffer_count
);
hr
=
IMFSample_GetBufferCount
(
sample
,
&
buffer_count
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
buffer_count
==
2
,
"Unexpected buffer count %u.
\n
"
,
buffer_count
);
ok
(
buffer_count
==
2
,
"Unexpected buffer count %u.
\n
"
,
buffer_count
);
hr
=
IMFVideoSampleAllocatorEx_AllocateSample
(
allocatorex
,
&
sample2
);
hr
=
IMFVideoSampleAllocatorEx_AllocateSample
(
allocatorex
,
&
sample2
);
...
...
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