gstreamer_core/tsrc/check/libs/controller/src/controller.c
branchRCL_3
changeset 29 567bb019e3e3
parent 0 0e761a78d257
child 30 7e817e7e631c
equal deleted inserted replaced
6:9b2c3c7a1a9c 29:567bb019e3e3
    42 
    42 
    43 #if EMULATOR
    43 #if EMULATOR
    44 static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
    44 static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
    45 #define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
    45 #define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
    46 #else 
    46 #else 
    47 extern gboolean _gst_check_raised_critical ;
    47 IMPORT_C extern gboolean _gst_check_raised_critical ;
    48 #endif
    48 #endif
    49 //gboolean _gst_check_raised_warning = FALSE;
    49 //gboolean _gst_check_raised_warning = FALSE;
    50 #if EMULATOR
    50 #if EMULATOR
    51 static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
    51 static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
    52 #define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
    52 #define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
    53 #else 
    53 #else 
    54 extern gboolean _gst_check_raised_warning ;
    54 IMPORT_C extern gboolean _gst_check_raised_warning ;
    55 #endif
    55 #endif
    56 //gboolean _gst_check_expecting_log = FALSE;
    56 //gboolean _gst_check_expecting_log = FALSE;
    57 #if EMULATOR
    57 #if EMULATOR
    58 static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
    58 static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
    59 #define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
    59 #define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
    60 #else 
    60 #else 
    61 extern gboolean _gst_check_expecting_log ;
    61 IMPORT_C extern gboolean _gst_check_expecting_log ;
    62 #endif
    62 #endif
    63 
    63 
    64 //gboolean _gst_check_expecting_log = FALSE;
    64 //gboolean _gst_check_expecting_log = FALSE;
    65 #if EMULATOR
    65 #if EMULATOR
    66 static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
    66 static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
    67 #define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
    67 #define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
    68 #else 
    68 #else 
    69 extern gboolean _gst_check_threads_running ;
    69 IMPORT_C extern gboolean _gst_check_threads_running ;
    70 #endif
    70 #endif
    71 
    71 
    72 
    72 
    73 #if EMULATOR
    73 #if EMULATOR
    74 GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
    74 GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
    75 #define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
    75 #define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
    76 #else 
    76 #else 
    77 extern GList *buffers;
    77 IMPORT_C extern GList *buffers;
    78 #endif
    78 #endif
    79 
    79 
    80 
    80 
    81 #if EMULATOR
    81 #if EMULATOR
    82 GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
    82 GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
    83 #define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
    83 #define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
    84 #else 
    84 #else 
    85 extern GList *thread_list;
    85 IMPORT_C extern GList *thread_list;
    86 #endif
    86 #endif
    87 
    87 
    88 //GMutex *mutex;
    88 //GMutex *mutex;
    89 #if EMULATOR
    89 #if EMULATOR
    90 GET_GLOBAL_VAR_FROM_TLS(mutex,gstcheck,GMutex*)
    90 GET_GLOBAL_VAR_FROM_TLS(mutex,gstcheck,GMutex*)
    91 #define mutex (*GET_GSTREAMER_WSD_VAR_NAME(mutex,gstcheck,g)())
    91 #define mutex (*GET_GSTREAMER_WSD_VAR_NAME(mutex,gstcheck,g)())
    92 #else 
    92 #else 
    93 extern GMutex *mutex;
    93 IMPORT_C extern GMutex *mutex;
    94 #endif
    94 #endif
    95 
    95 
    96 //GCond *start_cond;              /* used to notify main thread of thread startups */
    96 //GCond *start_cond;              /* used to notify main thread of thread startups */
    97 #if EMULATOR
    97 #if EMULATOR
    98 GET_GLOBAL_VAR_FROM_TLS(start_cond,gstcheck,GCond*)
    98 GET_GLOBAL_VAR_FROM_TLS(start_cond,gstcheck,GCond*)
    99 #define start_cond (*GET_GSTREAMER_WSD_VAR_NAME(start_cond,gstcheck,g)())
    99 #define start_cond (*GET_GSTREAMER_WSD_VAR_NAME(start_cond,gstcheck,g)())
   100 #else 
   100 #else 
   101 extern GCond *start_cond;
   101 IMPORT_C extern GCond *start_cond;
   102 #endif
   102 #endif
   103 
   103 
   104 //GCond *sync_cond;               /* used to synchronize all threads and main thread */
   104 //GCond *sync_cond;               /* used to synchronize all threads and main thread */
   105 #if EMULATOR
   105 #if EMULATOR
   106 GET_GLOBAL_VAR_FROM_TLS(sync_cond,gstcheck,GCond*)
   106 GET_GLOBAL_VAR_FROM_TLS(sync_cond,gstcheck,GCond*)
   107 #define sync_cond (*GET_GSTREAMER_WSD_VAR_NAME(sync_cond,gstcheck,g)())
   107 #define sync_cond (*GET_GSTREAMER_WSD_VAR_NAME(sync_cond,gstcheck,g)())
   108 #else 
   108 #else 
   109 extern GCond *sync_cond;
   109 IMPORT_C extern GCond *sync_cond;
   110 #endif
   110 #endif
   111 
   111 
   112 
   112 
   113 void create_xml(int result)
   113 void create_xml(int result)
   114 {
   114 {
       
   115 
   115     if(result)
   116     if(result)
       
   117     {
   116         assert_failed = 1;
   118         assert_failed = 1;
   117     
   119     } 
       
   120 
   118     testResultXml(xmlfile);
   121     testResultXml(xmlfile);
   119     close_log_file();
   122     close_log_file();
       
   123 
       
   124     if(result)
       
   125     {
       
   126         exit (-1);
       
   127     }    
       
   128 
   120 }
   129 }
   121 
   130 
   122 
   131 
   123 /* LOCAL TEST ELEMENT */
   132 /* LOCAL TEST ELEMENT */
   124 
   133