diff --git a/mythtv/libs/libmythtv/recorders/cetonrtsp.cpp b/mythtv/libs/libmythtv/recorders/cetonrtsp.cpp
index 4d59e0d..0d39579 100644
a
|
b
|
CetonRTSP::CetonRTSP(const QString &ip, uint tuner, ushort port) : |
25 | 25 | _sessionId("0"), |
26 | 26 | _responseCode(-1), |
27 | 27 | _timeout(60), |
28 | | _timer(0) |
| 28 | _timer(0), |
| 29 | _doKeepAlive(false) // Ceton doesn't appear to support Keep Alive |
29 | 30 | { |
30 | 31 | _requestUrl.setHost(ip); |
31 | 32 | _requestUrl.setPort(port); |
… |
… |
CetonRTSP::CetonRTSP(const QUrl &url) : |
40 | 41 | _requestUrl(url), |
41 | 42 | _responseCode(-1), |
42 | 43 | _timeout(60), |
43 | | _timer(0) |
| 44 | _timer(0), |
| 45 | _doKeepAlive(true) |
44 | 46 | { |
45 | 47 | if (url.port() < 0) |
46 | 48 | { |
… |
… |
bool CetonRTSP::Teardown(void) |
479 | 481 | |
480 | 482 | void CetonRTSP::StartKeepAlive() |
481 | 483 | { |
482 | | if (_timer) |
| 484 | if (_timer || !_doKeepAlive) |
483 | 485 | return; |
484 | 486 | int timeout = std::max(_timeout - 5, 5); |
485 | 487 | LOG(VB_RECORD, LOG_DEBUG, LOC + |
diff --git a/mythtv/libs/libmythtv/recorders/cetonrtsp.h b/mythtv/libs/libmythtv/recorders/cetonrtsp.h
index d76851d..2820832 100644
a
|
b
|
class CetonRTSP : QObject |
37 | 37 | bool Play(void); |
38 | 38 | bool Teardown(void); |
39 | 39 | |
| 40 | void SetKeepAlive(bool keepalive) { _doKeepAlive = keepalive; } |
40 | 41 | void StartKeepAlive(void); |
41 | 42 | void StopKeepAlive(void); |
42 | 43 | |
… |
… |
protected: |
57 | 58 | QUrl _requestUrl; |
58 | 59 | QUrl _controlUrl; |
59 | 60 | |
60 | | int _responseCode; |
61 | | QString _responseMessage; |
62 | | Params _responseHeaders; |
63 | | QByteArray _responseContent; |
64 | | int _timeout; |
65 | | int _timer; |
| 61 | int _responseCode; |
| 62 | QString _responseMessage; |
| 63 | Params _responseHeaders; |
| 64 | QByteArray _responseContent; |
| 65 | int _timeout; |
| 66 | int _timer; |
| 67 | bool _doKeepAlive; |
66 | 68 | |
67 | 69 | static QMutex _rtspMutex; |
68 | 70 | |
diff --git a/mythtv/libs/libmythtv/recorders/cetonstreamhandler.cpp b/mythtv/libs/libmythtv/recorders/cetonstreamhandler.cpp
index a83986b..a347bfd 100644
a
|
b
|
CetonStreamHandler::CetonStreamHandler(const QString &device) : |
152 | 152 | .arg(_ip_address).arg(rtspPort).arg(_tuner); |
153 | 153 | m_tuning = IPTVTuningData(url, 0, IPTVTuningData::kNone, "", 0, "", 0); |
154 | 154 | m_use_rtp_streaming = true; |
| 155 | m_doKeepAlive = false; // Ceton doesn't support KeepAlive |
155 | 156 | |
156 | 157 | _valid = true; |
157 | 158 | |
diff --git a/mythtv/libs/libmythtv/recorders/iptvstreamhandler.cpp b/mythtv/libs/libmythtv/recorders/iptvstreamhandler.cpp
index cab9be2..1692b31 100644
a
|
b
|
IPTVStreamHandler::IPTVStreamHandler(const IPTVTuningData &tuning) : |
111 | 111 | m_buffer(NULL), |
112 | 112 | m_rtsp_rtp_port(0), |
113 | 113 | m_rtsp_rtcp_port(0), |
114 | | m_rtsp_ssrc(0) |
| 114 | m_rtsp_ssrc(0), |
| 115 | m_doKeepAlive(true) |
115 | 116 | { |
116 | 117 | memset(m_sockets, 0, sizeof(m_sockets)); |
117 | 118 | memset(m_read_helpers, 0, sizeof(m_read_helpers)); |
… |
… |
void IPTVStreamHandler::run(void) |
134 | 135 | if (m_tuning.GetURL(0).scheme().toLower() == "rtsp") |
135 | 136 | { |
136 | 137 | rtsp = new CetonRTSP(m_tuning.GetURL(0)); |
| 138 | rtsp->SetKeepAlive(m_doKeepAlive); |
137 | 139 | |
138 | 140 | // Check RTSP capabilities |
139 | 141 | QStringList options; |
… |
… |
void IPTVStreamHandler::run(void) |
299 | 301 | "Starting recording (RTP initialization failed). Aborting."); |
300 | 302 | error = true; |
301 | 303 | } |
302 | | if (m_rtsp_rtcp_port > 0) |
| 304 | if (m_rtsp_rtcp_port > 0 && m_doKeepAlive) |
303 | 305 | { |
304 | 306 | m_write_helper->SendRTCPReport(); |
305 | 307 | m_write_helper->StartRTCPRR(); |
diff --git a/mythtv/libs/libmythtv/recorders/iptvstreamhandler.h b/mythtv/libs/libmythtv/recorders/iptvstreamhandler.h
index 27f1a05..98842fe 100644
a
|
b
|
class IPTVStreamHandler : public StreamHandler |
89 | 89 | |
90 | 90 | protected: |
91 | 91 | IPTVStreamHandler(const IPTVTuningData &tuning); |
| 92 | virtual void SetKeepAlive(bool keepalive) |
| 93 | { |
| 94 | m_doKeepAlive = keepalive; |
| 95 | } |
92 | 96 | |
93 | 97 | virtual void run(void); // MThread |
94 | 98 | |
… |
… |
class IPTVStreamHandler : public StreamHandler |
105 | 109 | uint32_t m_rtsp_ssrc; |
106 | 110 | QHostAddress m_rtcp_dest; |
107 | 111 | |
| 112 | bool m_doKeepAlive; |
| 113 | |
108 | 114 | // for implementing Get & Return |
109 | 115 | static QMutex s_handlers_lock; |
110 | 116 | static QMap<QString, IPTVStreamHandler*> s_handlers; |