gstreamer_core/tsrc/check/gst/gstutils/src/gstutils.c
changeset 8 4a7fac7dd34a
parent 0 0e761a78d257
child 9 2a0f36a70380
equal deleted inserted replaced
7:71e347f905f2 8:4a7fac7dd34a
    33 #include <glib/gprintf.h>
    33 #include <glib/gprintf.h>
    34 //#endif
    34 //#endif
    35 
    35 
    36 void create_xml(int result)
    36 void create_xml(int result)
    37 {
    37 {
       
    38 
    38     if(result)
    39     if(result)
       
    40     {
    39         assert_failed = 1;
    41         assert_failed = 1;
    40     
    42     } 
       
    43 
    41     testResultXml(xmlfile);
    44     testResultXml(xmlfile);
    42     close_log_file();
    45     close_log_file();
       
    46 
       
    47     if(result)
       
    48     {
       
    49         exit (-1);
       
    50     }    
       
    51 
    43 }
    52 }
    44 
    53 
    45 #define SPECIAL_POINTER(x) ((void*)(19283847+(x)))
    54 #define SPECIAL_POINTER(x) ((void*)(19283847+(x)))
    46 
    55 
    47 static int n_data_probes = 0;
    56 static int n_data_probes = 0;
   130   message = gst_bus_poll (bus, GST_MESSAGE_EOS, -1);
   139   message = gst_bus_poll (bus, GST_MESSAGE_EOS, -1);
   131   gst_message_unref (message);
   140   gst_message_unref (message);
   132   gst_object_unref (bus);
   141   gst_object_unref (bus);
   133 
   142 
   134   g_assert (n_buffer_probes == 10);     /* one for every buffer */
   143   g_assert (n_buffer_probes == 10);     /* one for every buffer */
   135   g_assert (n_event_probes == 2);       /* new segment and eos */
   144   g_assert (n_event_probes == 3);       /* new segment, latency and eos */
   136   g_assert (n_data_probes == 12);       /* duh */
   145   g_assert (n_data_probes == 13);       /* duh */
   137 
   146 
   138   gst_element_set_state (pipeline, GST_STATE_NULL);
   147   gst_element_set_state (pipeline, GST_STATE_NULL);
   139   gst_object_unref (pipeline);
   148   gst_object_unref (pipeline);
   140 
   149 
   141   /* make sure nothing was sent in addition to the above when shutting down */
   150   /* make sure nothing was sent in addition to the above when shutting down */
   142   g_assert (n_buffer_probes == 10);     /* one for every buffer */
   151   g_assert (n_buffer_probes == 10);     /* one for every buffer */
   143   g_assert (n_event_probes == 2);       /* new segment and eos */
   152   g_assert (n_event_probes == 3);       /* new segment, latency and eos */
   144   g_assert (n_data_probes == 12);       /* duh */
   153   g_assert (n_data_probes == 13);       /* duh */
   145   
   154   
   146   std_log(LOG_FILENAME_LINE, "Test Successful");
   155   std_log(LOG_FILENAME_LINE, "Test Successful");
   147   create_xml(0);
   156   create_xml(0);
   148 }
   157 }
   149 
   158