IMFSeekInfo::GetNearestKeyFrames method (mfidl.h)
For a particular seek position, gets the two nearest key frames.
HRESULT GetNearestKeyFrames( [in] const GUID *pguidTimeFormat, [in] const PROPVARIANT *pvarStartPosition, [out] PROPVARIANT *pvarPreviousKeyFrame, [out] PROPVARIANT *pvarNextKeyFrame );
A pointer to a GUID that specifies the time format. The time format defines the units for the other parameters of this method. If the value is GUID_NULL, the time format is 100-nanosecond units. Some media sources might support additional time format GUIDs.
The seek position. The units for this parameter are specified by pguidTimeFormat.
Receives the position of the nearest key frame that appears earlier than pvarStartPosition. The units for this parameter are specified by pguidTimeFormat.
Receives the position of the nearest key frame that appears later than pvarStartPosition. The units for this parameter are specified by pguidTimeFormat.
This method can return one of these values.
||The method succeeded.|
||The time format specified in pguidTimeFormat is not supported.|
If an application seeks to a non–key frame, the decoder must start decoding from the previous key frame. This can increase latency, because several frames might get decoded before the requested frame is reached. To reduce latency, an application can call this method to find the two key frames that are closest to the desired time, and then seek to one of those key frames.
|Minimum supported client||Windows 8 [desktop apps only]|
|Minimum supported server||Windows Server 2012 [desktop apps only]|