Microsoft DirectX 9.0 |
Quality messages are defined with the Quality structure. This structure contains the following members:
For example, suppose that a sample with a time stamp of 240 milliseconds (ms) reaches the renderer at 280 ms, stream time. The renderer creates a quality message of type Famine. The sample arrived 40 ms late, so the Late member is 400000. (All reference times are in 100-nanosecond units.) The TimeStamp member is 2400000.
For the Proportion member, the renderer might use a running average to calculate the value. Perhaps samples have been arriving on time, and this sample is an anomaly. In that case the renderer might request only a small correction. On the other hand, if samples are consistently late, the renderer might request a larger correction.
Quality control is handled through the IQualityControl interface. It contains two methods.
An object that implements IQualityControl receives quality messages through its Notify method. It can either handle the message or pass the message to another object. If the application calls the object's SetSink method, the object should delegate quality control to the specified quality manager.