다음을 통해 공유


CBaseStreamControl::StopAt (Windows CE 5.0)

Send Feedback

Informs the pin when to stop processing data and to discard any new samples.

HRESULT StopAt(const REFERENCE_TIME* ptStop= NULL,BOOLbSendExtra= FALSE,DWORDdwCookie= 0 );

Parameters

  • ptStop
    REFERENCE_TIME at which to stop streaming. If NULL, stop immediately (no notification). If MAX_TIME, cancels stop.
  • bSendExtra
    Indicates whether to send an extra sample after scheduled ptStop time.
  • dwCookie
    Specifies a particular value to be sent with the notification when the stop occurs. (Only used if ptStart is not NULL or MAX_TIME.)

Return Values

Returns NOERROR.

Remarks

This member function implements the IAMStreamControl::StopAt method and is used by pins and filters that must support the stopping of streams.

It sets the StreamControlState enumeration type to STREAM_DISCARDING.

In a video capture scenario, specify StopAt on both the output pin of a capture filter and an input pin of a multiplexer and have the multiplexer send notification of completion. This ensures that the capture filter does not capture extra frames and also guarantees that the multiplexer has written the last frame to disk.

In addition, the capture output pin should specify TRUE for the bSendExtra variable while all other pins specify FALSE.

If an extra frame is not sent the multiplexer waits for the stop time indefinitely and does not realize it has received all capture information.

Note   If a stop time is given in the middle of a packet, the filter delivers 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.

Requirements

DirectShow applications and DirectShow filters have different include file and link library requirements.

For more information, see Setting Up the Build Environment.

OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Header:

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.