diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-02-10 12:02:03 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-02-10 15:21:45 +0100 |
commit | 56826a5ee6c45679fd4c3cc38fba6c5acc609d01 (patch) | |
tree | 86d3f5f77603c613aa2957f1b127327534f05148 /tests/check/gst/gstevent.c | |
parent | aa32e1fab16ab2808935bc2d755df2eeb0a1020f (diff) |
event: add QoS event type
Add a parameter to the QoS event to specify the QoS event type.
Update docs and add unit test.
See #638891
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); } |