Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

iPosition of the GetMediaType(int iPosition, CMediaType *pmt)

10 views
Skip to first unread message

NewToDirectShow

unread,
Oct 21, 2009, 4:35:12 AM10/21/09
to
Dear Experts
Can someone explain what the iPosition parameter use for? The
DirectShow SDK only says that Zero-based index value.


Alessandro Angeli

unread,
Oct 21, 2009, 1:46:05 PM10/21/09
to
From: "NewToDirectShow"

> Can someone explain what the iPosition parameter
> use for? The DirectShow SDK only says that Zero-based
> index value.

Assuming you mean CBasePin::GetMediaType(), that is not all
the docs say: <<<[...] retrieves a preferred media type, by
index value [...] this method returns the type with an index
value of iPosition [...]>>>.

--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


Geraint Davies

unread,
Oct 27, 2009, 8:23:53 AM10/27/09
to
On Wed, 21 Oct 2009 13:46:05 -0400, "Alessandro Angeli"
<nob...@nowhere.in.the.net> wrote:

>From: "NewToDirectShow"
>
>> Can someone explain what the iPosition parameter
>> use for? The DirectShow SDK only says that Zero-based
>> index value.
>
>Assuming you mean CBasePin::GetMediaType(), that is not all
>the docs say: <<<[...] retrieves a preferred media type, by
>index value [...] this method returns the type with an index
>value of iPosition [...]>>>.

In fact, the most useful documentation is the source code to the base
classes. Look at CEnumMediaTypes::Next: this method implements the
(relatively complicated) IEnumMediaTypes interface by calling the
(slightly simpler) GetMediaType method. The iPosition parameter is
used to perform a simple enumeration.

G

0 new messages