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
c6d436f7
Commit
c6d436f7
authored
Mar 03, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amstream: Implement IMediaStreamFilter::EnumMediaStreams().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ca4f624e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
15 deletions
+23
-15
filter.c
dlls/amstream/filter.c
+12
-3
amstream.c
dlls/amstream/tests/amstream.c
+11
-12
No files found.
dlls/amstream/filter.c
View file @
c6d436f7
...
...
@@ -474,11 +474,20 @@ static HRESULT WINAPI filter_GetMediaStream(IMediaStreamFilter *iface, REFMSPID
return
MS_E_NOSTREAM
;
}
static
HRESULT
WINAPI
filter_EnumMediaStreams
(
IMediaStreamFilter
*
iface
,
LONG
Index
,
IMediaStream
**
ppMediaS
tream
)
static
HRESULT
WINAPI
filter_EnumMediaStreams
(
IMediaStreamFilter
*
iface
,
LONG
index
,
IMediaStream
**
s
tream
)
{
FIXME
(
"(%p)->(%d,%p): Stub!
\n
"
,
iface
,
Index
,
ppMediaStream
);
struct
filter
*
filter
=
impl_from_IMediaStreamFilter
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"filter %p, index %d, stream %p.
\n
"
,
filter
,
index
,
stream
);
if
(
index
>=
filter
->
nb_streams
)
return
S_FALSE
;
if
(
!
stream
)
return
E_POINTER
;
IMediaStream_AddRef
(
*
stream
=
(
IMediaStream
*
)
filter
->
streams
[
index
]);
return
S_OK
;
}
static
HRESULT
WINAPI
filter_SupportSeeking
(
IMediaStreamFilter
*
iface
,
BOOL
bRenderer
)
...
...
dlls/amstream/tests/amstream.c
View file @
c6d436f7
...
...
@@ -573,19 +573,18 @@ static void check_enum_stream_(int line, IAMMultiMediaStream *mmstream,
HRESULT
hr
;
hr
=
IAMMultiMediaStream_EnumMediaStreams
(
mmstream
,
index
,
&
stream
);
todo_wine
ok_
(
__FILE__
,
line
)(
hr
==
(
expect
?
S_OK
:
S_FALSE
),
ok_
(
__FILE__
,
line
)(
hr
==
(
expect
?
S_OK
:
S_FALSE
),
"IAMMultiMediaStream::EnumMediaStreams() returned %#x.
\n
"
,
hr
);
hr
=
IMediaStreamFilter_EnumMediaStreams
(
filter
,
index
,
&
stream2
);
todo_wine
ok_
(
__FILE__
,
line
)(
hr
==
(
expect
?
S_OK
:
S_FALSE
),
ok_
(
__FILE__
,
line
)(
hr
==
(
expect
?
S_OK
:
S_FALSE
),
"IMediaStreamFilter::EnumMediaStreams() returned %#x.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
ok_
(
__FILE__
,
line
)(
stream
==
expect
,
"Expected stream %p, got %p.
\n
"
,
expect
,
stream
);
ok_
(
__FILE__
,
line
)(
stream2
==
expect
,
"Expected stream %p, got %p.
\n
"
,
expect
,
stream2
);
IMediaStream_Release
(
stream
);
IMediaStream_Release
(
stream2
);
}
if
(
stream
)
IMediaStream_Release
(
stream
);
if
(
stream2
)
IMediaStream_Release
(
stream2
);
}
#define check_get_stream(a,b,c,d) check_get_stream_(__LINE__,a,b,c,d)
...
...
@@ -629,9 +628,9 @@ static void test_add_stream(void)
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IAMMultiMediaStream_EnumMediaStreams
(
mmstream
,
0
,
NULL
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IMediaStreamFilter_EnumMediaStreams
(
stream_filter
,
0
,
NULL
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IAMMultiMediaStream_GetMediaStream
(
mmstream
,
&
MSPID_PrimaryAudio
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -655,13 +654,13 @@ static void test_add_stream(void)
ok
(
hr
==
MS_E_PURPOSEID
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IAMMultiMediaStream_EnumMediaStreams
(
mmstream
,
0
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IMediaStreamFilter_EnumMediaStreams
(
stream_filter
,
0
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IAMMultiMediaStream_EnumMediaStreams
(
mmstream
,
1
,
NULL
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IMediaStreamFilter_EnumMediaStreams
(
stream_filter
,
1
,
NULL
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
check_enum_stream
(
mmstream
,
stream_filter
,
0
,
video_stream
);
check_enum_stream
(
mmstream
,
stream_filter
,
1
,
NULL
);
...
...
@@ -694,7 +693,7 @@ static void test_add_stream(void)
check_enum_stream
(
mmstream
,
stream_filter
,
0
,
video_stream
);
check_enum_stream
(
mmstream
,
stream_filter
,
1
,
audio_stream
);
check_enum_stream
(
mmstream
,
stream_filter
,
2
,
(
IMediaStream
*
)
&
teststream
);
todo_wine
check_enum_stream
(
mmstream
,
stream_filter
,
2
,
(
IMediaStream
*
)
&
teststream
);
check_enum_stream
(
mmstream
,
stream_filter
,
3
,
NULL
);
check_get_stream
(
mmstream
,
stream_filter
,
&
MSPID_PrimaryVideo
,
video_stream
);
...
...
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