次の方法で共有


CBaseVideoRenderer Class (Compact 2013)

3/26/2014

Ee493969.6e4f79e5-6811-4072-8963-7c68b98bb992(en-us,WinEmbedded.80).gif

This base class is used for building video renderer filters.

Protected Data Members

Member

Description

m_bDrawLateFrames

Flag to signal that no frames are to be dropped.

Debug only.

This destroys synchronization.

m_bSupplierHandlingQuality

TRUE indicates quality control messages are being handled.

This lets the renderer know to wait until as late as possible to drop frames itself, and to display the next frame very early after the supplier drops a frame.

m_cFramesDrawn

Total number of frames drawn since streaming started.

m_cFramesDropped

Cumulative frames dropped in the renderer since streaming started.

Frames can also be dropped upstream without the renderer recognizing them.

m_idDecision

MSR_id for the decision code of ShouldDrawSampleNow.

m_idDuration

MSR_id for the duration of a frame.

m_idFrameAccuracy

Performance log identifier for the time (in milliseconds) that the frame was late.

m_idFrameAvg

Performance log identifier for the average frame time used for synchronization and quality control.

m_idQualityRate

MSR_id for the quality rate requested.

m_idQualityTime

MSR_id for the quality time requested.

m_idRenderAvg

Performance log identifier for the average renderer time recorded.

m_idSchLateTime

MSR_id for how late the frame was when scheduled.

m_idSendQuality

MSR_id for timing the notifications (unused).

m_idTimeStamp

MSR_id for a frame time stamp.

m_idWait

Performance log identifier for the recorded wait time (unused).

m_idWaitReal

Performance log identifier for the true wait time.

m_iSumFrameTime

Sum of the interframe times; needed for the property page.

m_iSumSqAcc

Sum of the squares of the accuracies (in milliseconds) needed for the property page.

m_iSumSqFrameTime

Sum of the squares of interframe times; needed for the property page.

m_iTotAcc

Sum of the accuracies (in milliseconds) needed for the property page.

m_nNormal

Number of consecutive frames drawn at their scheduled time.

A negative number indicates that a frame has been dropped by the renderer.

m_trDuration

Duration of the last frame (difference between start and end times).

m_trEarliness

How early a frame is allowed to be played when a frame has been dropped.

m_trFrame

Most recently recorded time between frames.

Used in statistical measurements.

m_trFrameAvg

Average interframe time in reference time units.

m_trLastDraw

Time of previous frame.

Used for interframe time references.

m_trLate

Amount of time that the current frame was late.

Used in statistical measurements.

m_trRenderAvg

Time that frames are taking to perform the bit-block transfer.

m_trRenderLast

Time for the last frame bit-block transfer.

m_trRenderStart

Time the bit-block transfer started.

Used to get m_trRenderLast.

m_trThrottle

Period to insert after rendering each frame. Typically used when audio quality is increased and video performance must be decreased to allow this.

m_trWaitAvg

Average wait time in reference time units.

m_tStreamingStart

Used for property page statistics.

Represents the start time of the current streaming process or the previous streaming process if not currently streaming.

Member Functions

Member function

Description

CBaseVideoRenderer

Constructs a CBaseVideoRenderer object.

GetStdDev

Estimates the standard deviation in milliseconds between when each frame is due and when it is rendered, for per-frame statistics.

PreparePerformanceData

Sets the m_trLate and m_trFrame values of the current frame.

ThrottleWait

Inserts a wait period after each frame.

Overrideable Member Functions

Member function

Description

JoinFilterGraph

Sends EC_WINDOW_DESTROYED event notification when filter is removed from the filter graph.

OnDirectRender

Collects timing information that controls synchronization and quality control.

OnRenderEnd

Records information for quality control and synchronization.

OnRenderStart

Records information for quality control and synchronization.

OnStartStreaming

Resets all times that control streaming.

OnStopStreaming

Called at the end of streaming to fix times for the property page report.

OnWaitEnd

Called when a wait time ends. Performance logging only.

OnWaitStart

Updates times spent waiting and not waiting. Performance logging only.

RecordFrameLateness

Records how timely the rendering occurred and gathers statistics for the property page.

ResetStreamingTimes

Resets all times that control the streaming.

ScheduleSample

Sets up an advise link with the clock.

SendQuality

Sends a quality message to indicate what the supplier should do about quality.

ShouldDrawSampleNow

Determines if the video should be drawn when it is due, without setting a timer advise link with the clock.

Implemented IQualProp Methods

Method

Description

get_AvgFrameRate

Retrieves the average frame rate since streaming started in frames per 100 seconds.

get_AvgSyncOffset

Retrieves the average of the time in milliseconds between when each frame was due and when it was rendered. This applies to all frames since streaming started.

get_DevSyncOffset

Retrieves the standard deviation of the time in milliseconds between when each frame was due and when it was rendered for all frames since streaming started.

get_FramesDrawn

Retrieves the number of frames drawn since streaming started.

get_FramesDroppedInRenderer

Retrieves the number of frames dropped by the renderer. Frames can also be dropped upstream.

get_Jitter

Retrieves the standard deviation of the time in milliseconds between each frame and the next. This applies to all frames since streaming started.

Implemented INonDelegatingUnknown Methods

Method

Description

NonDelegatingQueryInterface

Provides access to other interfaces, particularly the property page.

Implemented IQualityControl Methods

Method

Description

Notify

Notifies the recipient that a quality change is requested.

SetSink

Sets the IQualityControl object that will receive quality messages.

Requirements

Header

dshow.h,
Streams.h

Library

ole32.lib,
Ole32auth.lib,
Strmbase.lib,
Strmiids.lib,
uuid.lib

See Also

Reference

DirectShow Classes