From ed643353b100bee75459c4ef2d0330e7a04e1f2a Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 16 Aug 2002 18:00:00 +0200 Subject: =?UTF-8?q?Version=201.1.7=20-=20Adapted=20VDR=20to=20the=20NEWSTR?= =?UTF-8?q?UCT=20driver.=20To=20use=20the=20new=20driver,=20compile=20VDR?= =?UTF-8?q?=20with=20=20=20'make=20NEWSTRUCT=3D1'=20(thanks=20to=20Holger?= =?UTF-8?q?=20W=C3=A4chtler=20for=20some=20valuable=20advice).=20=20=20By?= =?UTF-8?q?=20default=20it=20currently=20still=20uses=20the=20old=20driver?= =?UTF-8?q?.=20-=20Added=20some=20missing=20#includes=20(thanks=20to=20Mar?= =?UTF-8?q?tin=20Hammerschmid).=20-=20Changed=20the=20log=20error=20messag?= =?UTF-8?q?e=20"can't=20record=20MPEG1!"=20to=20"error=20in=20data=20strea?= =?UTF-8?q?m!",=20=20=20since=20the=20mentioning=20of=20MPEG1=20has=20irri?= =?UTF-8?q?tated=20many=20people.=20-=20Consistently=20using=20malloc/free?= =?UTF-8?q?=20and=20new/delete=20(thanks=20to=20Andreas=20Schultz).=20-=20?= =?UTF-8?q?Temporarily=20made=20cDevice::ProvidesCa()=20virtual=20(Andreas?= =?UTF-8?q?=20Schultz=20needs=20this=20=20=20in=20his=20DXR3=20plugin).=20?= =?UTF-8?q?-=20cDevice=20no=20longer=20exposes=20a=20file=20handle=20to=20?= =?UTF-8?q?cPlayer.=20A=20derived=20cPlayer=20class=20=20=20can=20now=20ca?= =?UTF-8?q?ll=20DevicePoll()=20to=20see=20whether=20the=20replay=20device?= =?UTF-8?q?=20is=20ready=20for=20=20=20further=20data.=20A=20derived=20cDe?= =?UTF-8?q?vice=20class=20must=20implement=20Poll()=20and=20shall=20=20=20?= =?UTF-8?q?check=20if=20any=20of=20its=20file=20handles=20is=20ready=20for?= =?UTF-8?q?=20data.=20-=20Implemented=20several=20replay=20modes=20to=20al?= =?UTF-8?q?low=20players=20that=20play=20only=20audio=20(thanks=20=20=20to?= =?UTF-8?q?=20Stefan=20Huelswitt).=20-=20Improved=20cCondVar::Wait()=20and?= =?UTF-8?q?=20implemented=20cCondVar::TimedWait()=20(thanks=20to=20=20=20S?= =?UTF-8?q?tefan=20Huelswitt).=20-=20VDR=20no=20longer=20gives=20up=20if?= =?UTF-8?q?=20there=20is=20no=20DVB=20device.=20It=20continues=20to=20work?= =?UTF-8?q?=20if=20=20=20there=20is=20at=20least=20one=20device,=20either?= =?UTF-8?q?=20a=20DVB=20device=20found=20by=20the=20core=20VDR=20code=20?= =?UTF-8?q?=20=20itself,=20or=20a=20device=20implemented=20by=20a=20plugin?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- device.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'device.c') 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 -#include #include #include #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; -- cgit v1.2.3