CBaseVideoRenderer class
[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 CBaseVideoRenderer
base class is used for building video renderer filters.
Protected Data Members | 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 has dropped a frame. |
m_cFramesDrawn | Total number of frames that have been drawn since streaming started. |
m_cFramesDropped | Cumulative frames that have been 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 that is 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 just been dropped by the renderer. |
m_trDuration | Duration of the last frame (difference between the start and end times). |
m_trEarliness | How early a frame is allowed to be played when a frame has just 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 has been 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 | Description |
CBaseVideoRenderer | Constructs a CBaseVideoRenderer object. |
GetStdDev | Estimates the standard deviation in milliseconds between when each frame is due and when it is actually 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. |
Overridable Member Functions | Description |
JoinFilterGraph | Sends an EC_WINDOW_DESTROYED event 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. |
IQualProp Methods | Description |
get_Avg FrameRate | 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 actually 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 actually 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. |
IQualityControl Methods | Description |
Notify | Notifies the recipient that a quality change is requested. |
SetSink | Sets the IQualityControl object that will receive quality messages. |