MythTV  master
Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CetonRTSP Class Reference

#include <libmythtv/recorders/cetonrtsp.h>

Inheritance diagram for CetonRTSP:
[legend]
Collaboration diagram for CetonRTSP:
[legend]

Public Member Functions

 CetonRTSP (const QString &ip, uint tuner, ushort port)
 
 CetonRTSP (const QUrl &url)
 
 ~CetonRTSP () override
 
bool GetOptions (QStringList &options)
 
bool Describe (void)
 
bool Setup (ushort clientPort1, ushort clientPort2, ushort &rtpPort, ushort &rtcpPort, uint32_t &ssrc)
 
bool Play (void)
 
bool Teardown (void)
 
void StartKeepAlive (void)
 
void StopKeepAlive (void)
 

Protected Member Functions

bool ProcessRequest (const QString &method, const QStringList *headers=nullptr, bool use_control=false, bool waitforanswer=true, const QString &alternative=QString())
 

Private Member Functions

QString readParameters (const QString &key, Params &parameters)
 readParameters. More...
 
QUrl GetBaseUrl (void)
 Return the base URL for the last DESCRIBE answer. More...
 
void timerEvent (QTimerEvent *event) override
 

Static Private Member Functions

static QStringList splitLines (const QByteArray &lines)
 splitLines. More...
 

Private Attributes

QTcpSocket * m_socket {nullptr}
 
uint m_sequenceNumber {0}
 
QString m_sessionId {"0"}
 
QUrl m_requestUrl
 
QUrl m_controlUrl
 
int m_responseCode {-1}
 
QString m_responseMessage
 
Params m_responseHeaders
 
QByteArray m_responseContent
 
std::chrono::seconds m_timeout {60s}
 
int m_timer {0}
 
bool m_canGetParameter {false}
 

Static Private Attributes

static QMutex s_rtspMutex
 

Detailed Description

Definition at line 26 of file cetonrtsp.h.

Constructor & Destructor Documentation

◆ CetonRTSP() [1/2]

CetonRTSP::CetonRTSP ( const QString &  ip,
uint  tuner,
ushort  port 
)
explicit

Definition at line 24 of file cetonrtsp.cpp.

◆ CetonRTSP() [2/2]

CetonRTSP::CetonRTSP ( const QUrl &  url)
explicit

Definition at line 32 of file cetonrtsp.cpp.

◆ ~CetonRTSP()

CetonRTSP::~CetonRTSP ( )
override

Definition at line 42 of file cetonrtsp.cpp.

Member Function Documentation

◆ GetOptions()

bool CetonRTSP::GetOptions ( QStringList &  options)

Definition at line 244 of file cetonrtsp.cpp.

Referenced by IPTVStreamHandler::run().

◆ Describe()

bool CetonRTSP::Describe ( void  )

Definition at line 327 of file cetonrtsp.cpp.

Referenced by IPTVStreamHandler::run().

◆ Setup()

bool CetonRTSP::Setup ( ushort  clientPort1,
ushort  clientPort2,
ushort &  rtpPort,
ushort &  rtcpPort,
uint32_t &  ssrc 
)

Definition at line 398 of file cetonrtsp.cpp.

Referenced by IPTVStreamHandler::run().

◆ Play()

bool CetonRTSP::Play ( void  )

Definition at line 453 of file cetonrtsp.cpp.

Referenced by IPTVStreamHandler::run().

◆ Teardown()

bool CetonRTSP::Teardown ( void  )

Definition at line 461 of file cetonrtsp.cpp.

Referenced by IPTVStreamHandler::run().

◆ StartKeepAlive()

void CetonRTSP::StartKeepAlive ( void  )

Definition at line 476 of file cetonrtsp.cpp.

Referenced by Play().

◆ StopKeepAlive()

void CetonRTSP::StopKeepAlive ( void  )

Definition at line 486 of file cetonrtsp.cpp.

Referenced by Teardown(), and ~CetonRTSP().

