Version 1.3.43

- Removed an unnecessary toFile->SetReadAhead() from cutter.c (thanks to Artur
  Skawina).
- The "Back" key now restores the original string when pressed while editing a
  string item (suggested by Markus Hahn).
- Now stopping scanning the video directory if there are too many levels of
  symbolic links, which might indicate a recursive link loop (based on a patch
  from Helmut Auer).
- Improved OSD area handling in cDvbSpuDecoder (thanks to Marco Schlüßler).
- Now logging the description (if present) in case a thread is canceled (suggested
  by Marco Schlüßler).
- cMenuText now uses the given font (thanks to Rolf Ahrenberg).
- The ST:TNG skin now uses the fixed font if requested when displaying texts.
- Fixed some typos in the CONTRIBUTORS file (thanks to Frank Krömmelbein).
- Changed offset and size handling in 'libsi' from 'unsigned' to 'signed', so that
  overflows can be better detected (thanks to Marcel Wiesweg).
- Checking data size in CaDescriptor::Parse() and LinkageDescriptor::Parse() of
  'libsi' to avoid crashes with invalid data (thanks to Marcel Wiesweg).
- Made CharArray::DataOwnData::assign() in 'libsi' more robust against invalid
  data (suggested by Oliver Endriss). Also changed CharArray::DataOwnData::Delete()
  so that it sets 'size' and 'data' to 0.
- Now resetting the channel number if the number entered through the numeric keys
  exceeds the maximum channel number (thanks to Rolf Ahrenberg).
- The language code in the 'X' component records of EPG data can now consist of
  two codes, separated by '+'.
- If a recording starts and there is no EPG data available for the recorded channel,
  the 'X' audio component records for the 'info.vdr' file are now generated from the
  channel's PID data.
- Externally provided EPG data (with table ID 0x00) now gets its component
  descriptors set from the broadcast data, so that language codes and descriptions
  are available (suggested by Andreas Brugger).
- When setting the audio track descriptions, the language codes are now also set
  in case this is a replay session (based on a patch from Rolf Ahrenberg).
- If a recording starts and the channel's audio PID data has more language code
  information than the EPG's component data, the code from the channel is taken.
- Fixed handling DPID when deciding whether to switch to 'Transfer Mode' (thanks
  to Marco Schlüßler).
- Fixed replaying recordings of radio channels with many audio tracks (thanks to
  Reinhard Nissl).
- Added a comment to tChannelID::nid, explaining that is is actually the "original"
  network id.
This commit is contained in:
Klaus Schmidinger
2006-02-19 18:00:00 +01:00
parent c23992b807
commit b9bfba20f2
27 changed files with 312 additions and 147 deletions

View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: recording.c 1.134 2006/02/05 12:34:08 kls Exp $
* $Id: recording.c 1.137 2006/02/19 13:09:29 kls Exp $
*/
#include "recording.h"
@@ -58,6 +58,8 @@
#define MAX_SUBTITLE_LENGTH 40
#define MAX_LINK_LEVEL 6
bool VfatFileSystem = false;
cRecordings DeletedRecordings(true);
@@ -254,15 +256,44 @@ void cResumeFile::Delete(void)
// --- cRecordingInfo --------------------------------------------------------
cRecordingInfo::cRecordingInfo(tChannelID ChannelID, const cEvent *Event)
cRecordingInfo::cRecordingInfo(const cChannel *Channel, const cEvent *Event)
{
channelID = ChannelID;
if (Event) {
event = Event;
ownEvent = NULL;
channelID = Channel ? Channel->GetChannelID() : tChannelID::InvalidID;
ownEvent = Event ? NULL : new cEvent(0);
event = ownEvent ? ownEvent : Event;
if (Channel) {
// Since the EPG data's component records can carry only a single
// language code, let's see whether the channel's PID data has
// more information:
cComponents *Components = (cComponents *)event->Components();
if (!Components)
Components = new cComponents;
for (int i = 0; i < MAXAPIDS; i++) {
const char *s = Channel->Alang(i);
if (*s) {
tComponent *Component = Components->GetComponent(i, 2, 3);
if (!Component)
Components->SetComponent(Components->NumComponents(), 2, 3, s, NULL);
else if (strlen(s) > strlen(Component->language))
strn0cpy(Component->language, s, sizeof(Component->language));
}
}
// There's no "multiple languages" for Dolby Digital tracks, but
// we do the same procedure here, too, in case there is no component
// information at all:
for (int i = 0; i < MAXDPIDS; i++) {
const char *s = Channel->Dlang(i);
if (*s) {
tComponent *Component = Components->GetComponent(i, 2, 5);
if (!Component)
Components->SetComponent(Components->NumComponents(), 2, 5, s, NULL);
else if (strlen(s) > strlen(Component->language))
strn0cpy(Component->language, s, sizeof(Component->language));
}
}
if (Components != event->Components())
((cEvent *)event)->SetComponents(Components);
}
else
event = ownEvent = new cEvent(0);
}
cRecordingInfo::~cRecordingInfo()
@@ -465,7 +496,7 @@ cRecording::cRecording(cTimer *Timer, const cEvent *Event)
priority = Timer->Priority();
lifetime = Timer->Lifetime();
// handle info:
info = new cRecordingInfo(Timer->Channel()->GetChannelID(), Event);
info = new cRecordingInfo(Timer->Channel(), Event);
// this is a somewhat ugly hack to get the 'summary' information from the
// timer into the recording info, but it saves us from having to actually
// copy the entire event data:
@@ -811,7 +842,7 @@ void cRecordings::Refresh(bool Foreground)
ScanVideoDir(VideoDirectory, Foreground);
}
void cRecordings::ScanVideoDir(const char *DirName, bool Foreground)
void cRecordings::ScanVideoDir(const char *DirName, bool Foreground, int LinkLevel)
{
cReadDir d(DirName);
struct dirent *e;
@@ -821,7 +852,13 @@ void cRecordings::ScanVideoDir(const char *DirName, bool Foreground)
asprintf(&buffer, "%s/%s", DirName, e->d_name);
struct stat st;
if (stat(buffer, &st) == 0) {
int Link = 0;
if (S_ISLNK(st.st_mode)) {
if (LinkLevel > MAX_LINK_LEVEL) {
isyslog("max link level exceeded - not scanning %s", buffer);
continue;
}
Link = 1;
char *old = buffer;
buffer = ReadLink(old);
free(old);
@@ -849,7 +886,7 @@ void cRecordings::ScanVideoDir(const char *DirName, bool Foreground)
delete r;
}
else
ScanVideoDir(buffer, Foreground);
ScanVideoDir(buffer, Foreground, LinkLevel + Link);
}
}
free(buffer);