Поделиться через


IVideoFrameStep::Step

 
Microsoft DirectShow 9.0

IVideoFrameStep::Step

The Step method causes the filter graph to step forward by the specified number of frames.

Syntax

  HRESULT Step(
  DWORD dwFrames,
  IUnknown *pStepObject
);

Parameters

dwFrames

Specifies the number of frames to skip. If dwFrames is 1, the graph steps forward one frame. If dwFrames is a number n greater than 1, the graph skips n - 1 frames and shows the nth frame.

pStepObject

Pointer to an interface on the filter that will control the stepping operation, or NULL. Specify NULL to perform the frame stepping using the renderer filter in the graph. If non-NULL, the object must implement the IKsPropertySet interface and support the AM_KSPROPSETID_FrameStep property. (For more information, see Frame Stepping Property Set.) If the graph includes a custom filter that implements the frame stepping, pStepObject can specify a pointer to that filter.

Return Values

Returns an HRESULT. Possible values include the following.

Value Description
S_OK Success.
VFW_E_FRAME_STEP_UNSUPPORTED Frame stepping is not supported.
E_INVALIDARG The 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.

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

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also