|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gstreamer.lowlevel.NativeValue
org.gstreamer.lowlevel.Handle
org.gstreamer.lowlevel.NativeObject
org.gstreamer.lowlevel.RefCountedObject
org.gstreamer.MiniObject
org.gstreamer.Event
org.gstreamer.event.QOSEvent
public class QOSEvent
A quality message. Used to indicate to upstream elements that the downstream elements are being starved of or flooded with data.
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.gstreamer.lowlevel.NativeObject |
---|
NativeObject.Initializer |
Field Summary |
---|
Fields inherited from class org.gstreamer.lowlevel.NativeObject |
---|
defaultInit, LIFECYCLE, ownsHandle |
Constructor Summary | |
---|---|
QOSEvent(double proportion,
long difference,
ClockTime timestamp)
Creates a new quality-of-service event. |
|
QOSEvent(NativeObject.Initializer init)
This constructor is for internal use only. |
Method Summary | |
---|---|
long |
getDifference()
Gets the difference value of this event. |
double |
getProportion()
Gets the proportion value of this event. |
ClockTime |
getTimestamp()
Gets the timestamp from this event. |
Methods inherited from class org.gstreamer.Event |
---|
getStructure |
Methods inherited from class org.gstreamer.MiniObject |
---|
disposeNativeHandle, isWritable, makeWritable, objectFor, ref, unref |
Methods inherited from class org.gstreamer.lowlevel.NativeObject |
---|
classFor, disown, dispose, equals, finalize, getNativeAddress, handle, hashCode, initializer, initializer, instanceFor, invalidate, isDisposed, nativeValue, objectFor, objectFor, toString |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QOSEvent(NativeObject.Initializer init)
init
- initialization data.public QOSEvent(double proportion, long difference, ClockTime timestamp)
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.
difference 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 positive difference, all buffers with timestamp <= timestamp + difference 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.
proportion
- the proportion of the qos messagedifference
- the time difference of the last Clock synctimestamp
- the timestamp of the bufferMethod Detail |
---|
public double getProportion()
The 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.
public long getDifference()
This 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.
public ClockTime getTimestamp()
This is the timestamp of the last buffer that caused the element to generate the QOS event. It is expressed in running time and thus an ever increasing value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |