diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2008-02-17 18:00:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2008-02-17 18:00:00 +0100 |
commit | 9279cb21cd311cbb141d506ba9d17c3a057b4d3c (patch) | |
tree | 670ab22e83d5abd18c2e15e85504c58d09651b87 /device.c | |
parent | e3887083391d10f8cfcd1d8ac65a99d9978f05f2 (diff) | |
download | vdr-patch-lnbsharing-9279cb21cd311cbb141d506ba9d17c3a057b4d3c.tar.gz vdr-patch-lnbsharing-9279cb21cd311cbb141d506ba9d17c3a057b4d3c.tar.bz2 |
Version 1.5.15vdr-1.5.15
- Updated the Italian OSD texts (thanks to Diego Pierotto).
- Added option -i to the pictures plugin's pic2mpg to ignore unknown file types.
- Revoked the switch to the "multiproto" driver in order to make a new stable
version before making this big switch and forcing all users to install a
driver that is not yet in the kernel source. The removed code will reappear
in version 1.7.0.
Note that you may need to switch back to an older version of your channels.conf
file if you have already used version 1.5.14, because it introduced new parameters.
- Added the new command line option --userdump to enable core dumps in case VDR
is run as root with option -u (thanks to Hans-Werner Hilse).
- Speeded up anti-aliased font rendering by caching the blend indexes (based on
a suggestion by Martin Wache).
- Fixed setting the OSD area in the pictures plugin.
- Ignoring "repeat" and "release" keys in the time search entry mode during replay,
to avoid inadvertently leaving it in case a key is pressed too long (suggested
by Andreas Brugger).
- Improved sending all frames to devices that can handle them in fast forward
trick speeds, including subtitles (thanks to Timo Eskola).
- The section handler is now stopped before the device is destroyed, to avoid
accessing file handles after they have become invalid (thanks to Reinhard
Nissl for reporting an invalid access when ending VDR, and to Deti Fliegl for
a patch that was used to implement StopSectionHandler()).
- Fixed setting the date in the channel display of the classic and sttng skins,
to avoid unnecessary OSD access (thanks to Marco Schlüßler).
- The free disk space is now also displayed in the title of the "Recordings"
menu (suggested by Walter Koch).
- Changed the message "Upcoming VPS recording!" to "Upcoming recording!" because
it applies to non-VPS recordings as well.
- Fixed a loss of a timer's 'recording' flag after modifying it via MODT.
- Fixed detecting directories in cFileNameList::Load().
- Running the thread that removes deleted recordings at a low priority to (maybe)
avoid stuttering replay in case the thread is run during replay.
- Limiting the length of the recording name in timers in case VDR is run with
--vfat, in order to avoid names that are too long for Windows (suggested by Rolf
Ahrenberg).
- Using cString::sprintf() instead of asprintf() (thanks to Wolfgang Rohdewald
for pointing out a possible problem if the return value is not checked).
Plugin authors may want to consider doing the same. For convenience there is now
an additional version of cString::sprintf() that accepts a va_list parameter.
- When deleting the recording that is currently replayed, the replay is now
stopped immediately (thanks to Mikko Matilainen for reporting a possible crash
if the Info key is pressed after deleting the currently replayed recording).
- Updated the Russian OSD texts (thanks to Oleg Roitburd).
- When determining the amount of free disk space, any deleted (but not yet removed)
recordings on different file systems (that are mounted under the video directory)
are no longer taken into account.
- When running out of disk space during a recording, only such deleted or old
recordings are removed, that actually are on the video directory file system(s).
This prevents VDR from accidentally deleting recordings on other file systems,
which would not add any free space to the video directory.
- Implemented the cStatus, cDevice and cPlayer functions for setting subtitle tracks
in plugins (thanks to Petri Hintukainen).
- Added cStatus::TimerChange() to inform plugins about changes to the list of timers
(based on a patch from Benedikt Elser).
- Added new cStatus functions to the 'status' plugin.
- Added missing #include <limits.h> to epg.c and menuitems.h (thanks to Ville Skyttä).
- The new function cSkin::SetScrollbar() can be implemented by skins to display
a scrollbar in every list menu. The 'classic' and 'sttng' skins have been
changed accordingly, as well as the 'skincurses' plugin.
- Introduced 'operator const void * ()' in cString to catch cases where operator*()
should be used.
- Fixed calculating the scrollbar sizes in the skins.
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 60 |
1 files changed, 29 insertions, 31 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 1.149 2008/01/27 10:40:46 kls Exp $ + * $Id: device.c 1.153 2008/02/16 13:52:11 kls Exp $ */ #include "device.h" @@ -264,11 +264,6 @@ cDevice::~cDevice() DetachAllReceivers(); delete liveSubtitle; delete dvbSubtitleConverter; - delete nitFilter; - delete sdtFilter; - delete patFilter; - delete eitFilter; - delete sectionHandler; delete pesAssembler; } @@ -359,21 +354,6 @@ cDevice *cDevice::GetDevice(int Index) return (0 <= Index && Index < numDevices) ? device[Index] : NULL; } -static int GetClippedNumProvidedSystems(int AvailableBits, cDevice *Device) -{ - int MaxNumProvidedSystems = 1 << AvailableBits; - int NumProvidedSystems = Device->NumProvidedSystems(); - if (NumProvidedSystems > MaxNumProvidedSystems) { - esyslog("ERROR: device %d supports %d modulation systems but cDevice::GetDevice() currently only supports %d delivery systems which should be fixed", Device->CardIndex() + 1, NumProvidedSystems, MaxNumProvidedSystems); - NumProvidedSystems = MaxNumProvidedSystems; - } - else if (NumProvidedSystems <= 0) { - esyslog("ERROR: device %d reported an invalid number (%d) of supported delivery systems - assuming 1", Device->CardIndex() + 1, NumProvidedSystems); - NumProvidedSystems = 1; - } - return NumProvidedSystems; -} - cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView) { // Collect the current priorities of all CAM slots that can decrypt the channel: @@ -423,7 +403,6 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView imp <<= 1; imp |= LiveView ? !device[i]->IsPrimaryDevice() || ndr : 0; // prefer the primary device for live viewing if we don't need to detach existing receivers imp <<= 1; imp |= !device[i]->Receiving() && (device[i] != cTransferControl::ReceiverDevice() || device[i]->IsPrimaryDevice()) || ndr; // use receiving devices if we don't need to detach existing receivers, but avoid primary device in local transfer mode imp <<= 1; imp |= device[i]->Receiving(); // avoid devices that are receiving - imp <<= 2; imp |= GetClippedNumProvidedSystems(2, 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 |= min(max(device[i]->Priority() + MAXPRIORITY, 0), 0xFF); // use the device with the lowest priority (+MAXPRIORITY to assure that values -99..99 can be used) imp <<= 8; imp |= min(max((NumUsableSlots ? SlotPriority[j] : 0) + MAXPRIORITY, 0), 0xFF); // use the CAM slot with the lowest priority (+MAXPRIORITY to assure that values -99..99 can be used) @@ -666,6 +645,22 @@ void cDevice::StartSectionHandler(void) } } +void cDevice::StopSectionHandler(void) +{ + if (sectionHandler) { + delete nitFilter; + delete sdtFilter; + delete patFilter; + delete eitFilter; + delete sectionHandler; + nitFilter = NULL; + sdtFilter = NULL; + patFilter = NULL; + eitFilter = NULL; + sectionHandler = NULL; + } +} + int cDevice::OpenFilter(u_short Pid, u_char Tid, u_char Mask) { return -1; @@ -712,11 +707,6 @@ bool cDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Needs return false; } -int cDevice::NumProvidedSystems(void) const -{ - return 0; -} - bool cDevice::IsTunedToTransponder(const cChannel *Channel) { return false; @@ -900,6 +890,10 @@ void cDevice::SetAudioTrackDevice(eTrackType Type) { } +void cDevice::SetSubtitleTrackDevice(eTrackType Type) +{ +} + bool cDevice::ToggleMute(void) { int OldVolume = volume; @@ -1047,6 +1041,10 @@ bool cDevice::SetCurrentSubtitleTrack(eTrackType Type, bool Manual) DELETENULL(dvbSubtitleConverter); } DELETENULL(liveSubtitle); + if (player) + player->SetSubtitleTrack(currentSubtitleTrack, GetTrack(currentSubtitleTrack)); + else + SetSubtitleTrackDevice(currentSubtitleTrack); if (currentSubtitleTrack != ttNone && !Replaying() && !Transferring()) { const tTrackId *TrackId = GetTrack(currentSubtitleTrack); if (TrackId && TrackId->id) { @@ -1252,7 +1250,7 @@ int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly) break; case 0xC0 ... 0xDF: // audio SetAvailableTrack(ttAudio, c - 0xC0, c); - if (!VideoOnly && c == availableTracks[currentAudioTrack].id) { + if ((!VideoOnly || HasIBPTrickSpeed()) && c == availableTracks[currentAudioTrack].id) { w = PlayAudio(Start, d, c); if (FirstLoop) Audios.PlayAudio(Data, Length, c); @@ -1282,13 +1280,13 @@ pre_1_3_19_PrivateStreamDeteced: case 0x20: // SPU case 0x30: // SPU SetAvailableTrack(ttSubtitle, SubStreamIndex, SubStreamId); - if (!VideoOnly && currentSubtitleTrack != ttNone && SubStreamId == availableTracks[currentSubtitleTrack].id) + if ((!VideoOnly || HasIBPTrickSpeed()) && currentSubtitleTrack != ttNone && SubStreamId == availableTracks[currentSubtitleTrack].id) w = PlaySubtitle(Start, d); break; case 0x80: // AC3 & DTS if (Setup.UseDolbyDigital) { SetAvailableTrack(ttDolby, SubStreamIndex, SubStreamId); - if (!VideoOnly && SubStreamId == availableTracks[currentAudioTrack].id) { + if ((!VideoOnly || HasIBPTrickSpeed()) && SubStreamId == availableTracks[currentAudioTrack].id) { w = PlayAudio(Start, d, SubStreamId); if (FirstLoop) Audios.PlayAudio(Data, Length, SubStreamId); @@ -1297,7 +1295,7 @@ pre_1_3_19_PrivateStreamDeteced: break; case 0xA0: // LPCM SetAvailableTrack(ttAudio, SubStreamIndex, SubStreamId); - if (!VideoOnly && SubStreamId == availableTracks[currentAudioTrack].id) { + if ((!VideoOnly || HasIBPTrickSpeed()) && SubStreamId == availableTracks[currentAudioTrack].id) { w = PlayAudio(Start, d, SubStreamId); if (FirstLoop) Audios.PlayAudio(Data, Length, SubStreamId); |