You should get connected media type of your renderer and get information from VIDEOINFOHEADER structure.
double GetFPS(IBaseFilter * _filter)
{
double _fps = 0;
if (_filter) {
IEnumPins * _enum;
if (S_OK == _filter->EnumPins(&_enum))
{
IPin * _pin;
while (_fps == 0 && _enum->Next(1,&_pin,NULL) == S_OK)
{
PIN_DIRECTION _direction;
_pin->QueryDirection(&_direction);
if (_direction == PINDIR_INPUT)
{
AM_MEDIA_TYPE mt;
if (S_OK == _pin->ConnectionMediaType(&mt))
{
if (mt.majortype == MEDIATYPE_Video
&& mt.pbFormat
&& mt.cbFormat >= sizeof(VIDEOINFOHEADER))
{
REFERENCE_TIME _time = ((VIDEOINFOHEADER*)mt.pbFormat)->AvgTimePerFrame;
if (_time > 0)
{
_fps = ((double)UNITS / (double)(_time));
}
}
FreeMediaType(mt);
}
}
_pin->Release();
}
_enum->Release();
}
}
return _fps;
}
Maxim.