summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS3
-rw-r--r--HISTORY2
-rw-r--r--server/livestreamer.c23
-rw-r--r--server/livestreamer.h1
4 files changed, 21 insertions, 8 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index ae9918f..0432480 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -119,9 +119,10 @@ Jori Hamalainen
for extensive testing while making stream compatible to Network Media Tank
for adding Network Media Tank browser support to HTML pages
-owagner
+Oliver Wagner
for pointing out a problem with the encrypted channel switching fix
for suggesting use of SO_KEEPALIVE socket option to detect dead sockets
+ for making cStatus::ChannelChange re-tune only if CA IDs changed
Joachim König-Baltes
for fixing Min/MaxPriority parsing
diff --git a/HISTORY b/HISTORY
index f3f444b..f71613f 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,6 +1,8 @@
VDR Plugin 'streamdev' Revision History
---------------------------------------
+- Implemented remuxing of recordings
+- Make ChannelChange retune only if CA IDs changed (thanks to Oliver Wagner)
- Implemented VDR 2.1.4 cStatus::ChannelChange(...)
- Call detach only if receiver is attached
- Try changing to other device when receiver got detached
diff --git a/server/livestreamer.c b/server/livestreamer.c
index 0d540c9..41befe4 100644
--- a/server/livestreamer.c
+++ b/server/livestreamer.c
@@ -353,6 +353,7 @@ cStreamdevLiveStreamer::cStreamdevLiveStreamer(const cServerConnection *Connecti
m_Device = SwitchDevice(Channel, Priority);
if (m_Device)
SetChannel(StreamType, Apid, Dpid);
+ memcpy(m_Caids,Channel->Caids(),sizeof(m_Caids));
}
}
@@ -646,14 +647,22 @@ bool cStreamdevLiveStreamer::ProvidesChannel(const cChannel *Channel, int Priori
void cStreamdevLiveStreamer::ChannelChange(const cChannel *Channel)
{
- if (Running() && m_Device && m_Device->ProvidesTransponder(Channel) && ISTRANSPONDER(m_Channel->Transponder(), Channel->Transponder())) {
- Detach();
- if (m_Device->SwitchChannel(m_Channel, false)) {
- Attach();
- dsyslog("streamdev: channel %d (%s) changed", Channel->Number(), Channel->Name());
+ if (Running() && m_Device && m_Channel == Channel) {
+ // Check whether the Caids actually changed
+ // If not, no need to re-tune, probably just an Audio PID update
+ if (!memcmp(m_Caids, Channel->Caids(), sizeof(m_Caids))) {
+ dsyslog("streamdev: channel %d (%s) changed, but caids remained the same, not re-tuning", Channel->Number(), Channel->Name());
+ }
+ else {
+ Detach();
+ if (m_Device->SwitchChannel(m_Channel, false)) {
+ Attach();
+ dsyslog("streamdev: channel %d (%s) changed, re-tuned", Channel->Number(), Channel->Name());
+ memcpy(m_Caids, Channel->Caids(), sizeof(m_Caids));
+ }
+ else
+ isyslog("streamdev: failed to re-tune after channel %d (%s) changed", Channel->Number(), Channel->Name());
}
- else
- isyslog("streamdev: failed to re-tune after channel %d (%s) changed", Channel->Number(), Channel->Name());
}
}
diff --git a/server/livestreamer.h b/server/livestreamer.h
index a9f2a08..b525c7b 100644
--- a/server/livestreamer.h
+++ b/server/livestreamer.h
@@ -25,6 +25,7 @@ private:
int m_Priority;
int m_Pids[MAXRECEIVEPIDS + 1];
int m_NumPids;
+ int m_Caids[MAXCAIDS + 1];
const cChannel *m_Channel;
cDevice *m_Device;
cStreamdevLiveReceiver *m_Receiver;