summaryrefslogtreecommitdiff
path: root/tests/check/gst/gstevent.c
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2013-01-06 20:27:54 +0000
committerTim-Philipp Müller <tim@centricular.net>2013-03-31 11:47:40 +0100
commit0e5c1dcf6468d388543c310c12fcf95fdd16d08d (patch)
treed0d35b52001ae4afea24fff634c68ac341071d65 /tests/check/gst/gstevent.c
parentdd831b811421b3d7b6769a78ef0a29351e64ca66 (diff)
event: add stream flags to stream-start event
API: gst_event_set_stream_flags() API: gst_event_parse_stream_flags() API: GST_STREAM_FLAG_NONE API: GST_STREAM_FLAG_SPARSE https://bugzilla.gnome.org/show_bug.cgi?id=600648
Diffstat (limited to 'tests/check/gst/gstevent.c')
-rw-r--r--tests/check/gst/gstevent.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/check/gst/gstevent.c b/tests/check/gst/gstevent.c
index 7b3393b2e5..7aae693ccd 100644
--- a/tests/check/gst/gstevent.c
+++ b/tests/check/gst/gstevent.c
@@ -198,6 +198,27 @@ GST_START_TEST (create_events)
gst_event_unref (event);
}
+ /* STREAM_START */
+ {
+ GstStreamFlags flags = ~GST_STREAM_FLAG_NONE;
+
+ event = gst_event_new_stream_start ("7f4b2f0/audio_02");
+ fail_if (event == NULL);
+ fail_unless (GST_EVENT_TYPE (event) == GST_EVENT_STREAM_START);
+ fail_if (GST_EVENT_IS_UPSTREAM (event));
+ fail_unless (GST_EVENT_IS_DOWNSTREAM (event));
+ fail_unless (GST_EVENT_IS_SERIALIZED (event));
+ gst_event_parse_stream_flags (event, &flags);
+ fail_unless_equals_int (flags, GST_STREAM_FLAG_NONE);
+ gst_event_set_stream_flags (event, GST_STREAM_FLAG_SPARSE);
+ gst_event_parse_stream_flags (event, &flags);
+ fail_unless_equals_int (flags, GST_STREAM_FLAG_SPARSE);
+ gst_event_ref (event);
+ ASSERT_CRITICAL (gst_event_set_stream_flags (event, GST_STREAM_FLAG_NONE));
+ gst_event_unref (event);
+ gst_event_unref (event);
+ }
+
/* NAVIGATION */
{
structure = gst_structure_new ("application/x-gst-navigation", "event",