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