QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
VideoStreamUri.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <optional>
5
6class QUrl;
7
9namespace VideoStreamUri {
10
19
21std::optional<Transport> transportFor(const QUrl& url);
22
24constexpr bool listens(Transport transport)
25{
26 return (transport == Transport::RtpUdpH264) || (transport == Transport::RtpUdpH265) ||
27 (transport == Transport::MpegTsUdp);
28}
29
31constexpr bool isValidPort(int port)
32{
33 return (port > 0) && (port <= 65535);
34}
35
36} // namespace VideoStreamUri
The stream URIs VideoStreamResolver produces, as the receivers that play them tell them apart.
@ Rtsp
Any rtsp* scheme: rtsp://, rtsps://, rtspt://, ...
constexpr bool isValidPort(int port)
A TCP or UDP port a source can name: 1 to 65535.
constexpr bool listens(Transport transport)
The receiver listens on a local UDP port for transport, rather than connect to a server.
std::optional< Transport > transportFor(const QUrl &url)
The transport url's scheme selects, case-insensitively; nullopt for any other scheme.