gstreamer_core/tsrc/check/gst/gstsystemclock/src/gstsystemclock.c
changeset 2 5505e8908944
child 8 4a7fac7dd34a
equal deleted inserted replaced
1:4c282e7dd6d3 2:5505e8908944
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
       
     3 *
       
     4 * This library is free software; you can redistribute it and/or
       
     5 * modify it under the terms of the GNU Lesser General Public
       
     6 * License as published by the Free Software Foundation; either
       
     7 * version 2 of the License, or (at your option) any later version.
       
     8 *
       
     9 * This library is distributed in the hope that it will be useful,
       
    10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    12 * Lesser General Public License for more details.
       
    13 *
       
    14 * You should have received a copy of the GNU Lesser General Public
       
    15 * License along with this library; if not, write to the
       
    16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       
    17 * Boston, MA 02111-1307, USA.
       
    18 *
       
    19 * Description:
       
    20 *
       
    21 */
       
    22 
       
    23 /* GStreamer
       
    24  * Copyright (C) 2005 Wim Taymans <wim@fluendo.com>
       
    25  *
       
    26  * gstsystemclock.c: Unit test for GstSystemClock
       
    27  *
       
    28  * This library is free software; you can redistribute it and/or
       
    29  * modify it under the terms of the GNU Library General Public
       
    30  * License as published by the Free Software Foundation; either
       
    31  * version 2 of the License, or (at your option) any later version.
       
    32  *
       
    33  * This library is distributed in the hope that it will be useful,
       
    34  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    35  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    36  * Library General Public License for more details.
       
    37  *
       
    38  * You should have received a copy of the GNU Library General Public
       
    39  * License along with this library; if not, write to the
       
    40  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       
    41  * Boston, MA 02111-1307, USA.
       
    42  */
       
    43 
       
    44 
       
    45 #include <gst/gst_global.h>
       
    46 #include <gst/check/gstcheck.h>
       
    47 
       
    48 #define LOG_FILE "c:\\logs\\gstsystemclock_logs.txt" 
       
    49 #include "std_log_result.h" 
       
    50 #define LOG_FILENAME_LINE __FILE__, __LINE__
       
    51 
       
    52 //char* xmlfile = "gstsystemclock";
       
    53 
       
    54 void create_xml(int result)
       
    55 {
       
    56     if(result)
       
    57         assert_failed = 1;
       
    58     
       
    59     testResultXml(xmlfile);
       
    60     close_log_file();
       
    61 }
       
    62 
       
    63 
       
    64 /* see if the defines make sense */
       
    65 void test_range()
       
    66 {
       
    67   GstClockTime time, time2;
       
    68   
       
    69   xmlfile = "test_range";
       
    70   std_log(LOG_FILENAME_LINE, "Test Started test_range");
       
    71 
       
    72   time = GST_SECOND;
       
    73   fail_unless (time == G_GUINT64_CONSTANT (1000000000));
       
    74   
       
    75 
       
    76   time2 = time / 1000;
       
    77   fail_unless (time2 == 1000000);
       
    78   
       
    79   fail_unless (time2 == GST_MSECOND);
       
    80   
       
    81   fail_unless (time2 == GST_TIME_AS_USECONDS (time));
       
    82   
       
    83 
       
    84   time2 = time / 1000000;
       
    85   fail_unless (time2 == 1000);
       
    86   
       
    87   fail_unless (time2 == GST_USECOND);
       
    88   
       
    89   fail_unless (time2 == GST_TIME_AS_MSECONDS (time));
       
    90   
       
    91   
       
    92   std_log(LOG_FILENAME_LINE, "Test Successful");
       
    93   create_xml(0);
       
    94 }
       
    95 
       
    96 
       
    97 #define TIME_UNIT (GST_SECOND / 5)
       
    98 static void
       
    99 gst_clock_debug (GstClock * clock)
       
   100 {
       
   101   GstClockTime time;
       
   102 
       
   103   time = gst_clock_get_time (clock);
       
   104   GST_DEBUG ("Clock info: time %" GST_TIME_FORMAT, GST_TIME_ARGS (time));
       
   105 }
       
   106 
       
   107 static gboolean
       
   108 ok_callback (GstClock * clock, GstClockTime time,
       
   109     GstClockID id, gpointer user_data)
       
   110 {
       
   111   GST_LOG ("unlocked async id %p", id);
       
   112   return FALSE;
       
   113 }
       
   114 
       
   115 static gboolean
       
   116 error_callback (GstClock * clock, GstClockTime time,
       
   117     GstClockID id, gpointer user_data)
       
   118 {
       
   119   GST_WARNING ("unlocked unscheduled async id %p, this is wrong", id);
       
   120   fail_if (TRUE);
       
   121 
       
   122   return FALSE;
       
   123 }
       
   124 
       
   125 static gboolean
       
   126 store_callback (GstClock * clock, GstClockTime time,
       
   127     GstClockID id, gpointer user_data)
       
   128 {
       
   129   GList **list = user_data;
       
   130 
       
   131   GST_DEBUG ("unlocked async id %p", id);
       
   132   *list = g_list_append (*list, id);
       
   133   return FALSE;
       
   134 }
       
   135 
       
   136 static gboolean
       
   137 notify_callback (GstClock * clock, GstClockTime time,
       
   138     GstClockID id, gpointer user_data)
       
   139 {
       
   140   gboolean *ret = (gboolean *) user_data;
       
   141 
       
   142   if (ret != NULL)
       
   143     *ret = TRUE;
       
   144 
       
   145   return FALSE;
       
   146 }
       
   147 
       
   148 void test_single_shot()
       
   149 {
       
   150   GstClock *clock;
       
   151   GstClockID id, id2;
       
   152   GstClockTime base;
       
   153   GstClockReturn result;
       
   154   
       
   155 	xmlfile = "test_single_shot";
       
   156   std_log(LOG_FILENAME_LINE, "Test Started test_single_shot");
       
   157 
       
   158   clock = gst_system_clock_obtain ();
       
   159   fail_unless (clock != NULL, "Could not create instance of GstSystemClock");
       
   160   
       
   161 
       
   162   gst_clock_debug (clock);
       
   163   base = gst_clock_get_time (clock);
       
   164 
       
   165   id = gst_clock_new_single_shot_id (clock, base + TIME_UNIT);
       
   166   fail_unless (id != NULL, "Could not create single shot id");
       
   167   
       
   168 
       
   169   GST_DEBUG ("waiting one time unit");
       
   170   result = gst_clock_id_wait (id, NULL);
       
   171   gst_clock_debug (clock);
       
   172   fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK (result=%d)",
       
   173       result);
       
   174   
       
   175   fail_unless (gst_clock_get_time (clock) > (base + TIME_UNIT),
       
   176       "target time has not been reached");
       
   177       
       
   178 
       
   179   GST_DEBUG ("waiting in the past");
       
   180   result = gst_clock_id_wait (id, NULL);
       
   181   gst_clock_debug (clock);
       
   182   fail_unless (result == GST_CLOCK_EARLY,
       
   183       "Waiting did not return EARLY(result=%d)", result);
       
   184       
       
   185   gst_clock_id_unref (id);
       
   186 
       
   187   id = gst_clock_new_single_shot_id (clock, base + 2 * TIME_UNIT);
       
   188   GST_DEBUG ("waiting one second async id %p", id);
       
   189   result = gst_clock_id_wait_async (id, ok_callback, NULL);
       
   190   gst_clock_id_unref (id);
       
   191   fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
       
   192   
       
   193   g_usleep (TIME_UNIT / (2 * 1000));
       
   194 
       
   195   id = gst_clock_new_single_shot_id (clock, base + 5 * TIME_UNIT);
       
   196   GST_DEBUG ("waiting one second async, with cancel on id %p", id);
       
   197   result = gst_clock_id_wait_async (id, error_callback, NULL);
       
   198   fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
       
   199   
       
   200   g_usleep (TIME_UNIT / (2 * 1000));
       
   201   GST_DEBUG ("cancel id %p after half a time unit", id);
       
   202   gst_clock_id_unschedule (id);
       
   203   gst_clock_id_unref (id);
       
   204   GST_DEBUG ("canceled id %p", id);
       
   205 
       
   206   GST_DEBUG ("waiting multiple one second async, with cancel");
       
   207   id = gst_clock_new_single_shot_id (clock, base + 5 * TIME_UNIT);
       
   208   id2 = gst_clock_new_single_shot_id (clock, base + 6 * TIME_UNIT);
       
   209   GST_DEBUG ("waiting id %p", id);
       
   210   result = gst_clock_id_wait_async (id, ok_callback, NULL);
       
   211   fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
       
   212   
       
   213   gst_clock_id_unref (id);
       
   214   GST_DEBUG ("waiting id %p", id2);
       
   215   result = gst_clock_id_wait_async (id2, error_callback, NULL);
       
   216   fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
       
   217   
       
   218   g_usleep (TIME_UNIT / (2 * 1000));
       
   219   GST_DEBUG ("cancel id %p after half a time unit", id2);
       
   220   gst_clock_id_unschedule (id2);
       
   221   GST_DEBUG ("canceled id %p", id2);
       
   222   gst_clock_id_unref (id2);
       
   223   g_usleep (TIME_UNIT / (2 * 1000));
       
   224   
       
   225   std_log(LOG_FILENAME_LINE, "Test Successful");
       
   226   create_xml(0);
       
   227 }
       
   228 
       
   229 
       
   230 void test_periodic_shot()
       
   231 {
       
   232   GstClock *clock;
       
   233   GstClockID id, id2;
       
   234   GstClockTime base;
       
   235   GstClockReturn result;
       
   236 
       
   237 	xmlfile = "test_periodic_shot";
       
   238   std_log(LOG_FILENAME_LINE, "Test Started test_periodic_shot");
       
   239   
       
   240   clock = gst_system_clock_obtain ();
       
   241   fail_unless (clock != NULL, "Could not create instance of GstSystemClock");
       
   242   
       
   243 
       
   244   gst_clock_debug (clock);
       
   245   base = gst_clock_get_time (clock);
       
   246 
       
   247   // signal every half a time unit 
       
   248   id = gst_clock_new_periodic_id (clock, base + TIME_UNIT, TIME_UNIT / 2);
       
   249   fail_unless (id != NULL, "Could not create periodic id");
       
   250   
       
   251 
       
   252   GST_DEBUG ("waiting one time unit");
       
   253   result = gst_clock_id_wait (id, NULL);
       
   254   gst_clock_debug (clock);
       
   255   fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
       
   256   
       
   257 
       
   258   GST_DEBUG ("waiting for the next");
       
   259   result = gst_clock_id_wait (id, NULL);
       
   260   gst_clock_debug (clock);
       
   261   fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
       
   262   
       
   263 
       
   264   GST_DEBUG ("waiting for the next async %p", id);
       
   265   result = gst_clock_id_wait_async (id, ok_callback, NULL);
       
   266   fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
       
   267   
       
   268   g_usleep (TIME_UNIT / (2 * 1000));
       
   269 
       
   270   GST_DEBUG ("waiting some more for the next async %p", id);
       
   271   result = gst_clock_id_wait_async (id, ok_callback, NULL);
       
   272   fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
       
   273   
       
   274   g_usleep (TIME_UNIT / (2 * 1000));
       
   275 
       
   276   id2 = gst_clock_new_periodic_id (clock, base + TIME_UNIT, TIME_UNIT / 2);
       
   277   fail_unless (id2 != NULL, "Could not create second periodic id");
       
   278   
       
   279 
       
   280   GST_DEBUG ("waiting some more for another async %p", id2);
       
   281   result = gst_clock_id_wait_async (id2, ok_callback, NULL);
       
   282   fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
       
   283   
       
   284   g_usleep (TIME_UNIT / (2 * 1000));
       
   285 
       
   286   GST_DEBUG ("unschedule %p", id);
       
   287   gst_clock_id_unschedule (id);
       
   288 
       
   289   // entry cannot be used again 
       
   290   result = gst_clock_id_wait_async (id, error_callback, NULL);
       
   291   fail_unless (result == GST_CLOCK_UNSCHEDULED,
       
   292       "Waiting did not return UNSCHEDULED");
       
   293       
       
   294   result = gst_clock_id_wait (id, NULL);
       
   295   fail_unless (result == GST_CLOCK_UNSCHEDULED,
       
   296       "Waiting did not return UNSCHEDULED");
       
   297       
       
   298   g_usleep (TIME_UNIT / (2 * 1000));
       
   299 
       
   300   // clean up 
       
   301   gst_clock_id_unref (id);
       
   302   
       
   303   std_log(LOG_FILENAME_LINE, "Test Successful");
       
   304   create_xml(0);
       
   305 }
       
   306 
       
   307 
       
   308 void test_async_order()
       
   309 {
       
   310   GstClock *clock;
       
   311   GstClockID id1, id2;
       
   312   GList *cb_list = NULL, *next;
       
   313   GstClockTime base;
       
   314   GstClockReturn result;
       
   315 
       
   316 	xmlfile = "test_async_order";
       
   317   std_log(LOG_FILENAME_LINE, "Test Started test_async_order");
       
   318   
       
   319   
       
   320   clock = gst_system_clock_obtain ();
       
   321   fail_unless (clock != NULL, "Could not create instance of GstSystemClock");
       
   322   
       
   323 
       
   324   gst_clock_debug (clock);
       
   325   base = gst_clock_get_time (clock);
       
   326 
       
   327   id1 = gst_clock_new_single_shot_id (clock, base + 2 * TIME_UNIT);
       
   328   id2 = gst_clock_new_single_shot_id (clock, base + 1 * TIME_UNIT);
       
   329   result = gst_clock_id_wait_async (id1, store_callback, &cb_list);
       
   330   fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
       
   331   
       
   332   g_usleep (TIME_UNIT / (2 * 1000));
       
   333   result = gst_clock_id_wait_async (id2, store_callback, &cb_list);
       
   334   fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
       
   335   
       
   336   g_usleep (TIME_UNIT / 1000);
       
   337   // at this point at least one of the timers should have timed out 
       
   338   fail_unless (cb_list != NULL, "expected notification");
       
   339   
       
   340   fail_unless (cb_list->data == id2,
       
   341       "Expected notification for id2 to come first");
       
   342       
       
   343   g_usleep (TIME_UNIT / 1000);
       
   344   // now both should have timed out 
       
   345   next = g_list_next (cb_list);
       
   346   fail_unless (next != NULL, "expected second notification");
       
   347   
       
   348   fail_unless (next->data == id1, "Missing notification for id1");
       
   349   
       
   350   gst_clock_id_unref (id1);
       
   351   gst_clock_id_unref (id2);
       
   352   g_list_free (cb_list);
       
   353   
       
   354   std_log(LOG_FILENAME_LINE, "Test Successful");
       
   355   create_xml(0);
       
   356 }
       
   357 
       
   358 
       
   359 void test_periodic_multi()
       
   360 {
       
   361   GstClock *clock;
       
   362   GstClockID clock_id;
       
   363   GstClockTime base;
       
   364   GstClockReturn result;
       
   365   gboolean got_callback = FALSE;
       
   366   
       
   367   xmlfile = "test_periodic_multi";
       
   368   std_log(LOG_FILENAME_LINE, "Test Started test_periodic_multi");
       
   369 
       
   370 
       
   371   clock = gst_system_clock_obtain ();
       
   372   fail_unless (clock != NULL, "Could not create instance of GstSystemClock");
       
   373   
       
   374 
       
   375   gst_clock_debug (clock);
       
   376   base = gst_clock_get_time (clock);
       
   377 
       
   378   clock_id = gst_clock_new_periodic_id (clock, base + TIME_UNIT, TIME_UNIT);
       
   379   gst_clock_id_wait (clock_id, NULL);
       
   380   fail_unless (gst_clock_get_time (clock) >= base + TIME_UNIT);
       
   381   
       
   382   fail_unless (gst_clock_get_time (clock) < base + 2 * TIME_UNIT);
       
   383   
       
   384 
       
   385   // now perform a concurrent wait and wait_async 
       
   386 
       
   387   result = gst_clock_id_wait_async (clock_id, notify_callback, &got_callback);
       
   388   fail_unless (result == GST_CLOCK_OK, "Async waiting did not return OK");
       
   389   
       
   390   fail_unless (got_callback == FALSE);
       
   391   
       
   392   result = gst_clock_id_wait (clock_id, NULL);
       
   393   fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
       
   394   
       
   395   fail_unless (gst_clock_get_time (clock) >= base + 2 * TIME_UNIT);
       
   396   
       
   397   // give the async thread some time to call our callback: 
       
   398   g_usleep (TIME_UNIT / (10 * 1000));
       
   399   fail_unless (got_callback == TRUE, "got no async callback (1)");
       
   400   
       
   401   fail_unless (gst_clock_get_time (clock) < base + 3 * TIME_UNIT);
       
   402   
       
   403   got_callback = FALSE;
       
   404 
       
   405   result = gst_clock_id_wait (clock_id, NULL);
       
   406   fail_unless (result == GST_CLOCK_OK, "Waiting did not return OK");
       
   407   
       
   408   fail_unless (gst_clock_get_time (clock) >= base + 3 * TIME_UNIT);
       
   409   
       
   410   // give the async thread some time to call our callback: 
       
   411   g_usleep (TIME_UNIT / (10 * 1000));
       
   412   fail_unless (got_callback == TRUE, "got no async callback (2)");
       
   413   
       
   414   fail_unless (gst_clock_get_time (clock) < base + 4 * TIME_UNIT);
       
   415   
       
   416   
       
   417   std_log(LOG_FILENAME_LINE, "Test Successful");
       
   418   create_xml(0);
       
   419 }
       
   420 
       
   421 
       
   422 
       
   423 /* test if a blocking wait, unblocked by an async entry continues to be
       
   424  * scheduled */
       
   425 typedef struct
       
   426 {
       
   427   GstClock *clock;
       
   428   GstClockID id;
       
   429   GstClockTimeDiff jitter;
       
   430   GstClockReturn ret;
       
   431 } MixedInfo;
       
   432 
       
   433 static gpointer
       
   434 mixed_thread (MixedInfo * info)
       
   435 {
       
   436   info->ret = gst_clock_id_wait (info->id, &info->jitter);
       
   437   return NULL;
       
   438 }
       
   439 
       
   440 static gboolean
       
   441 mixed_async_cb (GstClock * clock, GstClockTime time,
       
   442     GstClockID id, gpointer user_data)
       
   443 {
       
   444   return TRUE;
       
   445 }
       
   446 
       
   447 void test_mixed()
       
   448 {
       
   449   GThread *thread;
       
   450   GError *error = NULL;
       
   451   MixedInfo info;
       
   452   GstClockTime base;
       
   453   GstClockID id;
       
   454   
       
   455   xmlfile = "test_mixed";
       
   456   std_log(LOG_FILENAME_LINE, "Test Started test_mixed");
       
   457 
       
   458 
       
   459   info.clock = gst_system_clock_obtain ();
       
   460   fail_unless (info.clock != NULL,
       
   461       "Could not create instance of GstSystemClock");
       
   462       
       
   463 
       
   464   /* get current time of the clock as base time */
       
   465   base = gst_clock_get_time (info.clock);
       
   466 
       
   467   /* create entry to wait for 1 second */
       
   468   info.id = gst_clock_new_single_shot_id (info.clock, base + GST_SECOND);
       
   469 
       
   470   /* make and start an entry that is scheduled every 10ms */
       
   471   id = gst_clock_new_periodic_id (info.clock, base, 10 * GST_MSECOND);
       
   472 
       
   473   /* start waiting for the entry */
       
   474   thread = g_thread_create ((GThreadFunc) mixed_thread, &info, TRUE, &error);
       
   475   fail_unless (error == NULL, "error creating thread");
       
   476   
       
   477   fail_unless (thread != NULL, "Could not create thread");
       
   478   
       
   479 
       
   480   /* wait half a second so we are sure to be in the thread */
       
   481   g_usleep (G_USEC_PER_SEC / 2);
       
   482 
       
   483   /* start scheduling the entry */
       
   484   gst_clock_id_wait_async (id, mixed_async_cb, NULL);
       
   485 
       
   486   /* wait for thread to finish */
       
   487   g_thread_join (thread);
       
   488   /* entry must have timed out correctly */
       
   489   fail_unless (info.ret == GST_CLOCK_OK, "clock return was %d", info.ret);
       
   490   
       
   491 
       
   492   gst_clock_id_unschedule (id);
       
   493   gst_clock_id_unref (id);
       
   494   gst_clock_id_unref (info.id);
       
   495   gst_object_unref (info.clock);
       
   496   
       
   497   std_log(LOG_FILENAME_LINE, "Test Successful");
       
   498   create_xml(0);
       
   499   
       
   500 }
       
   501 
       
   502 void test_diff()
       
   503 {
       
   504 
       
   505 
       
   506   GstClockTime time1[] = { 0, (GstClockTime) - 1, 0, 1, 2 * GST_SECOND,(GstClockTime) - GST_SECOND, (GstClockTime) - GST_SECOND};
       
   507   GstClockTime time2[] = { 0, 1, 1, 0, 1 * GST_SECOND, (GstClockTime) - GST_SECOND, GST_SECOND };
       
   508   GstClockTimeDiff d[] = { 0, 2, 1, -1, -GST_SECOND, 0, 2 * GST_SECOND };
       
   509   guint i;
       
   510   
       
   511     xmlfile = "test_diff";
       
   512   std_log(LOG_FILENAME_LINE, "Test Started test_diff");
       
   513 
       
   514   for (i = 0; i < G_N_ELEMENTS (d); i++) {
       
   515     fail_if (d[i] != GST_CLOCK_DIFF (time1[i], time2[i]));
       
   516   }
       
   517   
       
   518   std_log(LOG_FILENAME_LINE, "Test Successful");
       
   519   create_xml(0);
       
   520 }
       
   521 
       
   522 void test_signedness()
       
   523 {
       
   524 
       
   525   
       
   526   GstClockTime time[] = { 0, 1, G_MAXUINT64 / GST_SECOND };
       
   527   GstClockTimeDiff diff[] = { 0, 1, -1, G_MAXINT64 / GST_SECOND, G_MININT64 / GST_SECOND };
       
   528   guint i;
       
   529   
       
   530   	xmlfile = "test_signedness";
       
   531   std_log(LOG_FILENAME_LINE, "Test Started test_signedness");
       
   532 
       
   533   for (i = 0; i < G_N_ELEMENTS (time); i++) {
       
   534     fail_if (time[i] != (time[i] * GST_SECOND / GST_SECOND));
       
   535   }
       
   536   for (i = 0; i < G_N_ELEMENTS (diff); i++) {
       
   537     fail_if (diff[i] != (diff[i] * GST_SECOND / GST_SECOND));
       
   538   }
       
   539   
       
   540   std_log(LOG_FILENAME_LINE, "Test Successful");
       
   541   create_xml(0);
       
   542   
       
   543 } 
       
   544 
       
   545 
       
   546 
       
   547 /*void main(int argc,char** argv)
       
   548 {
       
   549         gst_init(&argc,&argv);
       
   550         test_range();
       
   551         test_mixed();
       
   552         test_diff();
       
   553         test_signedness();
       
   554         
       
   555 //        test_single_shot();
       
   556 //        test_periodic_shot();
       
   557 //        test_periodic_multi();
       
   558 //        test_async_order();
       
   559         
       
   560 }*/
       
   561 
       
   562 
       
   563 void (*fn[8]) (void) = {
       
   564         test_range,
       
   565         test_diff,
       
   566         test_signedness,
       
   567         test_single_shot,
       
   568         test_periodic_shot,
       
   569         test_periodic_multi,
       
   570         test_async_order,
       
   571         test_mixed
       
   572 };
       
   573 
       
   574 char *args[] = {
       
   575         "test_range",
       
   576         "test_diff",
       
   577         "test_signedness",
       
   578         "test_single_shot",
       
   579         "test_periodic_shot",
       
   580         "test_periodic_multi",
       
   581         "test_async_order",
       
   582         "test_mixed",
       
   583 };
       
   584 
       
   585 GST_CHECK_MAIN (gst_systemclock);
       
   586 
       
   587 
       
   588 
       
   589 
       
   590