Microsoft DirectX 8.1 (C++) |
The SetOneShot method specifies whether the filter should stop the graph after receiving one sample.
Syntax
HRESULT SetOneShot(
BOOL OneShot
);
Parameters
OneShot
Boolean value specifying whether the filter should stop the graph after receiving one sample. If TRUE, the filter graph stops when the Sample Grabber receives the first sample and signals EC_COMPLETE. If FALSE, the filter graph continues to run normally.
Return Value
Returns S_OK.
Remarks
You can retrieve a sample at a particular time by calling this method with a value of TRUE, seeking to the desired time, and running the graph.
The Sample Grabber implements one-shot mode by calling IPin::EndOfStream on the downstream filter and returning S_FALSE from it's IMemInputPin::Receive method.
See Also