Microsoft DirectX 8.0

IVideoFrameStep Interface

Steps through a video stream. This interface enables Microsoft® DirectShow® applications, including DVD players, to step through a video stream as slowly as one frame at a time. Obtain the interface through the filter graph manager, which controls the frame stepping process in conjunction with the Overlay Mixer filter or the Video Renderer filter. Backward frame stepping is not supported.

Note   For frame stepping to work with a hardware decoder, the decoder must support the AM_KSPROPSETID_FrameStep property set.

Methods in Vtable Order

IUnknown methodsDescription
QueryInterface Retrieves pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.
IVideoFrameStep methodsDescription
Step Causes the filter graph to step forward by the specified number of frames.
CanStep Determines the stepping capabilities of the specified filter.
CancelStep Cancels the previous step operation.

IVideoFrameStep::CancelStep

IVideoFrameStep Interface

Cancels the previous Step operation.

Syntax

HRESULT CancelStep();

Return Value

Returns S_OK if the Step operation was successfully canceled, or E_FAIL otherwise.

IVideoFrameStep::CanStep

IVideoFrameStep Interface

Determines the stepping capabilities of the specified filter.

Syntax

HRESULT CanStep(
   long bMultiple,
   IUnknown *pStepObject
);

Parameters

bMultiple
If bMultiple is specified as 0 and the method returns S_OK, it means the object can step one frame at a time. If bMultiple if greater than 0, and the method returns S_OK, it means that pStepObject can step bMultiple frames at a time.
pStepObject
Pointer to an interface on the filter that will control the stepping operation. Specify NULL to instruct the Filter Graph Manager to perform frame stepping using the renderer filter for that particular filter graph. If the graph includes a custom filter that implements the frame stepping, then pStepObject should point to that filter's IBaseFilter interface.

Return Value

Returns S_OK if the object can step or E_INVALIDARG if pStepObject is invalid.

Remarks

The frames step in real time, which means that if the movie is playing at 30 frames per second, calling Step with bMultiple set to 60 would take 2 seconds to execute. All methods in this interface are asynchronous, so control returns to the application immediately.

IVideoFrameStep::Step

IVideoFrameStep Interface

Causes the filter graph to step forward by the specified number of frames.

Syntax

HRESULT Step(
   DWORD dwFrames,
   IUnknown *pStepObject
);

Parameters

dwFrames
Variable of type DWORD specifying the number of frames to skip. If dwFrames is 1, it means step one frame forward. If dwFrames == n and n is greater than 1, it means to skip n - 1 frames and show the nth frame.
pStepObject
Pointer to an interface on the filter that will control the stepping operation. Specify NULL to instruct the Filter Graph Manager to perform frame stepping using the renderer filter for that particular filter graph. If the graph includes a custom filter that implements the frame stepping, then pStepObject should point to that filter's IBaseFilter interface.

Return Value

Returns an HRESULT value. Possible values include the following.

S_OKSuccess.
VFW_E_FRAME_STEP_UNSUPPORTEDFrame stepping is not supported.
E_INVALIDARGThe pStepObject parameter is invalid.

Remarks

When the step operation is complete, this method sends an EC_STEP_COMPLETE event notification to the filter graph manager, which will pass it to the application's event loop and set the filter graph to a paused state.