how to not stop receiving data after removing source(IP Camera) for some time.
Shubham Shrivastava
shubham333vm at gmail.com
Wed Oct 3 06:31:26 UTC 2018
I have made an application that stream live video and record the files.
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
do {
msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
GST_MESSAGE_ANY);
if (msg != NULL) {
GError *err;
gchar *debug_info;
switch (GST_MESSAGE_TYPE (msg)) {
case GST_MESSAGE_ERROR:
gst_message_parse_error (msg, &err, &debug_info);
g_printerr ("Error received from element %s: %s\n",
GST_OBJECT_NAME (msg->src), err->message);
g_printerr ("Debugging information: %s\n", debug_info ?
debug_info : "none");
g_clear_error (&err);
g_free (debug_info);
//terminate = TRUE;
break;
case GST_MESSAGE_EOS:
g_print ("End-Of-Stream reached.\n");
terminate = TRUE;
break;
case GST_MESSAGE_STATE_CHANGED:
/* We are only interested in state-changed messages from the
pipeline */
if (GST_MESSAGE_SRC (msg) == GST_OBJECT (data.pipeline)) {
GstState old_state, new_state, pending_state;
gst_message_parse_state_changed (msg, &old_state, &new_state,
&pending_state);
g_print ("Pipeline state changed from %s to %s:\n",
gst_element_state_get_name (old_state),
gst_element_state_get_name (new_state));
}
break;
//////START
case GST_MESSAGE_UNKNOWN:
g_print("GST_MESSAGE_UNKNOWN\n");
break;
default:
g_printerr ("Unexpected message received.\n");
break;
}
gst_message_unref (msg);
}
printf("value of terminate %d\n",terminate);
} while (!terminate);
gst_element_set_state (data.pipeline, GST_STATE_NULL);
gst_object_unref (data.pipeline);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20181003/22adecd4/attachment.html>
More information about the gstreamer-devel
mailing list