/**
* gst_event_new_qos:
- * @proportion: the proportion of the qos message
- * @diff: The time difference of the last Clock sync
- * @timestamp: The timestamp of the buffer
- *
- * Allocate a new qos event with the given values. This function calls
- * gst_event_new_qos_full() with the type set to #GST_QOS_TYPE_OVERFLOW
- * when diff is negative (buffers are in time) and #GST_QOS_TYPE_UNDERFLOW
- * when @diff is positive (buffers are late).
- *
- * Returns: (transfer full): a new QOS event.
- */
-GstEvent *
-gst_event_new_qos (gdouble proportion, GstClockTimeDiff diff,
- GstClockTime timestamp)
-{
- GstQOSType type;
-
- if (diff <= 0)
- type = GST_QOS_TYPE_OVERFLOW;
- else
- type = GST_QOS_TYPE_UNDERFLOW;
-
- return gst_event_new_qos_full (type, proportion, diff, timestamp);
-}
-
-/**
- * gst_event_new_qos_full:
* @type: the QoS type
* @proportion: the proportion of the qos message
* @diff: The time difference of the last Clock sync
* event and implement custom application specific QoS handling.
*
* Returns: (transfer full): a new QOS event.
- *
- * Since: 0.10.33
*/
GstEvent *
-gst_event_new_qos_full (GstQOSType type, gdouble proportion,
+gst_event_new_qos (GstQOSType type, gdouble proportion,
GstClockTimeDiff diff, GstClockTime timestamp)
{
GstEvent *event;
/**
* gst_event_parse_qos:
* @event: The event to query
- * @proportion: (out): A pointer to store the proportion in
- * @diff: (out): A pointer to store the diff in
- * @timestamp: (out): A pointer to store the timestamp in
- *
- * Get the proportion, diff and timestamp in the qos event. See
- * gst_event_new_qos() for more information about the different QoS values.
- */
-void
-gst_event_parse_qos (GstEvent * event, gdouble * proportion,
- GstClockTimeDiff * diff, GstClockTime * timestamp)
-{
- gst_event_parse_qos_full (event, NULL, proportion, diff, timestamp);
-}
-
-/**
- * gst_event_parse_qos_full:
- * @event: The event to query
* @type: (out): A pointer to store the QoS type in
* @proportion: (out): A pointer to store the proportion in
* @diff: (out): A pointer to store the diff in
* @timestamp: (out): A pointer to store the timestamp in
*
* Get the type, proportion, diff and timestamp in the qos event. See
- * gst_event_new_qos_full() for more information about the different QoS values.
- *
- * Since: 0.10.33
+ * gst_event_new_qos() for more information about the different QoS values.
*/
void
-gst_event_parse_qos_full (GstEvent * event, GstQOSType * type,
+gst_event_parse_qos (GstEvent * event, GstQOSType * type,
gdouble * proportion, GstClockTimeDiff * diff, GstClockTime * timestamp)
{
const GstStructure *structure;
gint64 *maxsize, gboolean *async);
/* QOS events */
-GstEvent* gst_event_new_qos (gdouble proportion, GstClockTimeDiff diff,
- GstClockTime timestamp);
-GstEvent* gst_event_new_qos_full (GstQOSType type, gdouble proportion,
+GstEvent* gst_event_new_qos (GstQOSType type, gdouble proportion,
GstClockTimeDiff diff, GstClockTime timestamp);
-void gst_event_parse_qos (GstEvent *event, gdouble *proportion, GstClockTimeDiff *diff,
- GstClockTime *timestamp);
-void gst_event_parse_qos_full (GstEvent *event, GstQOSType *type,
+void gst_event_parse_qos (GstEvent *event, GstQOSType *type,
gdouble *proportion, GstClockTimeDiff *diff,
GstClockTime *timestamp);
/* seek event */
"qos: type %d, proportion: %lf, diff %" G_GINT64_FORMAT ", timestamp %"
GST_TIME_FORMAT, type, proportion, diff, GST_TIME_ARGS (time));
- event = gst_event_new_qos_full (type, proportion, diff, time);
+ event = gst_event_new_qos (type, proportion, diff, time);
/* send upstream */
res = gst_pad_push_event (basesink->sinkpad, event);
GstClockTimeDiff diff;
GstClockTime timestamp;
- gst_event_parse_qos (event, &proportion, &diff, ×tamp);
+ gst_event_parse_qos (event, NULL, &proportion, &diff, ×tamp);
gst_base_src_update_qos (src, proportion, diff, timestamp);
result = TRUE;
break;
GstClockTimeDiff diff;
GstClockTime timestamp;
- gst_event_parse_qos (event, &proportion, &diff, ×tamp);
+ gst_event_parse_qos (event, NULL, &proportion, &diff, ×tamp);
gst_base_transform_update_qos (trans, proportion, diff, timestamp);
break;
}
GstClockTimeDiff ctd1 = G_GINT64_CONSTANT (10), ctd2;
GstClockTime ct1 = G_GUINT64_CONSTANT (20), ct2;
- event = gst_event_new_qos (p1, ctd1, ct1);
+ event = gst_event_new_qos (t1, p1, ctd1, ct1);
fail_if (event == NULL);
fail_unless (GST_EVENT_TYPE (event) == GST_EVENT_QOS);
fail_unless (GST_EVENT_IS_UPSTREAM (event));
fail_if (GST_EVENT_IS_DOWNSTREAM (event));
fail_if (GST_EVENT_IS_SERIALIZED (event));
- gst_event_parse_qos (event, &p2, &ctd2, &ct2);
+ gst_event_parse_qos (event, &t2, &p2, &ctd2, &ct2);
fail_unless (p1 == p2);
fail_unless (ctd1 == ctd2);
fail_unless (ct1 == ct2);
- gst_event_parse_qos_full (event, &t2, &p2, &ctd2, &ct2);
+ gst_event_parse_qos (event, &t2, &p2, &ctd2, &ct2);
fail_unless (t2 == GST_QOS_TYPE_UNDERFLOW);
fail_unless (p1 == p2);
fail_unless (ctd1 == ctd2);
gst_event_unref (event);
ctd1 = G_GINT64_CONSTANT (-10);
- event = gst_event_new_qos (p1, ctd1, ct1);
- gst_event_parse_qos_full (event, &t2, &p2, &ctd2, &ct2);
+ event = gst_event_new_qos (t1, p1, ctd1, ct1);
+ gst_event_parse_qos (event, &t2, &p2, &ctd2, &ct2);
fail_unless (t2 == GST_QOS_TYPE_OVERFLOW);
gst_event_unref (event);
- event = gst_event_new_qos_full (t1, p1, ctd1, ct1);
- gst_event_parse_qos_full (event, &t2, &p2, &ctd2, &ct2);
+ event = gst_event_new_qos (t1, p1, ctd1, ct1);
+ gst_event_parse_qos (event, &t2, &p2, &ctd2, &ct2);
fail_unless (t2 == GST_QOS_TYPE_THROTTLE);
fail_unless (p1 == p2);
fail_unless (ctd1 == ctd2);