<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>I have made an application that stream live video and record the files.</div><div>But today I faced one problem when light went off for a second. My application stopped, so can you people please help me in this as I receive following messages <br></div><div><br></div><div> do {<br>    msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_ANY);<br>  <br>    if (msg != NULL) {<br>      GError *err;<br>      gchar *debug_info;<br>     <br>      switch (GST_MESSAGE_TYPE (msg)) {<br>        case GST_MESSAGE_ERROR:<br>          gst_message_parse_error (msg, &err, &debug_info);<br>          g_printerr ("Error received from element %s: %s\n", GST_OBJECT_NAME (msg->src), err->message);<br>          g_printerr ("Debugging information: %s\n", debug_info ? debug_info : "none");<br>          g_clear_error (&err);<br>          g_free (debug_info);<br>          //terminate = TRUE;<br>          break;<br>        case GST_MESSAGE_EOS:<br>          g_print ("End-Of-Stream reached.\n");<br>          terminate = TRUE;<br>          break;<br>        case GST_MESSAGE_STATE_CHANGED:<br>          /* We are only interested in state-changed messages from the pipeline */<br>          if (GST_MESSAGE_SRC (msg) == GST_OBJECT (data.pipeline)) {<br>            GstState old_state, new_state, pending_state;<br>            gst_message_parse_state_changed (msg, &old_state, &new_state, &pending_state);<br>            g_print ("Pipeline state changed from %s to %s:\n",<br>            gst_element_state_get_name (old_state), gst_element_state_get_name (new_state));<br>          }<br>          break;<br>          //////START<br>          case GST_MESSAGE_UNKNOWN:<br>           g_print("GST_MESSAGE_UNKNOWN\n");</div><div> break;</div><div> default:<br>   g_printerr ("Unexpected message received.\n");<br>          break;<br>      }<br>      gst_message_unref (msg);<br>    }<br>printf("value of terminate %d\n",terminate);<br>  } while (!terminate);<br><br>  gst_element_set_state (data.pipeline, GST_STATE_NULL);<br>  gst_object_unref (data.pipeline);<br><br></div></div></div></div></div>