Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

Before you can set the frame rate for capturing video you must first determine the frame rates that a capture device supports. You can do this by first calling IAMStreamConfig::GetNumberOfCapabilitiesand then making successive calls to IAMStreamConfig::GetStreamCapsto enumerate the capabilities for a particular media type. Each set of capabilities is described in an AM_MEDIA_TYPEstructure. For video data, the media format is FORMAT_VideoInfo2 so the AM_MEDIA_TYPE.pbFormatmember points to a VIDEOINFOHEADER2structure. The supported frame rate for the media type is contained in VIDEOINFOHEADER2.AvgTimePerFrame.

You can set one of the supported frame rates by preparing an AM_MEDIA_TYPEstructure and then calling IAMStreamConfig::SetFormat.

See Also