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
c908181e
Commit
c908181e
authored
Apr 03, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 24, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfreadwrite/tests: Avoid using MFCreateMediaBufferFromMediaType.
It's not available on Win7.
parent
7b47833b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
17 deletions
+37
-17
mfplat.c
dlls/mfreadwrite/tests/mfplat.c
+37
-17
No files found.
dlls/mfreadwrite/tests/mfplat.c
View file @
c908181e
...
@@ -2604,28 +2604,25 @@ static HRESULT WINAPI test_decoder_ProcessOutput(IMFTransform *iface, DWORD flag
...
@@ -2604,28 +2604,25 @@ static HRESULT WINAPI test_decoder_ProcessOutput(IMFTransform *iface, DWORD flag
hr
=
MFCreateSample
(
&
data
->
pSample
);
hr
=
MFCreateSample
(
&
data
->
pSample
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFCreateMediaBufferFromMediaType
(
decoder
->
output_type
,
0
,
0
,
0
,
&
buffer
);
hr
=
MFCreateMemoryBuffer
(
96
*
96
*
4
,
&
buffer
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
{
hr
=
MFCreateMemoryBuffer
(
96
*
96
*
4
,
&
buffer
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
}
hr
=
IMFSample_AddBuffer
(
data
->
pSample
,
buffer
);
hr
=
IMFSample_AddBuffer
(
data
->
pSample
,
buffer
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
IMFMediaBuffer_Release
(
buffer
);
IMFMediaBuffer_Release
(
buffer
);
}
}
else
{
ok
(
!!
data
->
pSample
,
"Missing sample
\n
"
);
ok
(
!!
data
->
pSample
,
"Missing sample
\n
"
);
hr
=
IMFSample_GetBufferByIndex
(
data
->
pSample
,
0
,
&
buffer
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFSample_GetBufferByIndex
(
data
->
pSample
,
0
,
&
buffer
);
todo_wine
check_interface
(
buffer
,
&
IID_IMF2DBuffer2
,
TRUE
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
check_interface
(
buffer
,
&
IID_IMFGetService
,
TRUE
);
todo_wine
check_interface
(
buffer
,
&
IID_IMF2DBuffer2
,
TRUE
);
check_interface
(
buffer
,
&
IID_IMFDXGIBuffer
,
FALSE
);
todo_wine
check_interface
(
buffer
,
&
IID_IMFGetService
,
TRUE
);
hr
=
MFGetService
((
IUnknown
*
)
buffer
,
&
MR_BUFFER_SERVICE
,
&
IID_IDirect3DSurface9
,
(
void
**
)
&
unknown
);
check_interface
(
buffer
,
&
IID_IMFDXGIBuffer
,
FALSE
);
todo_wine
ok
(
hr
==
E_NOTIMPL
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFGetService
((
IUnknown
*
)
buffer
,
&
MR_BUFFER_SERVICE
,
&
IID_IDirect3DSurface9
,
(
void
**
)
&
unknown
);
IMFMediaBuffer_Release
(
buffer
);
todo_wine
ok
(
hr
==
E_NOTIMPL
,
"Unexpected hr %#lx.
\n
"
,
hr
);
}
IMFMediaBuffer_Release
(
buffer
);
if
(
decoder
->
next_output
==
MF_E_TRANSFORM_STREAM_CHANGE
)
if
(
decoder
->
next_output
==
MF_E_TRANSFORM_STREAM_CHANGE
)
{
{
...
@@ -2817,6 +2814,16 @@ static void test_source_reader_transform_stream_change(void)
...
@@ -2817,6 +2814,16 @@ static void test_source_reader_transform_stream_change(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
IMFMediaSource_Release
(
source
);
IMFMediaSource_Release
(
source
);
/* skip tests on Win7 which misses IMFSourceReaderEx */
hr
=
IMFSourceReader_QueryInterface
(
reader
,
&
IID_IMFSourceReaderEx
,
(
void
**
)
&
reader_ex
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
)
/* Win7 */
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
broken
(
hr
==
E_NOINTERFACE
))
{
win_skip
(
"missing IMFSourceReaderEx interface, skipping tests on Win7
\n
"
);
goto
skip_tests
;
}
IMFSourceReaderEx_Release
(
reader_ex
);
hr
=
IMFSourceReader_SetStreamSelection
(
reader
,
0
,
TRUE
);
hr
=
IMFSourceReader_SetStreamSelection
(
reader
,
0
,
TRUE
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
...
@@ -2881,6 +2888,7 @@ static void test_source_reader_transform_stream_change(void)
...
@@ -2881,6 +2888,7 @@ static void test_source_reader_transform_stream_change(void)
IMFTransform_Release
(
test_decoder
);
IMFTransform_Release
(
test_decoder
);
skip_tests:
IMFSourceReader_Release
(
reader
);
IMFSourceReader_Release
(
reader
);
hr
=
MFTUnregisterLocal
(
&
factory
);
hr
=
MFTUnregisterLocal
(
&
factory
);
...
@@ -2993,6 +3001,17 @@ static void test_source_reader_transforms_d3d(void)
...
@@ -2993,6 +3001,17 @@ static void test_source_reader_transforms_d3d(void)
IMFAttributes_Release
(
attributes
);
IMFAttributes_Release
(
attributes
);
IMFMediaSource_Release
(
source
);
IMFMediaSource_Release
(
source
);
/* skip tests on Win7 which misses IMFSourceReaderEx */
hr
=
IMFSourceReader_QueryInterface
(
reader
,
&
IID_IMFSourceReaderEx
,
(
void
**
)
&
reader_ex
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
)
/* Win7 */
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
broken
(
hr
==
E_NOINTERFACE
))
{
win_skip
(
"missing IMFSourceReaderEx interface, skipping tests on Win7
\n
"
);
IMFSourceReader_Release
(
reader
);
goto
skip_tests
;
}
IMFSourceReaderEx_Release
(
reader_ex
);
hr
=
IMFSourceReader_SetStreamSelection
(
reader
,
0
,
TRUE
);
hr
=
IMFSourceReader_SetStreamSelection
(
reader
,
0
,
TRUE
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
...
@@ -3152,6 +3171,7 @@ static void test_source_reader_transforms_d3d(void)
...
@@ -3152,6 +3171,7 @@ static void test_source_reader_transforms_d3d(void)
test_decoder_allocate_samples
=
FALSE
;
test_decoder_allocate_samples
=
FALSE
;
skip_tests:
hr
=
MFTUnregisterLocal
(
&
factory
);
hr
=
MFTUnregisterLocal
(
&
factory
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
...
...
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