Hello, I have a gstreamer structure via Qmlsink and I am running this structure on Android, but I am testing it on Linux. In this structure, since I gave a static IP to the code, if there is no image when the function is first called, the screen does not show an image, and if I start the camera broadcast after this, the screen still does not show an image because there is no reconnect structure or watchdog structure. I made the following additions to my code and I check the last frame by checking gstreamer errors. This process works for Linux but does not work for Android.
gboolean GStreamerQmlSink::busCall(GstBus *bus, GstMessage *msg, gpointer data)
{
GStreamerQmlSink *self = static_cast<GStreamerQmlSink*>(data);
switch (GST_MESSAGE_TYPE(msg)) {
case GST_MESSAGE_EOS:
qWarning() <<
self->stopStream();
QTimer::singleShot(1000, [self]() {
self->startStream("rtsp://127.0.0.1:8554/stream", self->videoItemRef);
});
break;
case GST_MESSAGE_ERROR:
GError *err;
gchar *debug;
gst_message_parse_error(msg, &err, &debug);
qCritical() << "GStreamer Error:" << err->message;
g_free(debug);
g_error_free(err);
self->stopStream();
QTimer::singleShot(1000, [self]() {
self->startStream("rtsp://127.0.0.1:8554/stream", self->videoItemRef);
});
break;
default:
break;
}
return TRUE;
}
@Joe Can you help me with this?