# Gst::EventQos Class Reference

A QOS event. More...

Inherits Gst::Event.

Collaboration diagram for Gst::EventQos:
[legend]

List of all members.

## Public Member Functions

| EventQos (GstEvent* event)
void | parse (double& proportion, ClockTimeDiff& diff, ClockTime& timestamp) const
| Get the proportion, diff and timestamp in the qos event.
double | parse () const
| Get the proportion in the qos event.
ClockTimeDiff | parse_diff () const
| Get the diff in the qos event.
ClockTime | parse_timestamp () const
| Get the timestamp in the qos event.

## Static Public Member Functions

static Glib::RefPtr< Gst::Event > | create (double proportion, ClockTimeDiff diff, ClockTime timestamp)
| Allocate a new qos event with the given values.

## Detailed Description

A QOS event.

See create() for more details.

## Constructor & Destructor Documentation

Gst::EventQos::EventQos | ( | GstEvent * | event | ) | `[explicit]`

## Member Function Documentation

static Glib::RefPtr<Gst::Event> Gst::EventQos::create | ( | double | proportion,
|  | ClockTimeDiff | diff,
|  | ClockTime | timestamp |
| ) |  |  | `[static]`

Allocate a new qos event with the given values.

The QOS event is generated in an element that wants an upstream element to either reduce or increase its rate because of high/low CPU load or other resource usage such as network performance. Typically sinks generate these events for each buffer they receive.

proportion indicates the real-time performance of the streaming in the element that generated the QoS event (usually the sink). The value is generally computed based on more long term statistics about the streams timestamps compared to the clock. A value < 1.0 indicates that the upstream element is producing data faster than real-time. A value > 1.0 indicates that the upstream element is not producing data fast enough. 1.0 is the ideal proportion value. The proportion value can safely be used to lower or increase the quality of the element.

diff is the difference against the clock in running time of the last buffer that caused the element to generate the QOS event. A negative value means that the buffer with timestamp arrived in time. A positive value indicates how late the buffer with timestamp was.

timestamp is the timestamp of the last buffer that cause the element to generate the QOS event. It is expressed in running time and thus an ever increasing value.

The upstream element can use the diff and timestamp values to decide whether to process more buffers. For possitive diff, all buffers with timestamp <= timestamp + diff will certainly arrive late in the sink as well.

The application can use general event probes to intercept the QoS event and implement custom application specific QoS handling.

Parameters:

  | proportion | The proportion of the qos message.
  | diff | The time difference of the last clock sync.
  | timestamp | The timestamp of the buffer.

Returns:
  A new QOS event.

void Gst::EventQos::parse | ( | double & | proportion,
|  | ClockTimeDiff& | diff,
|  | ClockTime& | timestamp |
| ) |  |  | const

Get the proportion, diff and timestamp in the qos event.

See create() for more information about the different QoS values.

Parameters:

  | proportion | A reference to store the proportion in.
  | diff | A reference to store the diff in.
  | timestamp | A reference to store the timestamp in.

double Gst::EventQos::parse | ( |  | ) | const

Get the proportion in the qos event.

See create() for more information about the different QoS values.

Returns:
  The proportion.

ClockTimeDiff Gst::EventQos::parse_diff | ( |  | ) | const

Get the diff in the qos event.

See create() for more information about the different QoS values.

Returns:
  The difference.

ClockTime Gst::EventQos::parse_timestamp | ( |  | ) | const

Get the timestamp in the qos event.

See create() for more information about the different QoS values.

Returns:
  The timestamp.

The documentation for this class was generated from the following file:

- gstreamermm/event.h