◆ ProcessRequest()

bool CetonRTSP::ProcessRequest ( const QString &  method,
const QStringList *  headers = nullptr,
bool  use_control = false,
bool  waitforanswer = true,
const QString &  alternative = QString() 
)
protected

Definition at line 47 of file cetonrtsp.cpp.

Referenced by Describe(), GetOptions(), Play(), Setup(), Teardown(), and timerEvent().

◆ splitLines()

QStringList CetonRTSP::splitLines ( const QByteArray &  lines)
staticprivate

splitLines.

prepare SDP content for easy read

Definition at line 260 of file cetonrtsp.cpp.

Referenced by Describe().

◆ readParameters()

QString CetonRTSP::readParameters ( const QString &  key,
Params parameters 
)
private

readParameters.

Scan a line like: Session: 1234556;destination=xx;client_port and return the first entry and fill the arguments in the provided Params

Definition at line 283 of file cetonrtsp.cpp.

Referenced by Setup().

◆ GetBaseUrl()

QUrl CetonRTSP::GetBaseUrl ( void  )
private

Return the base URL for the last DESCRIBE answer.

Definition at line 314 of file cetonrtsp.cpp.

Referenced by Describe().

◆ timerEvent()

void CetonRTSP::timerEvent ( QTimerEvent *  event)
overrideprivate

Definition at line 496 of file cetonrtsp.cpp.

Member Data Documentation

◆ m_socket

QTcpSocket* CetonRTSP::m_socket {nullptr}
private

Definition at line 57 of file cetonrtsp.h.

Referenced by ProcessRequest(), and Teardown().

◆ m_sequenceNumber

uint CetonRTSP::m_sequenceNumber {0}
private

Definition at line 58 of file cetonrtsp.h.

Referenced by ProcessRequest().

◆ m_sessionId

QString CetonRTSP::m_sessionId {"0"}
private

Definition at line 59 of file cetonrtsp.h.

Referenced by ProcessRequest(), Setup(), and Teardown().

◆ m_requestUrl

QUrl CetonRTSP::m_requestUrl
private

Definition at line 60 of file cetonrtsp.h.

Referenced by CetonRTSP(), GetBaseUrl(), and ProcessRequest().

◆ m_controlUrl

QUrl CetonRTSP::m_controlUrl
private

Definition at line 61 of file cetonrtsp.h.

Referenced by Describe(), and ProcessRequest().

◆ m_responseCode

int CetonRTSP::m_responseCode {-1}
private

Definition at line 63 of file cetonrtsp.h.

Referenced by ProcessRequest().

◆ m_responseMessage

QString CetonRTSP::m_responseMessage
private

Definition at line 64 of file cetonrtsp.h.

Referenced by ProcessRequest().

◆ m_responseHeaders

Params CetonRTSP::m_responseHeaders
private

Definition at line 65 of file cetonrtsp.h.

Referenced by GetBaseUrl(), GetOptions(), ProcessRequest(), and readParameters().

◆ m_responseContent

QByteArray CetonRTSP::m_responseContent
private

Definition at line 66 of file cetonrtsp.h.

Referenced by Describe(), and ProcessRequest().

◆ m_timeout

std::chrono::seconds CetonRTSP::m_timeout {60s}
private

Definition at line 67 of file cetonrtsp.h.

Referenced by Setup(), and StartKeepAlive().

◆ m_timer

int CetonRTSP::m_timer {0}
private

Definition at line 68 of file cetonrtsp.h.

Referenced by StartKeepAlive(), and StopKeepAlive().

◆ m_canGetParameter

bool CetonRTSP::m_canGetParameter {false}
private

Definition at line 69 of file cetonrtsp.h.

Referenced by GetOptions(), and timerEvent().

◆ s_rtspMutex

QMutex CetonRTSP::s_rtspMutex
staticprivate

Definition at line 71 of file cetonrtsp.h.

Referenced by ProcessRequest(), and Teardown().


The documentation for this class was generated from the following files: