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

This method informs the pin when to suspend processing and supplying data.

Syntax

HRESULT StopAt(
  const REFERENCE_TIME* 
ptStop,
  BOOL 
bSendExtra,
  DWORD 
dwCookie
);

Parameters

ptStop

[in] Time at which to stop streaming as specified in the REFERENCE_TIMEstructure. If you specify NULL for ptStop, it will stop immediately (no notification); if MAX_TIME, cancels stop.

bSendExtra

[in] Indicates whether to send an extra sample after scheduled ptStoptime.

dwCookie

[in] Specifies a particular value to send with the notification when the stop occurs (used only if ptStartif not NULL or MAX_TIME).

Return Value

Returns an HRESULTvalue that depends on the implementation of the interface.

Remarks

This method is exposed by pins that support the stopping of streams. It sets the StreamControlStateenumeration type to STREAM_DISCARDING.

In video capture, you would typically call StopAton both the output pin of a capture filter and the input pin of a multiplexer, and pay attention only to the notification from the multiplexer. This ensures that the capture filter does not needlessly capture extra frames, while guaranteeing that the multiplexer has, in fact, saved the last frame to a file.

In addition, you should specify TRUE for the bSendExtraparameter on the capture pin, and specify FALSE to the multiplexer pin. If an extra frame is not sent, the multiplexer will wait for the stop time indefinitely and not realize it already has received all the capture information. The multiplexer will discard the extra sample sent by the capture pin, so it will not get written to the file. Do not set bSendExtrato TRUE unless you also use IAMStreamControlon another downstream pin too, like in the preceding case.

If you call StopAtwith a time that is in the middle of a packet, the filter will deliver the whole packet before going into a discarding state. Also, if start and stop are scheduled for a single point in time, the effect is as if the start occurred an infinitesimal time before the stop. You can use this effect to capture a single frame (see CBaseStreamControlfor an implementation example).

Requirements

Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment,
Version 2.12 requires DXPAK 1.0 or later