From: <bi...@ke...> - 2007-07-30 15:09:19
|
CVS Root: /cvs/gstreamer Module: gnonlin Changes by: bilboed Date: Mon Jul 30 2007 15:09:11 UTC Log message: * tests/check/common.h: Add a bigger function for creating a video source with specific media-start and media-duration. * tests/check/simple.c: (GST_START_TEST): Let's check with non-obvious media-start/duration sources. Modified files: . : ChangeLog tests/check : common.h simple.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gnonlin/ChangeLog.diff?r1=1.184&r2=1.185 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gnonlin/tests/check/common.h.diff?r1=1.4&r2=1.5 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gnonlin/tests/check/simple.c.diff?r1=1.18&r2=1.19 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gnonlin/ChangeLog,v retrieving revision 1.184 retrieving revision 1.185 diff -u -d -r1.184 -r1.185 --- ChangeLog 23 Jul 2007 16:45:03 -0000 1.184 +++ ChangeLog 30 Jul 2007 15:08:56 -0000 1.185 @@ -1,3 +1,11 @@ +2007-07-30 Edward Hervey <bi...@bi...> + + * tests/check/common.h: + Add a bigger function for creating a video source with specific + media-start and media-duration. + * tests/check/simple.c: (GST_START_TEST): + Let's check with non-obvious media-start/duration sources. 2007-07-23 Edward Hervey <bi...@bi...> * gnl/gnlcomposition.c: Index: common.h RCS file: /cvs/gstreamer/gnonlin/tests/check/common.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- common.h 16 Jun 2007 16:54:04 -0000 1.4 +++ common.h 30 Jul 2007 15:08:57 -0000 1.5 @@ -132,6 +132,24 @@ } static GstElement * +videotest_gnl_src_full (const gchar * name, guint64 start, gint64 duration, + guint64 mediastart, gint64 mediaduration, + gint pattern, guint priority) +{ + GstElement * gnls; + gnls = videotest_gnl_src (name, start, duration, pattern, priority); + if (gnls) { + g_object_set (G_OBJECT (gnls), + "media-start", mediastart, + "media-duration", mediaduration, + NULL); + } + return gnls; +} +static GstElement * videotest_in_bin_gnl_src (const gchar * name, guint64 start, gint64 duration, gint pattern, guint priority) { GstElement * gnlsource = NULL; Index: simple.c RCS file: /cvs/gstreamer/gnonlin/tests/check/simple.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- simple.c 16 Jun 2007 16:54:04 -0000 1.18 +++ simple.c 30 Jul 2007 15:08:57 -0000 1.19 @@ -86,9 +86,11 @@ Source 1 Start : 0s Duration : 1s + Media start : 5s + Media Duartion : 1s Priority : 1 */ - source1 = videotest_gnl_src ("source1", 0, 1 * GST_SECOND, 1, 1); + source1 = videotest_gnl_src_full ("source1", 0, 1 * GST_SECOND, 5 * GST_SECOND, 1 * GST_SECOND, 1, 1); fail_if (source1 == NULL); check_start_stop_duration(source1, 0, 1 * GST_SECOND, 1 * GST_SECOND); @@ -96,9 +98,13 @@ Source 2 Start : 1s + Media start : 2s + Media Duration : 1s - source2 = videotest_gnl_src ("source2", 1 * GST_SECOND, 1 * GST_SECOND, 2, 1); + source2 = videotest_gnl_src_full ("source2", 1 * GST_SECOND, 1 * GST_SECOND, + 2 * GST_SECOND, 1 * GST_SECOND, + 2, 1); fail_if (source2 == NULL); check_start_stop_duration(source2, 1 * GST_SECOND, 2 * GST_SECOND, 1 * GST_SECOND); @@ -145,10 +151,10 @@ /* Expected segments */ collect->expected_segments = g_list_append (collect->expected_segments, segment_new (1.0, GST_FORMAT_TIME, - 0, 1 * GST_SECOND, 0)); + 5 * GST_SECOND, 6 * GST_SECOND, 0)); - 1 * GST_SECOND, 2 * GST_SECOND, + 2 * GST_SECOND, 3 * GST_SECOND, 1 * GST_SECOND)); g_signal_connect (G_OBJECT (comp), "pad-added", @@ -203,10 +209,10 @@ 1 * GST_SECOND)); collect->gotsegment = FALSE; |