diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2003-04-21 18:00:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2003-04-21 18:00:00 +0200 |
commit | 21a52ccb6d43cce35f7a381f55ea291195416f33 (patch) | |
tree | bc7d86214e695434ca7170bff799bcc4aaca5401 /dvbdevice.c | |
parent | 9f919801465f49be6b2118f54bd54df846e2f865 (diff) | |
download | vdr-patch-lnbsharing-21a52ccb6d43cce35f7a381f55ea291195416f33.tar.gz vdr-patch-lnbsharing-21a52ccb6d43cce35f7a381f55ea291195416f33.tar.bz2 |
Version 1.1.28vdr-1.1.28
- Using masks in EIT filtering to reduce the number of filters (thanks to Andreas
Schultz).
- Fixed handling Ca descriptors (thanks to Stefan Huelswitt).
- Now only those Ca descriptors are sent to a CAM that are actually understood
by that CAM.
- Re-enabled CAM communication during replay and on non-Ca channels. This requires
a DVB driver with firmware version 2613 or later.
- It is now possible to do simultaneous recording and replay with a single DVB
card, even with encrypted channels. This requires the use of the Link Layer
firmware, version 2613 or higher; the -icam firmware is still limited to live
encrypted channels only. Finally we have time shift for encrypted channels on
single card systems!
- Enhanced detection of pending user I/O from CAMs to avoid sluggish reaction
to remote control keypresses.
- Implemented "pause live video". You can now press "Menu/Yellow" or "Pause" on
your remote control while watching live video to start an instant recording
of the current programme and immediately start replaying that recording.
Diffstat (limited to 'dvbdevice.c')
-rw-r--r-- | dvbdevice.c | 66 |
1 files changed, 31 insertions, 35 deletions
diff --git a/dvbdevice.c b/dvbdevice.c index 9bbac2d..c25ebef 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 1.51 2003/04/12 15:06:11 kls Exp $ + * $Id: dvbdevice.c 1.54 2003/04/19 14:24:25 kls Exp $ */ #include "dvbdevice.h" @@ -116,13 +116,14 @@ bool cDvbTuner::IsTunedTo(const cChannel *Channel) const void cDvbTuner::Set(const cChannel *Channel, bool Tune) { cMutexLock MutexLock(&mutex); - channel = *Channel; + bool CaChange = !(Channel->GetChannelID() == channel.GetChannelID()); if (Tune) tunerStatus = tsSet; - else if (tunerStatus == tsCam) + else if (tunerStatus == tsCam && CaChange) tunerStatus = tsTuned; - if (Channel->Ca()) + if (Channel->Ca() && CaChange) startTime = time(NULL); + channel = *Channel; newSet.Broadcast(); } @@ -264,27 +265,29 @@ void cDvbTuner::Action(void) } } if (tunerStatus >= tsLocked) { - if (ciHandler && channel.Ca()) { + if (ciHandler) { if (ciHandler->Process()) { if (tunerStatus != tsCam) {//XXX TODO update in case the CA descriptors have changed - uchar buffer[2048]; - int length = cSIProcessor::GetCaDescriptors(channel.Source(), channel.Frequency(), channel.Sid(), sizeof(buffer), buffer); - if (length > 0) { - cCiCaPmt CaPmt(channel.Sid()); - CaPmt.AddCaDescriptor(length, buffer); - if (channel.Vpid()) - CaPmt.AddPid(channel.Vpid()); - if (channel.Apid1()) - CaPmt.AddPid(channel.Apid1()); - if (channel.Apid2()) - CaPmt.AddPid(channel.Apid2()); - if (channel.Dpid1()) - CaPmt.AddPid(channel.Dpid1()); - if (ciHandler->SetCaPmt(CaPmt)) { - tunerStatus = tsCam; - startTime = 0; - } - } + for (int Slot = 0; Slot < ciHandler->NumSlots(); Slot++) { + uchar buffer[2048]; + int length = cSIProcessor::GetCaDescriptors(channel.Source(), channel.Frequency(), channel.Sid(), ciHandler->GetCaSystemIds(Slot), sizeof(buffer), buffer); + if (length > 0) { + cCiCaPmt CaPmt(channel.Sid()); + CaPmt.AddCaDescriptor(length, buffer); + if (channel.Vpid()) + CaPmt.AddPid(channel.Vpid()); + if (channel.Apid1()) + CaPmt.AddPid(channel.Apid1()); + if (channel.Apid2()) + CaPmt.AddPid(channel.Apid2()); + if (channel.Dpid1()) + CaPmt.AddPid(channel.Dpid1()); + if (ciHandler->SetCaPmt(CaPmt, Slot)) { + tunerStatus = tsCam; + startTime = 0; + } + } + } } } else @@ -588,7 +591,8 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne if (!HasPid(Channel->Vpid())) { #ifdef DO_MULTIPLE_RECORDINGS if (Channel->Ca() > CACONFBASE) - needsDetachReceivers = true; + needsDetachReceivers = !ciHandler // only LL-firmware can do non-live CA channels + || Ca() != Channel->Ca(); else if (!IsPrimaryDevice()) result = true; #ifdef DO_REC_AND_PLAY_ON_PRIMARY_DEVICE @@ -609,7 +613,7 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) { - bool IsEncrypted = Channel->Ca() > CACONFBASE; + bool IsEncrypted = Channel->Ca() > CACONFBASE && !ciHandler; // only LL-firmware can do non-live CA channels bool DoTune = !dvbTuner->IsTunedTo(Channel); @@ -714,7 +718,7 @@ int cDvbDevice::NumAudioTracksDevice(void) const int n = 0; if (aPid1) n++; - if (Ca() <= MAXDEVICES && aPid2 && aPid1 != aPid2) // a Ca recording session blocks switching live audio tracks + if (Ca() <= MAXDEVICES && aPid2 && aPid1 != aPid2) // a CA recording session blocks switching live audio tracks n++; return n; } @@ -746,7 +750,7 @@ bool cDvbDevice::CanReplay(void) const if (Receiving()) return false; #endif - return cDevice::CanReplay() && Ca() <= MAXDEVICES; // we can only replay if there is no Ca recording going on + return cDevice::CanReplay() && (Ca() <= MAXDEVICES || ciHandler); // with non-LL-firmware we can only replay if there is no CA recording going on } bool cDvbDevice::SetPlayMode(ePlayMode PlayMode) @@ -775,15 +779,11 @@ bool cDvbDevice::SetPlayMode(ePlayMode PlayMode) CHECK(ioctl(fd_audio, AUDIO_SET_MUTE, false)); if (siProcessor) siProcessor->SetStatus(true); - if (ciHandler) - ciHandler->SetEnabled(true); break; case pmAudioVideo: case pmAudioOnlyBlack: if (siProcessor) siProcessor->SetStatus(false); - if (ciHandler) - ciHandler->SetEnabled(false); CHECK(ioctl(fd_video, VIDEO_SET_BLANK, true)); CHECK(ioctl(fd_audio, AUDIO_SELECT_SOURCE, AUDIO_SOURCE_MEMORY)); CHECK(ioctl(fd_audio, AUDIO_SET_AV_SYNC, PlayMode == pmAudioVideo)); @@ -794,8 +794,6 @@ bool cDvbDevice::SetPlayMode(ePlayMode PlayMode) case pmAudioOnly: if (siProcessor) siProcessor->SetStatus(false); - if (ciHandler) - ciHandler->SetEnabled(false); CHECK(ioctl(fd_video, VIDEO_SET_BLANK, true)); CHECK(ioctl(fd_audio, AUDIO_STOP, true)); CHECK(ioctl(fd_audio, AUDIO_CLEAR_BUFFER)); @@ -807,8 +805,6 @@ bool cDvbDevice::SetPlayMode(ePlayMode PlayMode) case pmExtern_THIS_SHOULD_BE_AVOIDED: if (siProcessor) siProcessor->SetStatus(false); - if (ciHandler) - ciHandler->SetEnabled(false); close(fd_video); close(fd_audio); fd_video = fd_audio = -1; |