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: dvbplayer.c 1.42 2006/01/08 11:39:41 kls Exp $
* $Id: dvbplayer.c 1.43 2006/02/19 14:20:15 kls Exp $
*/
#include "dvbplayer.h"
@@ -80,6 +80,8 @@ private:
int length;
bool hasData;
cCondWait newSet;
cCondVar newDataCond;
cMutex newDataMutex;
protected:
void Action(void);
public:
@@ -88,6 +90,7 @@ public:
void Clear(void);
int Read(cUnbufferedFile *File, uchar *Buffer, int Length);
bool Reading(void) { return buffer; }
bool WaitForDataMs(int msToWait);
};
cNonBlockingFileReader::cNonBlockingFileReader(void)
@@ -150,8 +153,11 @@ void cNonBlockingFileReader::Action(void)
int r = f->Read(buffer + length, wanted - length);
if (r >= 0) {
length += r;
if (!r || length == wanted) // r == 0 means EOF
if (!r || length == wanted) { // r == 0 means EOF
cMutexLock NewDataLock(&newDataMutex);
hasData = true;
newDataCond.Broadcast();
}
}
else if (r < 0 && FATALERRNO) {
LOG_ERROR;
@@ -164,6 +170,14 @@ void cNonBlockingFileReader::Action(void)
}
}
bool cNonBlockingFileReader::WaitForDataMs(int msToWait)
{
cMutexLock NewDataLock(&newDataMutex);
if (hasData)
return true;
return newDataCond.TimedWait(newDataMutex, msToWait);
}
// --- cDvbPlayer ------------------------------------------------------------
#define PLAYERBUFSIZE MEGABYTE(1)
@@ -362,10 +376,14 @@ void cDvbPlayer::Action(void)
nonBlockingFileReader = new cNonBlockingFileReader;
int Length = 0;
bool Sleep = false;
bool WaitingForData = false;
while (Running() && (NextFile() || readIndex >= 0 || ringBuffer->Available() || !DeviceFlush(100))) {
if (Sleep) {
cCondWait::SleepMs(3); // this keeps the CPU load low
if (WaitingForData)
nonBlockingFileReader->WaitForDataMs(3); // this keeps the CPU load low, but reacts immediately on new data
else
cCondWait::SleepMs(3); // this keeps the CPU load low
Sleep = false;
}
cPoller Poller;
@@ -423,11 +441,14 @@ void cDvbPlayer::Action(void)
}
int r = nonBlockingFileReader->Read(replayFile, b, Length);
if (r > 0) {
WaitingForData = false;
readFrame = new cFrame(b, -r, ftUnknown, readIndex); // hands over b to the ringBuffer
b = NULL;
}
else if (r == 0)
eof = true;
else if (r < 0 && errno == EAGAIN)
WaitingForData = true;
else if (r < 0 && FATALERRNO) {
LOG_ERROR;
break;