hr = pfilter->enumpins(&penum);
if (failed(hr))
{
return hr;
}
while(penum->next(1, &ppin, 0) == s_ok)
{
pin_direction pindirthis;
hr = ppin->querydirection(&pindirthis);
if (failed(hr))
{
ppin->release();
penum->release();
return hr;
}
if (pindir == pindirthis) //如果类型符合
{
// found a match. return the ipin pointer to the caller.
**pppin = ppin;