QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
VideoStreamUri.cc
Go to the documentation of this file.
1#include "VideoStreamUri.h"
2
3#include <QtCore/QUrl>
4
5namespace VideoStreamUri {
6
7std::optional<Transport> transportFor(const QUrl& url)
8{
9 const QString scheme = url.scheme().toLower();
10 if (scheme.startsWith(QLatin1String("rtsp"))) {
11 return Transport::Rtsp;
12 }
13 if (scheme == QLatin1String("udp")) {
15 }
16 if (scheme == QLatin1String("udp265")) {
18 }
19 if (scheme == QLatin1String("mpegts")) {
21 }
22 if (scheme == QLatin1String("tcp")) {
24 }
25 return std::nullopt;
26}
27
28} // namespace VideoStreamUri
The stream URIs VideoStreamResolver produces, as the receivers that play them tell them apart.
@ Rtsp
Any rtsp* scheme: rtsp://, rtsps://, rtspt://, ...
std::optional< Transport > transportFor(const QUrl &url)
The transport url's scheme selects, case-insensitively; nullopt for any other scheme.