diff -r 69c7080681bf -r 4ed5253bb6ba gstreamer_core/tsrc/examples/wav_record/src/wav_record.c --- a/gstreamer_core/tsrc/examples/wav_record/src/wav_record.c Fri Aug 06 16:36:50 2010 -0500 +++ b/gstreamer_core/tsrc/examples/wav_record/src/wav_record.c Tue Aug 24 03:01:45 2010 -0500 @@ -29,7 +29,7 @@ GstElement *pipeline, *source, *wavenc,*sink; GstBus *bus; GMainLoop *loop; - +gint error; static gboolean bus_call (GstBus *bus, GstMessage *msg, @@ -41,7 +41,7 @@ g_main_loop_quit(loop); gst_object_unref (GST_OBJECT (pipeline)); //std_log(LOG_FILENAME_LINE, "Test Successful"); - create_xml(0); + create_xml(error); break; case GST_MESSAGE_ERROR: { gchar *debug; @@ -49,9 +49,10 @@ gst_message_parse_error (msg, &err, &debug); g_free (debug); g_print ("Error: %s\n", err->message); + error = err->code; g_error_free (err); //std_log(LOG_FILENAME_LINE, "Test Failed"); - create_xml(1); + break; } default: @@ -79,6 +80,7 @@ int width = 16; guint record_duration = 10000; + error = 0; if (argc > 1) { record_duration = (guint) atoi( argv[1] ) * 1000; }