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. |
Informs the pin when to stop processing data and to discard any new samples.
Syntax
HRESULT StopAt( const REFERENCE_TIME* ptStop = NULL, BOOL bSendExtra = FALSE, DWORD dwCookie = 0 ); |
Parameters
- ptStop
-
REFERENCE_TIMEat 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 ptStoptime.
- dwCookie
-
Specifies a particular value to be sent with the notification when the stop occurs. (Only used if ptStartis not NULL or MAX_TIME.)
Return Value
Returns NOERROR.
Remarks
This member function implements the IAMStreamControl::StopAtmethod and is used by pins and filters that must support the stopping of streams.
It sets the StreamControlStateenumeration type to STREAM_DISCARDING.
In a video capture scenario, specify StopAton 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 bSendExtravariable 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
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 |