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
604fb218
Commit
604fb218
authored
Oct 12, 2012
by
Christian Costa
Committed by
Alexandre Julliard
Oct 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amstream: Implement BasePinImpl_CheckMediaType in media stream filter.
parent
5d5da39d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
mediastreamfilter.c
dlls/amstream/mediastreamfilter.c
+42
-0
No files found.
dlls/amstream/mediastreamfilter.c
View file @
604fb218
...
...
@@ -76,6 +76,48 @@ static inline IMediaStreamFilterImpl *impl_from_IMediaStreamFilter(IMediaStreamF
static
HRESULT
WINAPI
BasePinImpl_CheckMediaType
(
BasePin
*
This
,
const
AM_MEDIA_TYPE
*
pmt
)
{
IMediaStreamFilterImpl
*
filter
=
impl_from_IMediaStreamFilter
((
IMediaStreamFilter
*
)
This
->
pinInfo
.
pFilter
);
MSPID
purpose_id
;
int
i
;
TRACE
(
"Checking media type %s - %s
\n
"
,
debugstr_guid
(
&
pmt
->
majortype
),
debugstr_guid
(
&
pmt
->
subtype
));
/* Find which stream is associated with the pin */
for
(
i
=
0
;
i
<
filter
->
nb_streams
;
i
++
)
if
(
&
This
->
IPin_iface
==
filter
->
pins
[
i
])
break
;
if
(
i
==
filter
->
nb_streams
)
return
S_FALSE
;
if
(
FAILED
(
IMediaStream_GetInformation
(
filter
->
streams
[
i
],
&
purpose_id
,
NULL
)))
return
S_FALSE
;
TRACE
(
"Checking stream with purpose id %s
\n
"
,
debugstr_guid
(
&
purpose_id
));
if
(
IsEqualGUID
(
&
purpose_id
,
&
MSPID_PrimaryVideo
)
&&
IsEqualGUID
(
&
pmt
->
majortype
,
&
MEDIATYPE_Video
))
{
if
(
IsEqualGUID
(
&
pmt
->
subtype
,
&
MEDIASUBTYPE_RGB1
)
||
IsEqualGUID
(
&
pmt
->
subtype
,
&
MEDIASUBTYPE_RGB4
)
||
IsEqualGUID
(
&
pmt
->
subtype
,
&
MEDIASUBTYPE_RGB8
)
||
IsEqualGUID
(
&
pmt
->
subtype
,
&
MEDIASUBTYPE_RGB565
)
||
IsEqualGUID
(
&
pmt
->
subtype
,
&
MEDIASUBTYPE_RGB555
)
||
IsEqualGUID
(
&
pmt
->
subtype
,
&
MEDIASUBTYPE_RGB24
)
||
IsEqualGUID
(
&
pmt
->
subtype
,
&
MEDIASUBTYPE_RGB32
))
{
TRACE
(
"Video sub-type %s matches
\n
"
,
debugstr_guid
(
&
pmt
->
subtype
));
return
S_OK
;
}
}
else
if
(
IsEqualGUID
(
&
purpose_id
,
&
MSPID_PrimaryAudio
)
&&
IsEqualGUID
(
&
pmt
->
majortype
,
&
MEDIATYPE_Audio
))
{
if
(
IsEqualGUID
(
&
pmt
->
subtype
,
&
MEDIASUBTYPE_PCM
))
{
TRACE
(
"Audio sub-type %s matches
\n
"
,
debugstr_guid
(
&
pmt
->
subtype
));
return
S_OK
;
}
}
return
S_FALSE
;
}
...
...
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