diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2012-09-10 16:05:00 +0200 |
---|---|---|
committer | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2012-09-11 23:49:53 +0200 |
commit | d34026c18b6cf0eddd7293ad9af57affacb73365 (patch) | |
tree | 887695e2393b668ad8a370753f3258f2798de97f /device.c | |
parent | 046b506748196e9e2da7472a4ff76ff593e67b76 (diff) | |
download | vdr-patches-d34026c18b6cf0eddd7293ad9af57affacb73365.tar.gz vdr-patches-d34026c18b6cf0eddd7293ad9af57affacb73365.tar.bz2 |
Version 1.7.30
VDR developer version 1.7.30 is now available at
ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.30.tar.bz2
A 'diff' against the previous version is available at
ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.29-1.7.30.diff
MD5 checksums:
c6d75f2962bc3e22d9313c0ee4fa113a vdr-1.7.30.tar.bz2
a63098efcc58bc697d6b890097d9c370 vdr-1.7.29-1.7.30.diff
WARNING:
========
This is a developer version. Even though I use it in my productive
environment. I strongly recommend that you only use it under controlled
conditions and for testing and debugging.
The default skin "LCARS" displays the signal strengths and qualities of
all devices in its main menu. For devices that have an stb0899 frontend chip
(like the TT-budget S2-3200) retrieving this information from the driver is
rather slow, which results in a sluggish response to user input in the main
menu. To speed this up you may want to apply the patches from
ftp://ftp.tvdr.de/vdr/Developer/Driver-Patches
to the LinuxDVB driver source.
From the HISTORY file:
- Fixed sorting recordings in the top level video directory.
- Fixed handling control characters in SI data in case of UTF-8 encoded strings
(thanks to Mehdi Karamnejad for reporting a problem with garbled UTF-8 EPG data
and helping to debug it).
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
- When checking whether a video directory is empty, file names that start with a
dot ('.') are now ignored and will be implicitly removed if the directory contains
no other files. This fixes the leftover ".sort" files that were introduced in
version 1.7.29.
- Added IsUpdate() to the EPG handler interface (thanks to Jörg Wendel).
- Fixed detecting transfer mode on full featured DVB cards (thanks to Stefan Huelswitt
for reporting a problem with updating CA descriptors in such cases).
- Fixed a race condition when zapping in transfer mode (reported by Reinhard Nissl).
This involves a slight change in the semantics of the cReceiver::Activate() function,
which is now called with 'false' after the receiver has been detached from the
device.
- The new function cDevice::ReadFilter() can be used by devices to implement their
own way of retrieving section filter data (thanks to Deti Fliegl).
- The new function cDevice::HasInternalCam() can be implemented by devices that
provide encrypted channels in an already decrypted form, without requiring explicit
handling of a CAM (thanks to Tobias Grimm).
- VDR can now be built according to the FHS ("File system Hierarchy Standard") by
activating the line
#USEFHS = 1
in a copy of the file Make.config.template (thanks to Dennis Bendlin, as well as
Christopher Reimer and Udo Richter for contributing to the patch).
- By default (without FHS support) the config directory is now set to the value
given in the -v option if only -v and no -c is given.
- Fixed a long delay at the end when replaying a recording that has stopped recording
less than an hour ago (typically time shift mode or a freshly edited recording).
- Fixed getting the file size and number of frames of ongoing recordings (only the
timestamp of the recording's directory was checked, while it should have been that
of the index file).
- Fixed sluggish response when manipulating editing marks while a cutting thread
is running (reported by Torsten Lang).
- The new setup options "OSD/Color key [0123]" can be used to adjust the sequence
of the color buttons displayed in the menus to that of the color keys on your
remote control (based on a patch from Oliver Schinagl).
Authors of plugins that implement skins may want to adapt their SetButtons()
function in order to make use of this new feature. See, for instance, the function
cSkinClassicDisplayMenu::SetButtons() in skinclassic.c for details.
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 29 |
1 files changed, 19 insertions, 10 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 2.62 2012/06/10 13:13:18 kls Exp $ + * $Id: device.c 2.67 2012/09/02 09:26:36 kls Exp $ */ #include "device.h" @@ -241,6 +241,7 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView int NumCamSlots = CamSlots.Count(); int SlotPriority[NumCamSlots]; int NumUsableSlots = 0; + bool InternalCamNeeded = false; if (Channel->Ca() >= CA_ENCRYPTED_MIN) { for (cCamSlot *CamSlot = CamSlots.First(); CamSlot; CamSlot = CamSlots.Next(CamSlot)) { SlotPriority[CamSlot->Index()] = MAXPRIORITY + 1; // assumes it can't be used @@ -254,7 +255,7 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView } } if (!NumUsableSlots) - return NULL; // no CAM is able to decrypt this channel + InternalCamNeeded = true; // no CAM is able to decrypt this channel } bool NeedsDetachReceivers = false; @@ -268,11 +269,14 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView for (int i = 0; i < numDevices; i++) { if (Channel->Ca() && Channel->Ca() <= CA_DVB_MAX && Channel->Ca() != device[i]->CardIndex() + 1) continue; // a specific card was requested, but not this one - if (NumUsableSlots && !CamSlots.Get(j)->Assign(device[i], true)) + bool HasInternalCam = device[i]->HasInternalCam(); + if (InternalCamNeeded && !HasInternalCam) + continue; // no CAM is able to decrypt this channel and the device uses vdr handled CAMs + if (NumUsableSlots && !HasInternalCam && !CamSlots.Get(j)->Assign(device[i], true)) continue; // CAM slot can't be used with this device bool ndr; if (device[i]->ProvidesChannel(Channel, Priority, &ndr)) { // this device is basically able to do the job - if (NumUsableSlots && device[i]->CamSlot() && device[i]->CamSlot() != CamSlots.Get(j)) + if (NumUsableSlots && !HasInternalCam && device[i]->CamSlot() && device[i]->CamSlot() != CamSlots.Get(j)) ndr = true; // using a different CAM slot requires detaching receivers // Put together an integer number that reflects the "impact" using // this device would have on the overall system. Each condition is represented @@ -287,18 +291,18 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView imp <<= 4; imp |= GetClippedNumProvidedSystems(4, device[i]) - 1; // avoid cards which support multiple delivery systems imp <<= 1; imp |= device[i] == cTransferControl::ReceiverDevice(); // avoid the Transfer Mode receiver device imp <<= 8; imp |= device[i]->Priority() - IDLEPRIORITY; // use the device with the lowest priority (- IDLEPRIORITY to assure that values -100..99 can be used) - imp <<= 8; imp |= (NumUsableSlots ? SlotPriority[j] : IDLEPRIORITY) - IDLEPRIORITY; // use the CAM slot with the lowest priority (- IDLEPRIORITY to assure that values -100..99 can be used) + imp <<= 8; imp |= ((NumUsableSlots && !HasInternalCam) ? SlotPriority[j] : IDLEPRIORITY) - IDLEPRIORITY;// use the CAM slot with the lowest priority (- IDLEPRIORITY to assure that values -100..99 can be used) imp <<= 1; imp |= ndr; // avoid devices if we need to detach existing receivers - imp <<= 1; imp |= NumUsableSlots ? 0 : device[i]->HasCi(); // avoid cards with Common Interface for FTA channels + imp <<= 1; imp |= (NumUsableSlots || InternalCamNeeded) ? 0 : device[i]->HasCi(); // avoid cards with Common Interface for FTA channels imp <<= 1; imp |= device[i]->AvoidRecording(); // avoid SD full featured cards - imp <<= 1; imp |= NumUsableSlots ? !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), j + 1) : 0; // prefer CAMs that are known to decrypt this channel + imp <<= 1; imp |= (NumUsableSlots && !HasInternalCam) ? !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), j + 1) : 0; // prefer CAMs that are known to decrypt this channel imp <<= 1; imp |= device[i]->IsPrimaryDevice(); // avoid the primary device if (imp < Impact) { // This device has less impact than any previous one, so we take it. Impact = imp; d = device[i]; NeedsDetachReceivers = ndr; - if (NumUsableSlots) + if (NumUsableSlots && !HasInternalCam) s = CamSlots.Get(j); } } @@ -593,6 +597,11 @@ int cDevice::OpenFilter(u_short Pid, u_char Tid, u_char Mask) return -1; } +int cDevice::ReadFilter(int Handle, void *Buffer, size_t Length) +{ + return safe_read(Handle, Buffer, Length); +} + void cDevice::CloseFilter(int Handle) { close(Handle); @@ -1195,7 +1204,7 @@ bool cDevice::Replaying(void) const bool cDevice::Transferring(void) const { - return ActualDevice() != PrimaryDevice(); + return cTransferControl::ReceiverDevice() != NULL; } bool cDevice::AttachPlayer(cPlayer *Player) @@ -1666,11 +1675,11 @@ void cDevice::Detach(cReceiver *Receiver) cMutexLock MutexLock(&mutexReceiver); for (int i = 0; i < MAXRECEIVERS; i++) { if (receiver[i] == Receiver) { - Receiver->Activate(false); Lock(); receiver[i] = NULL; Receiver->device = NULL; Unlock(); + Receiver->Activate(false); for (int n = 0; n < Receiver->numPids; n++) DelPid(Receiver->pids[n]); } |