17 #include <QTimerEvent>
19 using namespace std::chrono_literals;
24 using Params = QMap<QString, QString>;
31 explicit CetonRTSP(
const QString &ip,
uint tuner, ushort port);
35 bool GetOptions(QStringList &
options);
37 bool Setup(ushort clientPort1, ushort clientPort2,
38 ushort &rtpPort, ushort &rtcpPort, uint32_t &ssrc);
42 void StartKeepAlive(
void);
43 void StopKeepAlive(
void);
47 const QString &method,
const QStringList *headers =
nullptr,
48 bool use_control =
false,
bool waitforanswer =
true,
49 const QString &alternative = QString());
52 static QStringList splitLines(
const QByteArray &lines);
53 QString readParameters(
const QString &key,
Params ¶meters);
54 QUrl GetBaseUrl(
void);
55 void timerEvent(QTimerEvent *event)
override;
57 QTcpSocket *m_socket {
nullptr};
59 QString m_sessionId {
"0"};
63 int m_responseCode {-1};
67 std::chrono::seconds m_timeout {60s};
69 bool m_canGetParameter {
false};