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
193e56ce
Commit
193e56ce
authored
Feb 16, 2018
by
Anton Baskanov
Committed by
Alexandre Julliard
Mar 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amstream: Store streams as IAMMediaStream in MediaStreamFilter.
Signed-off-by:
Anton Baskanov
<
baskanov@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d7511089
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
mediastreamfilter.c
dlls/amstream/mediastreamfilter.c
+9
-9
No files found.
dlls/amstream/mediastreamfilter.c
View file @
193e56ce
...
...
@@ -64,7 +64,7 @@ static const IPinVtbl MediaStreamFilter_InputPin_Vtbl =
typedef
struct
{
BaseFilter
filter
;
ULONG
nb_streams
;
IMediaStream
**
streams
;
I
AM
MediaStream
**
streams
;
IPin
**
pins
;
}
IMediaStreamFilterImpl
;
...
...
@@ -89,7 +89,7 @@ static HRESULT WINAPI BasePinImpl_CheckMediaType(BasePin *This, const AM_MEDIA_T
if
(
i
==
filter
->
nb_streams
)
return
S_FALSE
;
if
(
FAILED
(
IMediaStream_GetInformation
(
filter
->
streams
[
i
],
&
purpose_id
,
NULL
)))
if
(
FAILED
(
I
AM
MediaStream_GetInformation
(
filter
->
streams
[
i
],
&
purpose_id
,
NULL
)))
return
S_FALSE
;
TRACE
(
"Checking stream with purpose id %s
\n
"
,
debugstr_guid
(
&
purpose_id
));
...
...
@@ -142,7 +142,7 @@ static HRESULT WINAPI BasePinImp_GetMediaType(BasePin *This, int index, AM_MEDIA
if
(
i
==
filter
->
nb_streams
)
return
S_FALSE
;
if
(
FAILED
(
IMediaStream_GetInformation
(
filter
->
streams
[
i
],
&
purpose_id
,
NULL
)))
if
(
FAILED
(
I
AM
MediaStream_GetInformation
(
filter
->
streams
[
i
],
&
purpose_id
,
NULL
)))
return
S_FALSE
;
TRACE
(
"Processing stream with purpose id %s
\n
"
,
debugstr_guid
(
&
purpose_id
));
...
...
@@ -246,7 +246,7 @@ static ULONG WINAPI MediaStreamFilterImpl_Release(IMediaStreamFilter *iface)
ULONG
i
;
for
(
i
=
0
;
i
<
This
->
nb_streams
;
i
++
)
{
IMediaStream_Release
(
This
->
streams
[
i
]);
I
AM
MediaStream_Release
(
This
->
streams
[
i
]);
IPin_Release
(
This
->
pins
[
i
]);
}
CoTaskMemFree
(
This
->
streams
);
...
...
@@ -343,7 +343,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_QueryVendorInfo(IMediaStreamFilter *
static
HRESULT
WINAPI
MediaStreamFilterImpl_AddMediaStream
(
IMediaStreamFilter
*
iface
,
IAMMediaStream
*
pAMMediaStream
)
{
IMediaStreamFilterImpl
*
This
=
impl_from_IMediaStreamFilter
(
iface
);
IMediaStream
**
streams
;
I
AM
MediaStream
**
streams
;
IPin
**
pins
;
MediaStreamFilter_InputPin
*
pin
;
HRESULT
hr
;
...
...
@@ -352,7 +352,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_AddMediaStream(IMediaStreamFilter* i
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
pAMMediaStream
);
streams
=
CoTaskMemRealloc
(
This
->
streams
,
(
This
->
nb_streams
+
1
)
*
sizeof
(
IMediaStream
*
));
streams
=
CoTaskMemRealloc
(
This
->
streams
,
(
This
->
nb_streams
+
1
)
*
sizeof
(
I
AM
MediaStream
*
));
if
(
!
streams
)
return
E_OUTOFMEMORY
;
This
->
streams
=
streams
;
...
...
@@ -375,7 +375,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_AddMediaStream(IMediaStreamFilter* i
pin
=
(
MediaStreamFilter_InputPin
*
)
This
->
pins
[
This
->
nb_streams
];
pin
->
pin
.
pin
.
pinInfo
.
pFilter
=
&
This
->
filter
.
IBaseFilter_iface
;
This
->
streams
[
This
->
nb_streams
]
=
(
IMediaStream
*
)
pAMMediaStream
;
This
->
streams
[
This
->
nb_streams
]
=
pAMMediaStream
;
This
->
nb_streams
++
;
IAMMediaStream_AddRef
(
pAMMediaStream
);
...
...
@@ -393,10 +393,10 @@ static HRESULT WINAPI MediaStreamFilterImpl_GetMediaStream(IMediaStreamFilter* i
for
(
i
=
0
;
i
<
This
->
nb_streams
;
i
++
)
{
IMediaStream_GetInformation
(
This
->
streams
[
i
],
&
purpose_id
,
NULL
);
I
AM
MediaStream_GetInformation
(
This
->
streams
[
i
],
&
purpose_id
,
NULL
);
if
(
IsEqualIID
(
&
purpose_id
,
idPurpose
))
{
*
ppMediaStream
=
This
->
streams
[
i
];
*
ppMediaStream
=
(
IMediaStream
*
)
This
->
streams
[
i
];
IMediaStream_AddRef
(
*
ppMediaStream
);
return
S_OK
;
}
...
...
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