MythTV  master
satiprtsp.cpp
Go to the documentation of this file.
1 
3 // C++ includes
4 #include <chrono>
5 
6 // Qt includes
7 #include <QRegularExpression>
8 #include <QString>
9 #include <QStringList>
10 #include <QTcpSocket>
11 #include <QUrl>
12 #include <QVector>
13 
14 // MythTV includes
15 #include "satiprtsp.h"
16 #include "mythlogging.h"
17 #include "mythsocket.h"
18 #include "rtppacketbuffer.h"
19 #include "udppacketbuffer.h"
20 #include "rtptsdatapacket.h"
21 #include "satipstreamhandler.h"
22 #include "rtcpdatapacket.h"
23 #include "satiprtcppacket.h"
24 
25 #define LOC QString("SatIPRTSP[%1]: ").arg(m_streamHandler->m_inputId)
26 #define LOC2 QString("SatIPRTSP[%1](%2): ").arg(m_streamHandler->m_inputId).arg(m_requestUrl.toString())
27 
29  : m_streamHandler(handler)
30 {
33 
34  // Use RTPPacketBuffer if buffering and re-ordering needed
35  m_buffer = new UDPPacketBuffer(0);
36 
38  m_writehelper = new SatIPRTSPWriteHelper(this, handler);
39 
40  if (!m_readhelper->m_socket->bind(QHostAddress::AnyIPv4, 0,
41  QAbstractSocket::DefaultForPlatform))
42  {
43  LOG(VB_GENERAL, LOG_ERR, LOC + QString("Failed to bind RTP socket"));
44  }
45 
46  uint port = m_readhelper->m_socket->localPort() + 1;
47 
49  if (!m_rtcpReadhelper->m_socket->bind(QHostAddress::AnyIPv4,
50  port,
51  QAbstractSocket::DefaultForPlatform))
52  {
53  LOG(VB_GENERAL, LOG_ERR, LOC + QString("Failed to bind RTCP socket to port %1").arg(port));
54  }
55 }
56 
58 {
59  delete m_rtcpReadhelper;
60  delete m_writehelper;
61  delete m_readhelper;
62  delete m_buffer;
63 }
64 
65 bool SatIPRTSP::Setup(const QUrl& url)
66 {
67  m_requestUrl = url;
68  LOG(VB_RECORD, LOG_DEBUG, LOC2 + QString("SETUP"));
69 
70  if (url.port() != 554)
71  {
72  LOG(VB_RECORD, LOG_WARNING, LOC + "SatIP specifies RTSP port 554 to be used");
73  }
74 
75  if (url.port() < 1)
76  {
77  LOG(VB_RECORD, LOG_ERR, LOC + QString("Invalid port %1").arg(url.port()));
78  return false;
79  }
80 
81  QStringList headers;
82  headers.append(
83  QString("Transport: RTP/AVP;unicast;client_port=%1-%2")
84  .arg(m_readhelper->m_socket->localPort()).arg(m_readhelper->m_socket->localPort() + 1));
85 
86  if (!sendMessage(m_requestUrl, "SETUP", &headers))
87  {
88  LOG(VB_RECORD, LOG_ERR, LOC + "Failed to send SETUP message");
89  return false;
90  }
91 
92  if (m_headers.contains("COM.SES.STREAMID"))
93  {
94  m_streamid = m_headers["COM.SES.STREAMID"];
95  }
96  else
97  {
98  LOG(VB_RECORD, LOG_ERR, LOC + "SETUP response did not contain the com.ses.streamID field");
99  return false;
100  }
101 
102  QRegExp sessionTimeoutRegex(
103  "^([^\\r\\n]+);timeout=([0-9]+)?", Qt::CaseSensitive, QRegExp::RegExp2);
104 
105  if (m_headers.contains("SESSION"))
106  {
107  if (sessionTimeoutRegex.indexIn(m_headers["SESSION"]) == -1)
108  {
109  LOG(VB_RECORD, LOG_ERR, LOC +
110  QString("Failed to extract session id from session header ('%1')")
111  .arg(m_headers["Session"]));
112  }
113 
114  QStringList parts = sessionTimeoutRegex.capturedTexts();
115  m_sessionid = parts.at(1);
116  m_timeout = (parts.length() > 1 ? parts.at(2).toInt() / 2 : 30) * 1000;
117  }
118  else
119  {
120  LOG(VB_RECORD, LOG_ERR, LOC + "SETUP response did not contain the Session field");
121  return false;
122  }
123 
124  LOG(VB_RECORD, LOG_DEBUG, LOC +
125  QString("Setup completed, sessionID = %1, streamID = %2, timeout = %3s")
128 
129  // Reset tuner lock status
130  QMutexLocker locker(&m_sigmonLock);
131  m_hasLock = false;
132 
133  return true;
134 }
135 
136 bool SatIPRTSP::Play(QStringList &pids)
137 {
138  LOG(VB_RECORD, LOG_DEBUG, LOC2 + "PLAY");
139 
140  QUrl url = QUrl(m_requestUrl);
141  url.setQuery("");
142  url.setPath(QString("/stream=%1").arg(m_streamid));
143 
144  QString pids_str = QString("pids=%1").arg(!pids.empty() ? pids.join(",") : "none");
145 
146  // Telestar Digibit R1 Sat>IP box cannot handle a lot of pids
147  if (pids.size() > 32)
148  {
149  pids_str = QString("pids=all");
150  }
151  url.setQuery(pids_str);
152  LOG(VB_RECORD, LOG_DEBUG, LOC + pids_str);
153 
154  if (!sendMessage(url, "PLAY"))
155  {
156  LOG(VB_RECORD, LOG_ERR, LOC + "Failed to send PLAY message");
157  return false;
158  }
159 
160  // Start processing packets when pids are specified
161  m_valid = !pids.empty();
162 
163  return true;
164 }
165 
167 {
168  LOG(VB_RECORD, LOG_DEBUG, LOC2 + "TEARDOWN");
169  emit stopKeepAlive();
170 
171  QUrl url = QUrl(m_requestUrl);
172  url.setQuery(QString());
173  url.setPath(QString("/stream=%1").arg(m_streamid));
174 
175  bool result = sendMessage(url, "TEARDOWN");
176 
177  if (!result)
178  {
179  LOG(VB_RECORD, LOG_ERR, LOC + "Teardown failed");
180  }
181 
182  if (result)
183  {
184  m_sessionid = "";
185  m_streamid = "";
186  }
187 
188  // Discard all RTP packets until the next lock
189  m_valid = false;
190  m_validOld = false;
191 
192  // Reset tuner lock status
193  QMutexLocker locker(&m_sigmonLock);
194  m_hasLock = false;
195 
196  return result;
197 }
198 
200 {
201  QMutexLocker locker(&m_sigmonLock);
202  return m_hasLock;
203 }
204 
206 {
207  QMutexLocker locker(&m_sigmonLock);
208  return m_signalStrength;
209 }
210 
211 void SatIPRTSP::SetSigmonValues(bool lock, int level)
212 {
213  QMutexLocker locker(&m_sigmonLock);
214  m_hasLock = lock;
215  m_signalStrength = level;
216 }
217 
218 bool SatIPRTSP::sendMessage(const QUrl& url, const QString& msg, QStringList *additionalheaders)
219 {
220  QMutexLocker locker(&m_ctrlSocketLock);
221 
222  QTcpSocket ctrl_socket;
223  ctrl_socket.connectToHost(url.host(), url.port());
224 
225  bool ok = ctrl_socket.waitForConnected(30 * 1000);
226  if (!ok)
227  {
228  LOG(VB_GENERAL, LOG_ERR, LOC + QString("Could not connect to server %1:%2").arg(url.host()).arg(url.port()));
229  return false;
230  }
231 
232  QStringList headers;
233  headers.append(QString("%1 %2 RTSP/1.0").arg(msg).arg(url.toString()));
234  headers.append(QString("User-Agent: MythTV Sat>IP client"));
235  headers.append(QString("CSeq: %1").arg(++m_cseq));
236 
237  if (m_sessionid.length() > 0)
238  {
239  headers.append(QString("Session: %1").arg(m_sessionid));
240  }
241 
242  if (additionalheaders != nullptr)
243  {
244  for (int i = 0; i < additionalheaders->count(); i++)
245  {
246  headers.append(additionalheaders->at(i));
247  }
248  }
249 
250  headers.append("\r\n");
251 
252  for (const auto& requestLine : headers)
253  {
254  LOG(VB_RECORD, LOG_DEBUG, LOC + "sendMessage " +
255  QString("write: %1").arg(requestLine.simplified()));
256  }
257 
258  QString request = headers.join("\r\n");
259  ctrl_socket.write(request.toLatin1());
260 
261  QRegularExpression firstLineRE { "^RTSP/1.0 (\\d+) ([^\r\n]+)" };
262  QRegularExpression headerRE { R"(^([^:]+):\s*([^\r\n]+))" };
263  QRegularExpression blankLineRE { R"(^[\r\n]*$)" };
264 
265  bool firstLine = true;
266  while (true)
267  {
268  if (!ctrl_socket.canReadLine())
269  {
270  bool ready = ctrl_socket.waitForReadyRead(30 * 1000);
271  if (!ready)
272  {
273  LOG(VB_RECORD, LOG_ERR, LOC + "RTSP server did not respond after 30s");
274  return false;
275  }
276  continue;
277  }
278 
279  QString line = ctrl_socket.readLine();
280  LOG(VB_RECORD, LOG_DEBUG, LOC + "sendMessage " +
281  QString("read: %1").arg(line.simplified()));
282 
283  QRegularExpressionMatch match;
284  if (firstLine)
285  {
286  match = firstLineRE.match(line);
287  if (!match.hasMatch())
288  {
289  return false;
290  }
291 
292  QStringList parts = match.capturedTexts();
293  int responseCode = parts.at(1).toInt();
294  //const QString& responseMsg = parts.at(2);
295 
296  if (responseCode != 200)
297  {
298  return false;
299  }
300  firstLine = false;
301  continue;
302  }
303 
304  match = blankLineRE.match(line);
305  if (match.hasMatch()) break;
306 
307  match = headerRE.match(line);
308  if (!match.hasMatch())
309  {
310  return false;
311  }
312  QStringList parts = match.capturedTexts();
313  m_headers.insert(parts.at(1).toUpper(), parts.at(2));
314  }
315 
316  QString cSeq;
317 
318  if (m_headers.contains("CSEQ"))
319  {
320  cSeq = m_headers["CSEQ"];
321  }
322 
323  if (cSeq != QString("%1").arg(m_cseq))
324  {
325  LOG(VB_RECORD, LOG_WARNING, LOC + QString("Expected CSeq of %1 but got %2").arg(m_cseq).arg(cSeq));
326  }
327 
328  ctrl_socket.disconnectFromHost();
329  if (ctrl_socket.state() != QAbstractSocket::UnconnectedState)
330  {
331  ctrl_socket.waitForDisconnected();
332  }
333 
334  return true;
335 }
336 
338 {
339  if (m_timer)
340  return;
341  m_timer = startTimer(timeout);
342  LOG(VB_RECORD, LOG_INFO, LOC + QString("startKeepAliveRequested(%1) m_timer:%2").arg(timeout).arg(m_timer));
343 }
344 
346 {
347  LOG(VB_RECORD, LOG_INFO, LOC + QString("stopKeepAliveRequested() m_timer:%1").arg(m_timer));
348  if (m_timer)
349  {
350  killTimer(m_timer);
351  }
352  m_timer = 0;
353 }
354 
355 void SatIPRTSP::timerEvent(QTimerEvent* timerEvent)
356 {
357  (void) timerEvent;
358  LOG(VB_RECORD, LOG_INFO, LOC + QString("Sending KeepAlive timer %1").arg(timerEvent->timerId()));
359 
360  QUrl url = QUrl(m_requestUrl);
361  url.setPath("/");
362  url.setQuery("");
363 
364  sendMessage(url, "OPTIONS");
365 }
366 
367 // RTSP RTP ReadHelper
368 //
369 // Receive RTP packets with stream data on UDP socket
370 // Read packets when signalled via readyRead on QUdpSocket
371 //
372 #define LOC_RH QString("SatIPRTSP_RH(%1): ").arg(m_parent->m_requestUrl.toString())
373 
375  : QObject(p)
376  , m_socket(new QUdpSocket(this))
377  , m_parent(p)
378 {
379  LOG(VB_RECORD, LOG_INFO, LOC_RH +
380  QString("Starting read helper for UDP (RTP) socket on port %1")
381  .arg(m_socket->localPort()));
382 
383  connect(m_socket, &QIODevice::readyRead, this, &SatIPRTSPReadHelper::ReadPending);
384 }
385 
387 {
388  delete m_socket;
389 }
390 
392 {
393  while (m_socket->hasPendingDatagrams())
394  {
395  QHostAddress sender;
396  quint16 senderPort = 0;
397 
399  QByteArray &data = packet.GetDataReference();
400  data.resize(m_socket->pendingDatagramSize());
401  m_socket->readDatagram(data.data(), data.size(), &sender, &senderPort);
402  m_parent->m_buffer->PushDataPacket(packet);
403  }
404 }
405 
406 // RTSP RTCP ReadHelper
407 //
408 // Receive RTCP packets with control messages on UDP socket
409 // Receive tuner state: lock and signal strength
410 //
411 #define LOC_RTCP QString("SatIPRTCP_RH(%1): ").arg(m_parent->m_requestUrl.toString())
412 
414  : QObject(p)
415  , m_socket(new QUdpSocket(this))
416  , m_parent(p)
417 {
418  LOG(VB_RECORD, LOG_INFO, LOC_RTCP +
419  QString("Starting read helper for UDP (RTCP) socket on port %1")
420  .arg(m_socket->localPort()));
421 
422  // Call ReadPending when there is a message received on m_socket
423  connect(m_socket, &QIODevice::readyRead, this, &SatIPRTCPReadHelper::ReadPending);
424 }
425 
427 {
428  delete m_socket;
429 }
430 
431 // Process a RTCP packet received on m_socket
433 {
434  while (m_socket->hasPendingDatagrams())
435  {
436 #if 0
437  LOG(VB_RECORD, LOG_INFO, "SatIPRTSP_RH " +
438  QString("Processing RTCP packet(pendingDatagramSize:%1)")
439  .arg(m_socket->pendingDatagramSize()));
440 #endif
441 
442  QHostAddress sender;
443  quint16 senderPort = 0;
444 
445  QByteArray buf = QByteArray(m_socket->pendingDatagramSize(), Qt::Uninitialized);
446  m_socket->readDatagram(buf.data(), buf.size(), &sender, &senderPort);
447 
448  SatIPRTCPPacket pkt = SatIPRTCPPacket(buf);
449  if (!pkt.IsValid())
450  {
451  LOG(VB_GENERAL, LOG_ERR, LOC_RTCP + "Invalid RTCP packet received");
452  continue;
453  }
454 
455  QStringList data = pkt.Data().split(";");
456  bool found = false;
457  int i = 0;
458 
459  while (!found && i < data.length())
460  {
461  const QString& item = data.at(i);
462 
463  if (item.startsWith("tuner="))
464  {
465  found = true;
466  QStringList tuner = item.split(",");
467 
468  if (tuner.length() > 2)
469  {
470  int level = tuner.at(1).toInt();
471  bool lock = tuner.at(2).toInt() != 0;
472 
473  LOG(VB_RECORD, LOG_DEBUG, "SatIPRTCP_RH " +
474  QString("Tuner lock:%1 level:%2").arg(lock).arg(level));
475 
476  m_parent->SetSigmonValues(lock, level);
477  }
478  }
479  i++;
480  }
481  }
482 }
483 
484 // SatIPRTSPWriteHelper
485 //
486 #define LOC_WH QString("SatIPRTSP_WH[%1]: ").arg(m_streamHandler->m_inputId)
487 
489  : m_parent(parent)
490  , m_streamHandler(handler)
491 {
492  m_timer = startTimer(20);
493 }
494 
495 void SatIPRTSPWriteHelper::timerEvent(QTimerEvent* /*event*/)
496 {
498  {
500 
502  {
503  RTPTSDataPacket ts_packet(pkt);
504 
505  if (!ts_packet.IsValid())
506  {
508  continue;
509  }
510 
511  uint exp_seq_num = m_lastSequenceNumber + 1;
512  uint seq_num = ts_packet.GetSequenceNumber();
513  if (m_lastSequenceNumber &&
514  ((exp_seq_num & 0xFFFF) != (seq_num & 0xFFFF)))
515  {
516  LOG(VB_RECORD, LOG_INFO, LOC_WH +
517  QString("Sequence number mismatch %1!=%2")
518  .arg(seq_num).arg(exp_seq_num));
519  if (seq_num > exp_seq_num)
520  {
521  m_lostInterval = seq_num - exp_seq_num;
523  }
524  }
525  m_lastSequenceNumber = seq_num;
526  m_lastTimeStamp = ts_packet.GetTimeStamp();
527 
528 #if 0
529  LOG(VB_RECORD, LOG_INFO, LOC_WH +
530  QString("Processing RTP packet(seq:%1 ts:%2, ts_data_size:%3) %4")
532  .arg((m_parent->m_valid && m_parent->m_validOld)?"processed":"discarded"));
533 #endif
535  {
536  int remainder = 0;
537  {
538  QMutexLocker locker(&m_streamHandler->m_listenerLock);
539  auto streamDataList = m_streamHandler->m_streamDataList;
540  if (!streamDataList.isEmpty())
541  {
542  const unsigned char *data_buffer = ts_packet.GetTSData();
543  size_t data_length = ts_packet.GetTSDataSize();
544 
545  for (auto sit = streamDataList.cbegin(); sit != streamDataList.cend(); ++sit)
546  {
547  remainder = sit.key()->ProcessData(data_buffer, data_length);
548  }
549 
550  m_streamHandler->WriteMPTS(data_buffer, data_length - remainder);
551  }
552  }
553 
554  if (remainder != 0)
555  {
556  LOG(VB_RECORD, LOG_INFO, LOC_WH +
557  QString("data_length = %1 remainder = %2")
558  .arg(ts_packet.GetTSDataSize()).arg(remainder));
559  }
560  }
561  }
563  }
565 }
RTPDataPacket::GetTimeStamp
uint GetTimeStamp(void) const
Definition: rtpdatapacket.h:100
SatIPRTSP::m_valid
bool m_valid
Definition: satiprtsp.h:139
rtcpdatapacket.h
SatIPRTSP::Setup
bool Setup(const QUrl &url)
Definition: satiprtsp.cpp:65
SatIPRTSPWriteHelper::m_lost
int m_lost
Definition: satiprtsp.h:82
RTPDataPacket::kPayLoadTypeTS
@ kPayLoadTypeTS
Definition: rtpdatapacket.h:86
SatIPRTSP::stopKeepAlive
void stopKeepAlive(void)
hardwareprofile.smolt.timeout
float timeout
Definition: smolt.py:103
SatIPRTCPReadHelper::m_parent
SatIPRTSP * m_parent
Definition: satiprtsp.h:62
SatIPRTSP::startKeepAliveRequested
void startKeepAliveRequested(int timeout)
Definition: satiprtsp.cpp:337
RTPTSDataPacket
RTP Transport Stream Data Packet.
Definition: rtptsdatapacket.h:17
SatIPRTSP::Play
bool Play(QStringList &pids)
Definition: satiprtsp.cpp:136
SatIPRTSPWriteHelper::m_timer
int m_timer
Definition: satiprtsp.h:78
StreamHandler::WriteMPTS
void WriteMPTS(const unsigned char *buffer, uint len)
Write out a copy of the raw MPTS.
Definition: streamhandler.cpp:349
PacketBuffer::FreePacket
void FreePacket(const UDPPacket &packet)
Frees an RTPDataPacket returned by PopDataPacket.
Definition: packetbuffer.cpp:56
SatIPRTSPWriteHelper::m_lostInterval
int m_lostInterval
Definition: satiprtsp.h:83
SatIPRTSP::GetSignalStrength
int GetSignalStrength()
Definition: satiprtsp.cpp:205
RTPTSDataPacket::GetTSDataSize
unsigned int GetTSDataSize(void) const
Definition: rtptsdatapacket.h:29
SatIPRTSP::m_buffer
PacketBuffer * m_buffer
Definition: satiprtsp.h:120
SatIPRTSP::SatIPRTSPWriteHelper
friend class SatIPRTSPWriteHelper
Definition: satiprtsp.h:90
SatIPRTSPWriteHelper::m_lastTimeStamp
uint m_lastTimeStamp
Definition: satiprtsp.h:80
SatIPRTSP::SatIPRTSPReadHelper
friend class SatIPRTSPReadHelper
Definition: satiprtsp.h:88
SatIPRTSP::sendMessage
bool sendMessage(const QUrl &url, const QString &msg, QStringList *additionalHeaders=nullptr)
Definition: satiprtsp.cpp:218
arg
arg(title).arg(filename).arg(doDelete))
SatIPRTSP::stopKeepAliveRequested
void stopKeepAliveRequested(void)
Definition: satiprtsp.cpp:345
SatIPRTSP::m_requestUrl
QUrl m_requestUrl
Definition: satiprtsp.h:119
SatIPRTSP::SatIPRTCPReadHelper
friend class SatIPRTCPReadHelper
Definition: satiprtsp.h:89
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
SatIPRTSP::m_headers
Headers m_headers
Definition: satiprtsp.h:131
SatIPRTSP::SetSigmonValues
void SetSigmonValues(bool lock, int level)
Definition: satiprtsp.cpp:211
LOC
#define LOC
-*- Mode: c++ -*-
Definition: satiprtsp.cpp:25
mythlogging.h
SatIPRTCPReadHelper::m_socket
QUdpSocket * m_socket
Definition: satiprtsp.h:59
SatIPRTSPReadHelper::~SatIPRTSPReadHelper
~SatIPRTSPReadHelper() override
Definition: satiprtsp.cpp:386
SatIPRTSP::timerEvent
void timerEvent(QTimerEvent *) override
Definition: satiprtsp.cpp:355
SatIPRTSP::m_timeout
int m_timeout
Definition: satiprtsp.h:134
hardwareprofile.config.p
p
Definition: config.py:33
SatIPRTSPWriteHelper::SatIPRTSPWriteHelper
SatIPRTSPWriteHelper(SatIPRTSP *, SatIPStreamHandler *)
Definition: satiprtsp.cpp:488
SatIPRTSP::HasLock
bool HasLock()
Definition: satiprtsp.cpp:199
SatIPRTSP::SatIPRTSP
SatIPRTSP(SatIPStreamHandler *)
Definition: satiprtsp.cpp:28
SatIPRTSP::m_readhelper
SatIPRTSPReadHelper * m_readhelper
Definition: satiprtsp.h:144
LOC_RH
#define LOC_RH
Definition: satiprtsp.cpp:372
SatIPRTCPReadHelper::SatIPRTCPReadHelper
SatIPRTCPReadHelper(SatIPRTSP *p)
Definition: satiprtsp.cpp:413
SatIPRTCPReadHelper::~SatIPRTCPReadHelper
~SatIPRTCPReadHelper() override
Definition: satiprtsp.cpp:426
SatIPRTSP::m_streamid
QString m_streamid
Definition: satiprtsp.h:130
SatIPRTSP::m_ctrlSocketLock
QMutex m_ctrlSocketLock
Definition: satiprtsp.h:136
RTPTSDataPacket::GetTSData
const unsigned char * GetTSData(void) const
Definition: rtptsdatapacket.h:24
SatIPRTSP::Teardown
bool Teardown()
Definition: satiprtsp.cpp:166
uint
unsigned int uint
Definition: compat.h:140
rtppacketbuffer.h
SatIPRTSP::~SatIPRTSP
~SatIPRTSP() override
Definition: satiprtsp.cpp:57
SatIPRTSP::m_rtcpReadhelper
SatIPRTCPReadHelper * m_rtcpReadhelper
Definition: satiprtsp.h:146
RTPDataPacket::GetSequenceNumber
uint GetSequenceNumber(void) const
Definition: rtpdatapacket.h:95
SatIPRTSP::m_timer
int m_timer
Definition: satiprtsp.h:133
SatIPRTSPReadHelper::m_socket
QUdpSocket * m_socket
Definition: satiprtsp.h:40
SatIPRTCPPacket::IsValid
bool IsValid() const
Definition: satiprtcppacket.h:20
StreamHandler::m_listenerLock
QMutex m_listenerLock
Definition: streamhandler.h:141
udppacketbuffer.h
SatIPRTSP::m_validOld
bool m_validOld
Definition: satiprtsp.h:140
SatIPRTSP::m_cseq
uint m_cseq
Definition: satiprtsp.h:128
SatIPRTSP::m_hasLock
bool m_hasLock
Definition: satiprtsp.h:141
SatIPRTCPPacket
Definition: satiprtcppacket.h:16
SatIPRTSPReadHelper::SatIPRTSPReadHelper
SatIPRTSPReadHelper(SatIPRTSP *p)
Definition: satiprtsp.cpp:374
PacketBuffer::HasAvailablePacket
bool HasAvailablePacket(void) const
Returns true if there are ordered packets ready for processing.
Definition: packetbuffer.cpp:26
satiprtsp.h
LOC2
#define LOC2
Definition: satiprtsp.cpp:26
SatIPRTCPReadHelper::ReadPending
void ReadPending(void)
Definition: satiprtsp.cpp:432
SatIPRTSP::m_writehelper
SatIPRTSPWriteHelper * m_writehelper
Definition: satiprtsp.h:145
StreamHandler::m_streamDataList
StreamDataList m_streamDataList
Definition: streamhandler.h:142
PacketBuffer::PushDataPacket
virtual void PushDataPacket(const UDPPacket &)=0
SatIPRTSP::m_sessionid
QString m_sessionid
Definition: satiprtsp.h:129
RTPDataPacket::GetPayloadType
uint GetPayloadType(void) const
Definition: rtpdatapacket.h:90
SatIPRTSP
Definition: satiprtsp.h:87
LOC_RTCP
#define LOC_RTCP
Definition: satiprtsp.cpp:411
rtptsdatapacket.h
satipstreamhandler.h
SatIPRTSP::m_sigmonLock
QMutex m_sigmonLock
Definition: satiprtsp.h:137
RTPDataPacket
RTP Data Packet.
Definition: rtpdatapacket.h:31
SatIPRTSP::startKeepAlive
void startKeepAlive(int timeout)
PacketBuffer::PopDataPacket
UDPPacket PopDataPacket(void)
Fetches a data packet for processing.
Definition: packetbuffer.cpp:31
SatIPRTSPWriteHelper::m_parent
SatIPRTSP * m_parent
Definition: satiprtsp.h:76
SatIPRTSPReadHelper::m_parent
SatIPRTSP * m_parent
Definition: satiprtsp.h:43
UDPPacketBuffer
Definition: udppacketbuffer.h:13
SatIPRTSP::m_signalStrength
int m_signalStrength
Definition: satiprtsp.h:142
UDPPacket::GetDataReference
QByteArray & GetDataReference(void)
Definition: udppacket.h:36
SatIPRTSPWriteHelper::m_streamHandler
SatIPStreamHandler * m_streamHandler
Definition: satiprtsp.h:77
satiprtcppacket.h
SatIPRTCPPacket::Data
QString Data() const
Definition: satiprtcppacket.h:21
SatIPRTSPWriteHelper::timerEvent
void timerEvent(QTimerEvent *) override
Definition: satiprtsp.cpp:495
mythsocket.h
UDPPacket
UDP Packet.
Definition: udppacket.h:21
SatIPRTSPWriteHelper::m_lastSequenceNumber
uint m_lastSequenceNumber
Definition: satiprtsp.h:79
SatIPStreamHandler
Definition: satipstreamhandler.h:25
RTPDataPacket::IsValid
bool IsValid(void) const override
IsValid() must return true before any data access methods are called, other than GetDataReference() a...
Definition: rtpdatapacket.h:40
SatIPRTSPReadHelper::ReadPending
void ReadPending(void)
Definition: satiprtsp.cpp:391
LOC_WH
#define LOC_WH
Definition: satiprtsp.cpp:486
PacketBuffer::GetEmptyPacket
UDPPacket GetEmptyPacket(void)
Gets a packet for use in PushDataPacket/PushFECPacket.
Definition: packetbuffer.cpp:42