Displaying rtsp stream with gstreamer on qt - android
Unsolved
Mobile and Embedded
-
This is my pipeline:
Gstreamer_camera_capture::Gstreamer_camera_capture(std::string camera) { std::string pipeline_str = "rtspsrc location=" + camera + " latency=0 ! rtpjitterbuffer latency=10 ! rtph264depay ! avdec_h264 ! videoconvert ! video/x-raw,format=RGB ! appsink name=app_sink sync=false"; this->_pipeline = gst_parse_launch(pipeline_str.c_str(), NULL); // Get app sink part of pipeline this->_app_sink = gst_bin_get_by_name(GST_BIN(_pipeline), "app_sink"); g_object_set(this->_app_sink, "emit-signals", TRUE, NULL); g_signal_connect(this->_app_sink, "new-sample", G_CALLBACK(new_sample), this); // Start playing gst_element_set_state(_pipeline, GST_STATE_PLAYING); }
When i run my application, it works fine on linux. I can receive the stream and display it. But when i build it for android I can't display the stream. I think i'm receiving the stream though, because the cam of the streaming pc works when app is running. Any ideas how I can solve this issue?
Thanks.
-
@kuroro-l First, your code has nothing to do with Qt. When you build it for Android, you need to pack gstreamer build(libs and plugins) for Android with your app.
If you want to use Qt sink in your pipeline, try to make a Qt GUI and use qml or widget sink in your pipeline. There are quite some posts about how to do it in this forum and gstreamer forum.