diff options
author | Jan Schmidt <thaytan@noraisin.net> | 2009-11-15 17:34:37 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2009-11-18 00:10:57 +0000 |
commit | 36711ab47711ffd8db998edb1fb0a15972d3289c (patch) | |
tree | 6f466b07c8e640faa58adb045efe90d3006df978 /tests | |
parent | c4d7dbce1a032305005620b160be7606e8ad84d3 (diff) |
video: Add functions to create/parse still frame events.
Add a new video event to mark the start or end of a still-frame
sequence, and a parser function to identify and extract info from
such events.
API: gst_video_event_new_still_frame()
API: gst_video_event_parse_still_frame()
Fixes: #601942
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check/libs/video.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/check/libs/video.c b/tests/check/libs/video.c index ad6b2f89b..56e9f5f71 100644 --- a/tests/check/libs/video.c +++ b/tests/check/libs/video.c @@ -554,6 +554,32 @@ GST_START_TEST (test_parse_caps_rgb) GST_END_TEST; +GST_START_TEST (test_events) +{ + GstEvent *e; + gboolean in_still; + + e = gst_video_event_new_still_frame (TRUE); + fail_if (e == NULL, "Failed to create still frame event"); + fail_unless (gst_video_event_parse_still_frame (e, &in_still), + "Failed to parse still frame event"); + fail_unless (gst_video_event_parse_still_frame (e, NULL), + "Failed to parse still frame event w/ in_still == NULL"); + fail_unless (in_still == TRUE); + gst_event_unref (e); + + e = gst_video_event_new_still_frame (FALSE); + fail_if (e == NULL, "Failed to create still frame event"); + fail_unless (gst_video_event_parse_still_frame (e, &in_still), + "Failed to parse still frame event"); + fail_unless (gst_video_event_parse_still_frame (e, NULL), + "Failed to parse still frame event w/ in_still == NULL"); + fail_unless (in_still == FALSE); + gst_event_unref (e); +} + +GST_END_TEST; + static Suite * video_suite (void) { @@ -564,6 +590,7 @@ video_suite (void) tcase_add_test (tc_chain, test_video_formats); tcase_add_test (tc_chain, test_dar_calc); tcase_add_test (tc_chain, test_parse_caps_rgb); + tcase_add_test (tc_chain, test_events); return s; } |