bus = gst_element_get_bus(pipeline); msg = gst_bus_timed_pop_filtered(bus, GST_CLOCK_TIME_NONE, (GstMessageType)(GST_MESSAGE_EOS | GST_MESSAGE_ERROR)); if (msg != NULL) { gst_message_unref(msg); } gst_element_set_state(pipeline, GST_STATE_NULL); gst_object_unref(pipeline); r...
bus = gst_element_get_bus(pipeline); msg = gst_bus_timed_pop_filtered(bus, GST_CLOCK_TIME_NONE, (GstMessageType)(GST_MESSAGE_EOS | GST_MESSAGE_ERROR)); if (msg != NULL) { gst_message_unref(msg); } gst_element_set_state(pipeline, GST_STATE_NULL); gst_object_unref(pipeline); r...
NULL);/* Start playing */gst_element_set_state (pipeline, GST_STATE_PLAYING);/* Wait until error or EOS */bus = gst_element_get_bus (pipeline);
GST_MESSAGE_EOS | GST_MESSAGE_ERROR,-1);if(GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) { gchar *debug =NULL; GError *err =NULL; gst_message_parse_error (msg, &err, &debug); GST_INFO ("error: %s", err->message);if(g_str_has_suffix (err->message,"Not Found")) rc =404...
debug_info:"none");g_clear_error(&err);g_free(debug_info);break;caseGST_MESSAGE_EOS:g_print("End-Of-Stream reached.\n");break;caseGST_MESSAGE_STATE_CHANGED:break;default:break;}gst_message_unref(bus_msg);}returnTRUE;}intmain(intargc,char*argv[]){GMainLoop*main_loop;GstElement*...
switch(GST_MESSAGE_TYPE(msg)) { caseGST_MESSAGE_EOS: g_print("End-of-stream\n"); g_print("The message's owner is: %s\n", GST_OBJECT_NAME(GST_MESSAGE_SRC(msg))); //g_main_loop_quit(loop); break; caseGST_MESSAGE_ERROR: { ...
switch(GST_MESSAGE_TYPE(msg)) { case GST_MESSAGE_EOS: g_print("End-of-stream\n"); g_print("The message's owner is: %s\n", GST_OBJECT_NAME(GST_MESSAGE_SRC(msg))); // g_main_loop_quit(loop); break; case GST_MESSAGE_ERROR: { ...
GST_MESSAGE_EOS = (1 << 0), GST_MESSAGE_ERROR = (1 << 1), GST_MESSAGE_WARNING = (1 << 2), GST_MESSAGE_INFO = (1 << 3), GST_MESSAGE_TAG = (1 << 4), GST_MESSAGE_BUFFERING = (1 << 5), GST_MESSAGE_STATE_CHANGED = (1 << 6), GST_MESSAGE_STATE_DIRTY = (1 << ...
msg=bus.timed_pop(gst.MESSSAGE_EOS | gst.MESSAGE_ERROR, gst.CLOCK_TIME_NONE) if msg.type == gst.MESSAGE_ERROR: print "Error!" else: print "Done" Feel free to submit a patch to fix up the exit code regardless, but calling gst-launch like that in an application is just a bad ide...
message), fromGStr(debug)) C.g_error_free(err) C.g_free(asGPtr(debug)) C.g_main_loop_quit(loop) break loop case C.GST_MESSAGE_WARNING: case C.GST_MESSAGE_INFO: case C.GST_MESSAGE_EOS: C.g_main_loop_quit(loop) break loop case C.GST_MESSAGE_TAG: var tags *C.GstTagList C....