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
b3363f5a
Commit
b3363f5a
authored
Oct 02, 2022
by
Anton Baskanov
Committed by
Alexandre Julliard
Nov 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/tests: Add tests for MPEG layer-3 decoder sink allocator.
Signed-off-by:
Anton Baskanov
<
baskanov@gmail.com
>
parent
5925a2ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
0 deletions
+52
-0
mpeglayer3.c
dlls/quartz/tests/mpeglayer3.c
+52
-0
No files found.
dlls/quartz/tests/mpeglayer3.c
View file @
b3363f5a
...
...
@@ -827,6 +827,56 @@ static void testfilter_init(struct testfilter *filter)
strmbase_source_init
(
&
filter
->
source
,
&
filter
->
filter
,
L"source"
,
&
testsource_ops
);
}
static
void
test_sink_allocator
(
IMemInputPin
*
input
)
{
IMemAllocator
*
req_allocator
,
*
ret_allocator
;
ALLOCATOR_PROPERTIES
props
,
ret_props
;
HRESULT
hr
;
hr
=
IMemInputPin_GetAllocatorRequirements
(
input
,
&
props
);
ok
(
hr
==
E_NOTIMPL
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IMemInputPin_GetAllocator
(
input
,
&
ret_allocator
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
hr
=
IMemAllocator_GetProperties
(
ret_allocator
,
&
props
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
!
props
.
cBuffers
,
"Got %ld buffers.
\n
"
,
props
.
cBuffers
);
ok
(
!
props
.
cbBuffer
,
"Got size %ld.
\n
"
,
props
.
cbBuffer
);
ok
(
!
props
.
cbAlign
,
"Got alignment %ld.
\n
"
,
props
.
cbAlign
);
ok
(
!
props
.
cbPrefix
,
"Got prefix %ld.
\n
"
,
props
.
cbPrefix
);
hr
=
IMemInputPin_NotifyAllocator
(
input
,
ret_allocator
,
TRUE
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
IMemAllocator_Release
(
ret_allocator
);
}
hr
=
IMemInputPin_NotifyAllocator
(
input
,
NULL
,
TRUE
);
ok
(
hr
==
E_POINTER
,
"Got hr %#lx.
\n
"
,
hr
);
CoCreateInstance
(
&
CLSID_MemoryAllocator
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMemAllocator
,
(
void
**
)
&
req_allocator
);
props
.
cBuffers
=
1
;
props
.
cbBuffer
=
256
;
props
.
cbAlign
=
1
;
props
.
cbPrefix
=
0
;
hr
=
IMemAllocator_SetProperties
(
req_allocator
,
&
props
,
&
ret_props
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IMemInputPin_NotifyAllocator
(
input
,
req_allocator
,
TRUE
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IMemInputPin_GetAllocator
(
input
,
&
ret_allocator
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
ret_allocator
==
req_allocator
,
"Allocators didn't match.
\n
"
);
IMemAllocator_Release
(
req_allocator
);
IMemAllocator_Release
(
ret_allocator
);
}
static
void
test_connect_pin
(
void
)
{
IBaseFilter
*
filter
=
create_mpeg_layer3_decoder
();
...
...
@@ -942,6 +992,8 @@ static void test_connect_pin(void)
hr
=
IMediaControl_Stop
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
test_sink_allocator
(
meminput
);
IMemInputPin_Release
(
meminput
);
IPin_Release
(
sink
);
IPin_Release
(
source
);
...
...
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