Open AndreySkyFoxSidorov opened 2 years ago
Hi @AndreySkyFoxSidorov : Is the change that you propose maybe the one from @andrewvoznytsa that I have in PR #10396? I would be much easier if your change proposals are made via a Pull Request, because then it is much easier to check and compare.
Hi @AndreySkyFoxSidorov : Is the change that you propose maybe the one from @andrewvoznytsa that I have in PR #10396? I would be much easier if your change proposals are made via a Pull Request, because then it is much easier to check and compare.
No, I solved a slightly different problem. But I'm sure that I had a problem in checking the URL. I will attach my version of the modified files, if you want you can merge them. https://gist.github.com/AndreySkyFoxSidorov/637c8cd837594046ceadfbfe729ea206
RTSP TCP Not Support from Incorrect URL validation. I managed to fix it: need replace https://github.com/mavlink/qgroundcontrol/blob/bafd59242ede75d82d53b7fd947398db9982ed27/src/VideoReceiver/GstVideoReceiver.cc#L696
bool isRtsp = uri.contains("rtsp://", Qt::CaseInsensitive);
Tobool isRtsp = uri.contains("rtsp://", Qt::CaseInsensitive) || uri.contains("rtspt://", Qt::CaseInsensitive);
The problem of video squares glith on TCP camera( SIYI ZR 10, SIYI mini and others ) can be solved by adding filters in GstVideoReceiver.cc:
` gboolean GstVideoReceiver::_filterParserCaps(GstElement bin, GstPad pad, GstElement element, GstQuery query, gpointer data) { Q_UNUSED(bin) Q_UNUSED(pad) Q_UNUSED(element) Q_UNUSED(data)
}
gboolean GstVideoReceiver::_autoplugQueryCaps(GstElement bin, GstPad pad, GstElement element, GstQuery query, gpointer data) { Q_UNUSED(bin) Q_UNUSED(pad) Q_UNUSED(element)
}
gboolean GstVideoReceiver::_autoplugQueryContext(GstElement bin, GstPad pad, GstElement element, GstQuery query, gpointer data) { Q_UNUSED(bin) Q_UNUSED(pad) Q_UNUSED(element)
}
gboolean GstVideoReceiver::_autoplugQuery(GstElement bin, GstPad pad, GstElement element, GstQuery query, gpointer data) { gboolean ret;
}
`
The filter initialization moment needs add in the method GstVideoReceiver::_makeDecoder(GstCaps caps, GstElement videoSink) g_signal_connect(decoder, "autoplug-query", G_CALLBACK(_autoplugQuery), videoSink);
and method GstVideoReceiver::_makeSource(const QString& uri) g_signal_connect(parser, "autoplug-query", G_CALLBACK(_filterParserCaps), nullptr);