summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-08-16 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-08-16 18:00:00 +0200
commited643353b100bee75459c4ef2d0330e7a04e1f2a (patch)
tree8a424eba464677a71309e1125ce4e7acef58607e /device.c
parent527748826c8d3cfacff8a7ab3fda9551c1182590 (diff)
downloadvdr-patch-lnbsharing-ed643353b100bee75459c4ef2d0330e7a04e1f2a.tar.gz
vdr-patch-lnbsharing-ed643353b100bee75459c4ef2d0330e7a04e1f2a.tar.bz2
Version 1.1.7vdr-1.1.7
- Adapted VDR to the NEWSTRUCT driver. To use the new driver, compile VDR with 'make NEWSTRUCT=1' (thanks to Holger Wächtler for some valuable advice). By default it currently still uses the old driver. - Added some missing #includes (thanks to Martin Hammerschmid). - Changed the log error message "can't record MPEG1!" to "error in data stream!", since the mentioning of MPEG1 has irritated many people. - Consistently using malloc/free and new/delete (thanks to Andreas Schultz). - Temporarily made cDevice::ProvidesCa() virtual (Andreas Schultz needs this in his DXR3 plugin). - cDevice no longer exposes a file handle to cPlayer. A derived cPlayer class can now call DevicePoll() to see whether the replay device is ready for further data. A derived cDevice class must implement Poll() and shall check if any of its file handles is ready for data. - Implemented several replay modes to allow players that play only audio (thanks to Stefan Huelswitt). - Improved cCondVar::Wait() and implemented cCondVar::TimedWait() (thanks to Stefan Huelswitt). - VDR no longer gives up if there is no DVB device. It continues to work if there is at least one device, either a DVB device found by the core VDR code itself, or a device implemented by a plugin.
Diffstat (limited to 'device.c')
-rw-r--r--device.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/device.c b/device.c
index f70ca04..6a31037 100644
--- a/device.c
+++ b/device.c
@@ -4,12 +4,11 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 1.8 2002/08/04 15:18:05 kls Exp $
+ * $Id: device.c 1.12 2002/08/16 09:50:43 kls Exp $
*/
#include "device.h"
#include <errno.h>
-#include <poll.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include "eit.h"
@@ -98,7 +97,7 @@ bool cDevice::SetPrimaryDevice(int n)
primaryDevice->MakePrimaryDevice(true);
return true;
}
- esyslog("invalid device number: %d", n + 1);
+ esyslog("invalid primary device number: %d", n + 1);
return false;
}
@@ -317,9 +316,9 @@ void cDevice::SetVolume(int Volume, bool Absolute)
mute = false;
}
-int cDevice::SetPlayMode(bool On)
+bool cDevice::SetPlayMode(ePlayMode PlayMode)
{
- return -1;
+ return false;
}
void cDevice::TrickSpeed(int Speed)
@@ -362,7 +361,7 @@ bool cDevice::AttachPlayer(cPlayer *Player)
Detach(player);
player = Player;
player->device = this;
- player->deviceFileHandle = SetPlayMode(true);
+ SetPlayMode(player->playMode);
player->Activate(true);
return true;
}
@@ -373,10 +372,9 @@ void cDevice::Detach(cPlayer *Player)
{
if (Player && player == Player) {
player->Activate(false);
- player->deviceFileHandle = -1;
player->device = NULL;
player = NULL;
- SetPlayMode(false);
+ SetPlayMode(pmNone);
}
}
@@ -399,6 +397,11 @@ void cDevice::StopReplay(void)
}
}
+bool cDevice::Poll(cPoller &Poller, int TimeoutMs)
+{
+ return false;
+}
+
int cDevice::PlayVideo(const uchar *Data, int Length)
{
return -1;