diff options
Diffstat (limited to 'tests/check/gst/gstevent.c')
-rw-r--r-- | tests/check/gst/gstevent.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/check/gst/gstevent.c b/tests/check/gst/gstevent.c index 5a2ec2325c..8c0829aab4 100644 --- a/tests/check/gst/gstevent.c +++ b/tests/check/gst/gstevent.c @@ -138,6 +138,7 @@ GST_START_TEST (create_events) /* QOS */ { + GstQOSType t1 = GST_QOS_TYPE_THROTTLE, t2; gdouble p1 = 1.0, p2; GstClockTimeDiff ctd1 = G_GINT64_CONSTANT (10), ctd2; GstClockTime ct1 = G_GUINT64_CONSTANT (20), ct2; @@ -153,6 +154,25 @@ GST_START_TEST (create_events) fail_unless (p1 == p2); fail_unless (ctd1 == ctd2); fail_unless (ct1 == ct2); + gst_event_parse_qos_full (event, &t2, &p2, &ctd2, &ct2); + fail_unless (t2 == GST_QOS_TYPE_UNDERFLOW); + fail_unless (p1 == p2); + fail_unless (ctd1 == ctd2); + fail_unless (ct1 == ct2); + 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); + 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); + fail_unless (t2 == GST_QOS_TYPE_THROTTLE); + fail_unless (p1 == p2); + fail_unless (ctd1 == ctd2); + fail_unless (ct1 == ct2); gst_event_unref (event); } |