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.
HRESULT StopAt( const REFERENCE_TIME * ptStop = NULL, BOOL bSendExtra = FALSE, DWORD dwCookie = 0 );
Parameters
Return Values
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 doesn't needlessly capture extra frames, while also guaranteeing 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 will end up waiting for the stop time indefinitely and not realize it already has received all the capture information.
Note If a stop time is given 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.