Skip to content

Latest commit

 

History

History
98 lines (58 loc) · 2.8 KB

cbasevideorenderer-shoulddrawsamplenow.md

File metadata and controls

98 lines (58 loc) · 2.8 KB
description ms.assetid title ms.topic ms.date topic_type api_name api_type api_location ms.custom
The ShouldDrawSampleNow method determines if the video should be drawn without setting a timer advise link with the clock.
2cbefc66-0d99-4559-b210-3163cd413dbf
CBaseVideoRenderer.ShouldDrawSampleNow method (Renbase.h)
reference
4/26/2023
APIRef
kbSyntax
CBaseVideoRenderer.ShouldDrawSampleNow
COM
Strmbase.lib
Strmbase.dll
Strmbasd.lib
Strmbasd.dll
UpdateFrequency5

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
Renbase.h (include Streams.h)
Library
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CBaseVideoRenderer Class