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
698cc602
Commit
698cc602
authored
Mar 07, 2023
by
Derek Lesho
Committed by
Alexandre Julliard
Mar 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat/tests: Test bytestream closing behavior in IMFMediaSource::Shutdown.
Signed-off-by:
Derek Lesho
<
dlesho@codeweavers.com
>
parent
d3c32ccf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
mfplat.c
dlls/mfplat/tests/mfplat.c
+21
-0
No files found.
dlls/mfplat/tests/mfplat.c
View file @
698cc602
...
...
@@ -720,9 +720,19 @@ static BOOL get_event(IMFMediaEventGenerator *generator, MediaEventType expected
return
ret
;
}
static
const
IMFByteStreamVtbl
*
bytestream_vtbl_orig
;
static
int
bytestream_closed
=
0
;
static
HRESULT
WINAPI
bytestream_wrapper_Close
(
IMFByteStream
*
iface
)
{
bytestream_closed
=
1
;
return
bytestream_vtbl_orig
->
Close
(
iface
);
}
static
void
test_source_resolver
(
void
)
{
struct
test_callback
*
callback
,
*
callback2
;
IMFByteStreamVtbl
bytestream_vtbl_wrapper
;
IMFSourceResolver
*
resolver
,
*
resolver2
;
IMFPresentationDescriptor
*
descriptor
;
IMFSchemeHandler
*
scheme_handler
;
...
...
@@ -826,6 +836,12 @@ static void test_source_resolver(void)
hr
=
MFCreateFile
(
MF_ACCESSMODE_READ
,
MF_OPENMODE_FAIL_IF_NOT_EXIST
,
MF_FILEFLAGS_NONE
,
filename
,
&
stream
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
/* Wrap ::Close to test when the media source calls it */
bytestream_vtbl_orig
=
stream
->
lpVtbl
;
bytestream_vtbl_wrapper
=
*
bytestream_vtbl_orig
;
bytestream_vtbl_wrapper
.
Close
=
bytestream_wrapper_Close
;
stream
->
lpVtbl
=
&
bytestream_vtbl_wrapper
;
hr
=
IMFByteStream_QueryInterface
(
stream
,
&
IID_IMFAttributes
,
(
void
**
)
&
attributes
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFAttributes_SetString
(
attributes
,
&
MF_BYTESTREAM_CONTENT_TYPE
,
L"video/mp4"
);
...
...
@@ -1059,9 +1075,14 @@ static void test_source_resolver(void)
IMFMediaTypeHandler_Release
(
handler
);
IMFPresentationDescriptor_Release
(
descriptor
);
ok
(
!
bytestream_closed
,
"IMFByteStream::Close called unexpectedly
\n
"
);
hr
=
IMFMediaSource_Shutdown
(
mediasource
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
bytestream_closed
,
"Missing IMFByteStream::Close call
\n
"
);
hr
=
IMFMediaSource_CreatePresentationDescriptor
(
mediasource
,
NULL
);
ok
(
hr
==
MF_E_SHUTDOWN
,
"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