CBaseRenderer::ShouldDrawSampleNow

 
Microsoft DirectShow 9.0

CBaseRenderer::ShouldDrawSampleNow

The ShouldDrawSampleNow method determines how a sample is scheduled for rendering.

Syntax

  virtual HRESULT ShouldDrawSampleNow(
    IMediaSample *pMediaSample,
    REFERENCE_TIME *pStartTime,
    REFERENCE_TIME *pEndTime
);

Parameters

pMediaSample

Pointer to the sample's IMediaSample interface.

pStartTime

Pointer to a variable that contains the sample's start time.

pEndTime

Pointer to a variable that contains the sample's end time.

Return Value

Returns S_FALSE. If the derived class overrides this method, return one of the values shown in the following table.

Value Description
S_OK The sample should be rendered immediately.
S_FALSE The sample should be scheduled for rendering, based on the time stamps.
Error code Do not render this sample.

Remarks

The CBaseRenderer::GetSampleTimes method calls this method. By default, samples are always scheduled for rendering based on their time stamps. The derived class can override this method; for example, to implement quality control.

Requirements

**  Header:** Declared in Renbase.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

See Also