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
7e82db78
Commit
7e82db78
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 BasePinImp_GetMediaType in media stream filter.
parent
604fb218
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
1 deletion
+59
-1
mediastreamfilter.c
dlls/amstream/mediastreamfilter.c
+59
-1
No files found.
dlls/amstream/mediastreamfilter.c
View file @
7e82db78
...
...
@@ -126,8 +126,66 @@ static LONG WINAPI BasePinImp_GetMediaTypeVersion(BasePin *This)
return
0
;
}
static
HRESULT
WINAPI
BasePinImp_GetMediaType
(
BasePin
*
This
,
int
i
Position
,
AM_MEDIA_TYPE
*
amt
)
static
HRESULT
WINAPI
BasePinImp_GetMediaType
(
BasePin
*
This
,
int
i
ndex
,
AM_MEDIA_TYPE
*
amt
)
{
IMediaStreamFilterImpl
*
filter
=
(
IMediaStreamFilterImpl
*
)
This
->
pinInfo
.
pFilter
;
MSPID
purpose_id
;
int
i
;
/* 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
(
"Processing stream with purpose id %s
\n
"
,
debugstr_guid
(
&
purpose_id
));
if
(
IsEqualGUID
(
&
purpose_id
,
&
MSPID_PrimaryVideo
))
{
amt
->
majortype
=
MEDIATYPE_Video
;
switch
(
index
)
{
case
0
:
amt
->
subtype
=
MEDIASUBTYPE_RGB1
;
break
;
case
1
:
amt
->
subtype
=
MEDIASUBTYPE_RGB4
;
break
;
case
2
:
amt
->
subtype
=
MEDIASUBTYPE_RGB8
;
break
;
case
3
:
amt
->
subtype
=
MEDIASUBTYPE_RGB565
;
break
;
case
4
:
amt
->
subtype
=
MEDIASUBTYPE_RGB555
;
break
;
case
5
:
amt
->
subtype
=
MEDIASUBTYPE_RGB24
;
break
;
case
6
:
amt
->
subtype
=
MEDIASUBTYPE_RGB32
;
break
;
default:
return
S_FALSE
;
}
}
else
if
(
IsEqualGUID
(
&
purpose_id
,
&
MSPID_PrimaryAudio
))
{
if
(
!
index
)
{
amt
->
majortype
=
MEDIATYPE_Audio
;
amt
->
subtype
=
MEDIASUBTYPE_PCM
;
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