1
0
mirror of https://github.com/rofafor/vdr-plugin-satip.git synced 2023-10-10 13:37:42 +02:00

Fixed retuning.

This commit is contained in:
Rolf Ahrenberg 2014-12-02 23:17:35 +02:00
parent f6ab251294
commit 98437ce57e

View File

@ -182,17 +182,18 @@ bool cSatipTuner::Connect(void)
debug("cSatipTuner::%s() [device %d]", __FUNCTION__, deviceIdM); debug("cSatipTuner::%s() [device %d]", __FUNCTION__, deviceIdM);
if (!isempty(*streamAddrM)) { if (!isempty(*streamAddrM)) {
cString connectionUri = cString::sprintf("rtsp://%s/", *streamAddrM); cString connectionUri = cString::sprintf("rtsp://%s", *streamAddrM);
cString uri = cString::sprintf("%s?%s", *connectionUri, *streamParamM);
// Just retune // Just retune
if (streamIdM >= 0) { if (streamIdM >= 0) {
debug("cSatipTuner::%s(): retune [device %d]", __FUNCTION__, deviceIdM); cString uri = cString::sprintf("%s/stream=%d?%s", *connectionUri, streamIdM, *streamParamM);
if (rtspM.Setup(*uri, rtpM.Port(), rtcpM.Port())) { debug("cSatipTuner::%s(): retuning [device %d]", __FUNCTION__, deviceIdM);
if (rtspM.Play(*uri)) {
keepAliveM.Set(timeoutM); keepAliveM.Set(timeoutM);
return true; return true;
} }
} }
else if (rtspM.Options(*connectionUri)) { else if (rtspM.Options(*connectionUri)) {
cString uri = cString::sprintf("%s/?%s", *connectionUri, *streamParamM);
// Flush any old content // Flush any old content
rtpM.Flush(); rtpM.Flush();
rtcpM.Flush(); rtcpM.Flush();