// If the Frame Stepping interface exists, use it to step frames
if (pFS)
{
// The renderer may not support frame stepping for more than one
// frame at a time, so check for support. S_OK indicates that the
// renderer can step nFramesToStep successfully.
if ((hr = pFS->CanStep(dwFrames, NULL)) == S_OK)
{
// The graph must be paused for frame stepping to work
if (g_psCurrent != Paused)
Pause();
// Step the requested number of frames, if supported
hr = pFS->Step(dwFrames, NULL);
}
}
return hr;
}
请安装DXSDK8.1
HRESULT CPlayInterface::SetPlayRate(double dRate)
{
HRESULT hr=S_OK;
if(dRate==0) return S_OK;
// If the IMediaPosition interface exists, use it to set rate
IMediaPosition *pMP;
JIF(pGB->QueryInterface(IID_IMediaPosition, (void **)&pMP));
if (pMP)
{
JIF(pMP->put_Rate(dRate));
}
SAFE_RELEASE(pMP);