mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Version 1.3.29
- Fixed a race condition in cTransfer (thanks to Klaus Heppenheimer for reporting this one). In doing so, the 'active' variables used by the actual derived cThread classes have been replaced by the cThread::Running() function. Plugin authors may want to check their derived cThread classes and replace any 'active' variables the same way as, for instance, done in transfer.c. - Fixed handling EPG data for time shifted events (thanks to Marco Schlüßler). - Increased the default value for 'Min. user inactivity' to 300 minutes (suggested by Helmut Auer). - Now storing the channel id in the info.vdr file even if there is no EPG info available (thanks to Andreas Brachold for reporting that there are empty info.vdr files created in that case). - Added some 'mkdir -p' to the Makefile's 'install' target (thanks to Wayne Keer). - Changed the title of the recording info menu (thanks to Rolf Ahrenberg). - Fixed handling the frame number display if '7' is pressed before the first editing mark, or '9' after the last one (thanks to Thomas Günther). - Now discarding any previous numerical input to switch channels if Up, Down, Channel+, Channel-, Left or Right is pressed (thanks to Wolfgang Rohdewald for reporting a problem with this). - Pressing Ok while entering a channel number now immediately switches to that channel, without waiting for further input. - Avoiding unnecessary OSD draw operations caused by the audio track description display in the ST:TNG skin's channel display (thanks to Oliver Endriss for reporting this). - Removed the VIDEO_STILLPICTURE_WORKS_WITH_VDR_FRAMES stuff from cDvbDevice::StillPicture(), since apparently the VIDEO_STILLPICTURE call works.
This commit is contained in:
23
dvbplayer.c
23
dvbplayer.c
@@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: dvbplayer.c 1.36 2005/07/30 10:00:24 kls Exp $
|
||||
* $Id: dvbplayer.c 1.38 2005/08/14 10:52:45 kls Exp $
|
||||
*/
|
||||
|
||||
#include "dvbplayer.h"
|
||||
@@ -79,7 +79,6 @@ private:
|
||||
int wanted;
|
||||
int length;
|
||||
bool hasData;
|
||||
bool active;
|
||||
cCondWait newSet;
|
||||
protected:
|
||||
void Action(void);
|
||||
@@ -98,13 +97,11 @@ cNonBlockingFileReader::cNonBlockingFileReader(void)
|
||||
buffer = NULL;
|
||||
wanted = length = 0;
|
||||
hasData = false;
|
||||
active = false;
|
||||
Start();
|
||||
}
|
||||
|
||||
cNonBlockingFileReader::~cNonBlockingFileReader()
|
||||
{
|
||||
active = false;
|
||||
newSet.Signal();
|
||||
Cancel(3);
|
||||
free(buffer);
|
||||
@@ -147,8 +144,7 @@ int cNonBlockingFileReader::Read(int FileHandle, uchar *Buffer, int Length)
|
||||
|
||||
void cNonBlockingFileReader::Action(void)
|
||||
{
|
||||
active = true;
|
||||
while (active) {
|
||||
while (Running()) {
|
||||
Lock();
|
||||
if (!hasData && f >= 0 && buffer) {
|
||||
int r = safe_read(f, buffer + length, wanted - length);
|
||||
@@ -187,8 +183,6 @@ private:
|
||||
cIndexFile *index;
|
||||
int replayFile;
|
||||
bool eof;
|
||||
bool active;
|
||||
bool running;
|
||||
bool firstPacket;
|
||||
ePlayModes playMode;
|
||||
ePlayDirs playDir;
|
||||
@@ -207,7 +201,7 @@ protected:
|
||||
public:
|
||||
cDvbPlayer(const char *FileName);
|
||||
virtual ~cDvbPlayer();
|
||||
bool Active(void) { return active; }
|
||||
bool Active(void) { return cThread::Running(); }
|
||||
void Pause(void);
|
||||
void Play(void);
|
||||
void Forward(void);
|
||||
@@ -233,8 +227,6 @@ cDvbPlayer::cDvbPlayer(const char *FileName)
|
||||
backTrace = NULL;
|
||||
index = NULL;
|
||||
eof = false;
|
||||
active = true;
|
||||
running = false;
|
||||
firstPacket = true;
|
||||
playMode = pmPlay;
|
||||
playDir = pdForward;
|
||||
@@ -353,11 +345,8 @@ void cDvbPlayer::Activate(bool On)
|
||||
if (replayFile >= 0)
|
||||
Start();
|
||||
}
|
||||
else if (active) {
|
||||
running = false;
|
||||
else
|
||||
Cancel(9);
|
||||
active = false;
|
||||
}
|
||||
}
|
||||
|
||||
void cDvbPlayer::Action(void)
|
||||
@@ -374,8 +363,7 @@ void cDvbPlayer::Action(void)
|
||||
int Length = 0;
|
||||
bool Sleep = false;
|
||||
|
||||
running = true;
|
||||
while (running && (NextFile() || readIndex >= 0 || ringBuffer->Available() || !DeviceFlush(100))) {
|
||||
while (Running() && (NextFile() || readIndex >= 0 || ringBuffer->Available() || !DeviceFlush(100))) {
|
||||
if (Sleep) {
|
||||
cCondWait::SleepMs(3); // this keeps the CPU load low
|
||||
Sleep = false;
|
||||
@@ -501,7 +489,6 @@ void cDvbPlayer::Action(void)
|
||||
Sleep = true;
|
||||
}
|
||||
}
|
||||
active = running = false;
|
||||
|
||||
cNonBlockingFileReader *nbfr = nonBlockingFileReader;
|
||||
nonBlockingFileReader = NULL;
|
||||
|
Reference in New Issue
Block a user