CBaseVideoRenderer.ShouldDrawSampleNow method
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The ShouldDrawSampleNow
method determines if the video should be drawn without setting a timer advise link with the clock.
Syntax
virtual HRESULT ShouldDrawSampleNow(
IMediaSample *pMediaSample,
REFERENCE_TIME *ptrStart,
REFERENCE_TIME *ptrEnd
);
Parameters
-
pMediaSample
-
Pointer to the IMediaSample interface for the sample.
-
ptrStart
-
Pointer to the time to begin rendering.
-
ptrEnd
-
Pointer to the time to stop rendering.
Return value
Returns an HRESULT value. Returns S_OK to mean draw at once without waiting, S_FALSE to mean draw at time ptrStart, or an error to mean do not draw the sample; that is, skip it to save time.
Remarks
This member function overrides CBaseRenderer::ShouldDrawSampleNow.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|