gstreamer_core/tsrc/check/libs/gstnetclientclock/src/gstnetclientclock.c
branchRCL_3
changeset 30 7e817e7e631c
parent 29 567bb019e3e3
equal deleted inserted replaced
29:567bb019e3e3 30:7e817e7e631c
    33 
    33 
    34 #if EMULATOR
    34 #if EMULATOR
    35 static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
    35 static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
    36 #define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
    36 #define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
    37 #else 
    37 #else 
    38 IMPORT_C extern gboolean _gst_check_raised_critical ;
    38 extern gboolean _gst_check_raised_critical ;
    39 #endif
    39 #endif
    40 //gboolean _gst_check_raised_warning = FALSE;
    40 //gboolean _gst_check_raised_warning = FALSE;
    41 #if EMULATOR
    41 #if EMULATOR
    42 static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
    42 static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
    43 #define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
    43 #define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
    44 #else 
    44 #else 
    45 IMPORT_C extern gboolean _gst_check_raised_warning ;
    45 extern gboolean _gst_check_raised_warning ;
    46 #endif
    46 #endif
    47 //gboolean _gst_check_expecting_log = FALSE;
    47 //gboolean _gst_check_expecting_log = FALSE;
    48 #if EMULATOR
    48 #if EMULATOR
    49 static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
    49 static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
    50 #define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
    50 #define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
    51 #else 
    51 #else 
    52 IMPORT_C extern gboolean _gst_check_expecting_log ;
    52 extern gboolean _gst_check_expecting_log ;
    53 #endif
    53 #endif
    54 
    54 
    55 //gboolean _gst_check_expecting_log = FALSE;
    55 //gboolean _gst_check_expecting_log = FALSE;
    56 #if EMULATOR
    56 #if EMULATOR
    57 static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
    57 static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
    58 #define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
    58 #define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
    59 #else 
    59 #else 
    60 IMPORT_C extern gboolean _gst_check_threads_running ;
    60 extern gboolean _gst_check_threads_running ;
    61 #endif
    61 #endif
    62 
    62 
    63 
    63 
    64 #if EMULATOR
    64 #if EMULATOR
    65 GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
    65 GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
    66 #define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
    66 #define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
    67 #else 
    67 #else 
    68 IMPORT_C extern GList *buffers;
    68 extern GList *buffers;
    69 #endif
    69 #endif
    70 
    70 
    71 
    71 
    72 #if EMULATOR
    72 #if EMULATOR
    73 GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
    73 GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
    74 #define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
    74 #define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
    75 #else 
    75 #else 
    76 IMPORT_C extern GList *thread_list;
    76 extern GList *thread_list;
    77 #endif
    77 #endif
    78 
    78 
    79 //GMutex *mutex;
    79 //GMutex *mutex;
    80 #if EMULATOR
    80 #if EMULATOR
    81 GET_GLOBAL_VAR_FROM_TLS(mutex,gstcheck,GMutex*)
    81 GET_GLOBAL_VAR_FROM_TLS(mutex,gstcheck,GMutex*)
    82 #define mutex (*GET_GSTREAMER_WSD_VAR_NAME(mutex,gstcheck,g)())
    82 #define mutex (*GET_GSTREAMER_WSD_VAR_NAME(mutex,gstcheck,g)())
    83 #else 
    83 #else 
    84 IMPORT_C extern GMutex *mutex;
    84 extern GMutex *mutex;
    85 #endif
    85 #endif
    86 
    86 
    87 //GCond *start_cond;              /* used to notify main thread of thread startups */
    87 //GCond *start_cond;              /* used to notify main thread of thread startups */
    88 #if EMULATOR
    88 #if EMULATOR
    89 GET_GLOBAL_VAR_FROM_TLS(start_cond,gstcheck,GCond*)
    89 GET_GLOBAL_VAR_FROM_TLS(start_cond,gstcheck,GCond*)
    90 #define start_cond (*GET_GSTREAMER_WSD_VAR_NAME(start_cond,gstcheck,g)())
    90 #define start_cond (*GET_GSTREAMER_WSD_VAR_NAME(start_cond,gstcheck,g)())
    91 #else 
    91 #else 
    92 IMPORT_C extern GCond *start_cond;
    92 extern GCond *start_cond;
    93 #endif
    93 #endif
    94 
    94 
    95 //GCond *sync_cond;               /* used to synchronize all threads and main thread */
    95 //GCond *sync_cond;               /* used to synchronize all threads and main thread */
    96 #if EMULATOR
    96 #if EMULATOR
    97 GET_GLOBAL_VAR_FROM_TLS(sync_cond,gstcheck,GCond*)
    97 GET_GLOBAL_VAR_FROM_TLS(sync_cond,gstcheck,GCond*)
    98 #define sync_cond (*GET_GSTREAMER_WSD_VAR_NAME(sync_cond,gstcheck,g)())
    98 #define sync_cond (*GET_GSTREAMER_WSD_VAR_NAME(sync_cond,gstcheck,g)())
    99 #else 
    99 #else 
   100 IMPORT_C extern GCond *sync_cond;
   100 extern GCond *sync_cond;
   101 #endif
   101 #endif
   102 //char* xmlfile = "gstnetclientclock";
   102 //char* xmlfile = "gstnetclientclock";
   103 
   103 
   104 void create_xml(int result)
   104 void create_xml(int result)
   105 {
   105 {
   106 
       
   107     if(result)
   106     if(result)
   108     {
       
   109         assert_failed = 1;
   107         assert_failed = 1;
   110     } 
   108     
   111 
       
   112     testResultXml(xmlfile);
   109     testResultXml(xmlfile);
   113     close_log_file();
   110     close_log_file();
   114 
       
   115     if(result)
       
   116     {
       
   117         exit (-1);
       
   118     }    
       
   119 
       
   120 }
   111 }
   121 
   112 
   122 void test_instantiation()
   113 void test_instantiation()
   123 {
   114 {
   124   GstClock *client, *local;
   115   GstClock *client, *local;
   216   
   207   
   217 }
   208 }
   218 
   209 
   219 
   210 
   220 
   211 
   221 //void
   212 void
   222 //gst_net_client_clock_suite (void)
   213 gst_net_client_clock_suite (void)
   223 //{
   214 {
   224 //test_instantiation();
   215 test_instantiation();
   225 //test_functioning();
   216 test_functioning();
   226 //}
   217 }
   227 
   218 
   228 void (*fn[]) (void) = {
   219 void (*fn[]) (void) = {
   229 test_instantiation,
   220 test_instantiation,
   230 test_functioning
   221 test_functioning
   231 };
   222 };