Hi.
Im currently trying to get an rtsp stream to play in my code using the gstreamer C libraries and am experiencing a crash of the application when the stream is set to playing. The crash does not happen when I launch gstreamer through the command line using any of the following: gst-launch-1.0 uridecodebin uri="rtsp://localhost:8554/slamtv60.264" ! autovideosink gst-launch-1.0 playbin uri="rtsp://localhost:8554/slamtv60.264" gst-launch-1.0 rtspsrc location=rtsp://localhost:8554/slamtv60.264 ! decodebin ! autovideosink The code I have used that causes the crash is at the bottom of this message. Its basically a modified version of the example code with me using the uridecodebin instead of the standard playbin. I've also tried to use the playbin and set the uri property but the application still crashes at what I think is the same place. I've run the code with GST_DEBUG=4 set and attached the a txt file with the output to this message in case it will help. My OS is SuSE linux-leap 42.1 and I'm using the latest gstreamer libraries from the pacman repo. Thanks in advance for any help that you can provide. Dave #include <gst/gst.h> struct PipelineData { GstElement *pipeline; GstElement *source; GstElement *sink; };
int main(int argc, char *argv[]) { /* Initialize GStreamer */ PipelineData data; GstBus *bus; GstMessage *msg; GstStateChangeReturn ret; gboolean terminate = FALSE; /* Initialize GStreamer */ gst_init (&argc, &argv); /* Create the elements */ data.source = gst_element_factory_make ("uridecodebin", "source"); data.sink = gst_element_factory_make ("autovideosink", "sink"); /* Create the empty pipeline */ data.pipeline = gst_pipeline_new ("test-pipeline"); if (!data.pipeline || !data.source || !data.sink) { g_printerr ("Not all elements could be created.\n"); return -1; } /* Build the pipeline */ gst_bin_add_many (GST_BIN (data.pipeline), data.source, data.sink, NULL); /*if (gst_element_link (data.source, data.sink) != TRUE) { g_printerr ("Elements could not be linked.\n"); gst_object_unref (data.pipeline); return -1; }*/ /* Modify the source's properties */ g_object_set (data.source, "uri", "rtsp://localhost:8554/slamtv60.264", NULL); /* Connect to the pad-added signal */ g_signal_connect (data.source, "pad-added", G_CALLBACK (pad_added_handler), &data); /* Start playing */ ret = gst_element_set_state (data.pipeline, GST_STATE_PLAYING); if (ret == GST_STATE_CHANGE_FAILURE) { g_printerr ("Unable to set the pipeline to the playing state.\n"); gst_object_unref (data.pipeline); return -1; } /* Listen to the bus */ bus = gst_element_get_bus (data.pipeline); do { msg = gst_bus_timed_pop_filtered(bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_ERROR); /* Parse message */ 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; default: /* We should not reach here */ g_printerr ("Unexpected message received.\n"); break; } gst_message_unref (msg); } } while (!terminate); return 0; }
/* This function will be called by the pad-added signal */static void pad_added_handler (GstElement *src, GstPad *new_pad, PipelineData *data) _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel GST_debug_out.txt (20K) Download Attachment |
On Tue, 2016-05-31 at 14:03 +0100, David Hubberstey wrote:
Hi David, What version of GStreamer are you using? Perhaps you could get a stackttrace of the crash with gdb? Cheers -Tim -- Tim Müller, Centricular Ltd - http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by David Hubberstey
The versions of my gstreamer plugins can be seen below (this is the output from : rpm -qa | grep gstream* so some might not be relevant) libgstreamer-1_0-0-1.8.1-69.1.x86_64 gstreamer-plugins-base-1.8.1-66.2.x86_64 gstreamer-debuginfo-1.8.1-69.1.x86_64 gstreamer-plugins-libav-1.8.1-1.1.x86_64 gstreamer-plugins-qt5-devel-1.2.0-5.1.x86_64 PackageKit-gstreamer-plugin-1.0.7-3.5.x86_64 phonon4qt5-backend-gstreamer-4.9.0-26.1.x86_64 gstreamer-devel-1.8.1-69.1.x86_64 gstreamer-plugins-qt5-1.2.0-5.1.x86_64 gstreamer-plugins-qt5-debuginfo-1.2.0-5.1.x86_64 gstreamer-plugins-qt-1.2.0-3.2.x86_64 gstreamer-lang-1.8.1-69.1.noarch libgstreamer-1_0-0-32bit-1.4.5-2.2.x86_64 gstreamer-plugins-base-lang-1.8.1-66.2.noarch gstreamer-utils-1.8.1-69.1.x86_64 gstreamer-plugins-good-lang-1.8.1-77.1.noarch gstreamer-debugsource-1.8.1-69.1.x86_64 gstreamer-plugins-qt5-debugsource-1.2.0-5.1.x86_64 gstreamer-plugins-base-devel-1.8.1-66.2.x86_64 gstreamer-plugins-good-1.8.1-77.1.x86_64 phonon-backend-gstreamer-4.8.2-1.2.x86_64 gstreamer-1.8.1-69.1.x86_64 The backtrace from gdb is as follows: #0 0x00007fffe5fd800e in () at /usr/lib64/libkdecore.so.5 #1 0x00007ffff7dea8ea in call_init.part () at /lib64/ld-linux-x86-64.so.2 #2 0x00007ffff7dea9d3 in _dl_init_internal () at /lib64/ld-linux-x86-64.so.2 #3 0x00007ffff7deeb08 in dl_open_worker () at /lib64/ld-linux-x86-64.so.2 #4 0x00007ffff7dea7a4 in _dl_catch_error () at /lib64/ld-linux-x86-64.so.2 #5 0x00007ffff7dee2fb in _dl_open () at /lib64/ld-linux-x86-64.so.2 #6 0x00007ffff428802b in dlopen_doit () at /lib64/libdl.so.2 #7 0x00007ffff7dea7a4 in _dl_catch_error () at /lib64/ld-linux-x86-64.so.2 #8 0x00007ffff42885dd in _dlerror_run () at /lib64/libdl.so.2 #9 0x00007ffff42880c1 in dlopen@@GLIBC_2.2.5 () at /lib64/libdl.so.2 #10 0x00007fffe6608f25 in libmodman::module_manager::load_file(std::string, bool) () at /usr/lib64/libmodman.so.1 #11 0x00007fffe66092b3 in libmodman::module_manager::load_dir(std::string, bool) () at /usr/lib64/libmodman.so.1 #12 0x00007fffe6819e06 in () at /usr/lib64/libproxy.so.1 #13 0x00007fffe681a9bb in px_proxy_factory_new () at /usr/lib64/libproxy.so.1 #14 0x00007fffe6a306f9 in () at /usr/lib64/gio/modules/libgiolibproxy.so #15 0x00007ffff78940eb in g_type_create_instance () at /usr/lib64/libgobject-2.0.so.0 #16 0x00007ffff787905d in () at /usr/lib64/libgobject-2.0.so.0 #17 0x00007ffff787ab6d in g_object_newv () at /usr/lib64/libgobject-2.0.so.0 #18 0x00007ffff787b31c in g_object_new () at /usr/lib64/libgobject-2.0.so.0 #19 0x00007fffe7ce6071 in () at /usr/lib64/libgio-2.0.so.0 #20 0x00007fffe7ce61f0 in () at /usr/lib64/libgio-2.0.so.0 #21 0x00007fffe7cf496d in () at /usr/lib64/libgio-2.0.so.0 #22 0x00007ffff7879409 in () at /usr/lib64/libgobject-2.0.so.0 #23 0x00007ffff787af24 in g_object_new_valist () at /usr/lib64/libgobject-2.0.so.0 #24 0x00007ffff787b304 in g_object_new () at /usr/lib64/libgobject-2.0.so.0 #25 0x00007fffe7cecee6 in () at /usr/lib64/libgio-2.0.so.0 #26 0x00007fffe7d01d38 in g_socket_client_connect () at /usr/lib64/libgio-2.0.so.0 #27 0x00007fffe7d01f2a in g_socket_client_connect_to_uri () at /usr/lib64/libgio-2.0.so.0 #28 0x00007fffec5cdf46 in gst_rtsp_connection_connect_with_response () at /usr/lib64/libgstrtsp-1.0.so.0 #29 0x00007fffeca09bde in () at /usr/lib64/gstreamer-1.0/libgstrtsp.so #30 0x00007fffeca10e1c in () at /usr/lib64/gstreamer-1.0/libgstrtsp.so #31 0x00007fffeca14b0d in () at /usr/lib64/gstreamer-1.0/libgstrtsp.so #32 0x00007ffff7b58389 in () at /usr/lib64/libgstreamer-1.0.so.0 #33 0x00007ffff75c58ec in () at /usr/lib64/libglib-2.0.so.0 #34 0x00007ffff75c4f65 in () at /usr/lib64/libglib-2.0.so.0 #35 0x00007ffff54e30a4 in start_thread () at /lib64/libpthread.so.0 #36 0x00007ffff497bfed in clone () at /lib64/libc.so.6 Thanks again for taking the time to help Dave _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Tue, 2016-05-31 at 15:03 +0100, David Hubberstey wrote:
Hi David, > The backtrace from gdb is as follows: > > #0 0x00007fffe5fd800e in () at /usr/lib64/libkdecore.so.5 > #1 0x00007ffff7dea8ea in call_init.part () at /lib64/ld-linux-x86- > 64.so.2 > #2 0x00007ffff7dea9d3 in _dl_init_internal () at /lib64/ld-linux-x86- > 64.so.2 > #3 0x00007ffff7deeb08 in dl_open_worker () at /lib64/ld-linux-x86- > 64.so.2 > #4 0x00007ffff7dea7a4 in _dl_catch_error () at /lib64/ld-linux-x86- > 64.so.2 > #5 0x00007ffff7dee2fb in _dl_open () at /lib64/ld-linux-x86-64.so.2 > #6 0x00007ffff428802b in dlopen_doit () at /lib64/libdl.so.2 > #7 0x00007ffff7dea7a4 in _dl_catch_error () at /lib64/ld-linux-x86- > 64.so.2 > #8 0x00007ffff42885dd in _dlerror_run () at /lib64/libdl.so.2 > #9 0x00007ffff42880c1 in dlopen@@GLIBC_2.2.5 () at /lib64/libdl.so.2 > #10 0x00007fffe6608f25 in > libmodman::module_manager::load_file(std::string, bool) () at > /usr/lib64/libmodman.so.1 > #11 0x00007fffe66092b3 in > libmodman::module_manager::load_dir(std::string, bool) () at > /usr/lib64/libmodman.so.1 > #12 0x00007fffe6819e06 in () at /usr/lib64/libproxy.so.1 > #13 0x00007fffe681a9bb in px_proxy_factory_new () at > /usr/lib64/libproxy.so.1 > #14 0x00007fffe6a306f9 in () at > /usr/lib64/gio/modules/libgiolibproxy.so > #15 0x00007ffff78940eb in g_type_create_instance () at > /usr/lib64/libgobject-2.0.so.0 > #16 0x00007ffff787905d in () at /usr/lib64/libgobject-2.0.so.0 > #17 0x00007ffff787ab6d in g_object_newv () at /usr/lib64/libgobject- > 2.0.so.0 > #18 0x00007ffff787b31c in g_object_new () at /usr/lib64/libgobject- > 2.0.so.0 > #19 0x00007fffe7ce6071 in () at /usr/lib64/libgio-2.0.so.0 > #20 0x00007fffe7ce61f0 in () at /usr/lib64/libgio-2.0.so.0 > #21 0x00007fffe7cf496d in () at /usr/lib64/libgio-2.0.so.0 > #22 0x00007ffff7879409 in () at /usr/lib64/libgobject-2.0.so.0 > #23 0x00007ffff787af24 in g_object_new_valist () at > /usr/lib64/libgobject-2.0.so.0 > #24 0x00007ffff787b304 in g_object_new () at /usr/lib64/libgobject- > 2.0.so.0 > #25 0x00007fffe7cecee6 in () at /usr/lib64/libgio-2.0.so.0 > #26 0x00007fffe7d01d38 in g_socket_client_connect () at > /usr/lib64/libgio-2.0.so.0 This seems to crash somewhere inside libkdecore via libproxy. It must be some libproxy kde integration stuff, perhaps a libproxy kconfig backend or so? In any case, doesn't look GStreamer-related at first glance. You might be able to work around it by setting the GSETTINGS_BACKEND=memory environment variable when starting the app/gst-launch-1.0 Cheers -Tim -- Tim Müller, Centricular Ltd - http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Setting that environment variable didn't have any affect unfortunately. I was under the impression that the top 8 or so lines of the backtrace where kde trying to deal with the crash. I've made some progress regardless: The issue seems to be related to Qt. I originally started trying to use QtGstreamer libraries but that was exhibiting the same crash. Then I threw that out and used the gst C libs directly which still crashed as above. What ive done now is completely copy the code into a new file and just compile it with g++ and without any Qt includes and libs at all and it works. So It must be an interaction with Qt or something. Gonna have to investigate more tomorrow. Thanks for the assistance. Dave On 31 May 2016 at 15:37, Tim Müller <[hidden email]> wrote: On Tue, 2016-05-31 at 15:03 +0100, David Hubberstey wrote: _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |