mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
A previous 'Transfer Mode' is now automatically re-started after a replay stops
This commit is contained in:
parent
6ef11b70be
commit
ec8748a2cc
2
HISTORY
2
HISTORY
@ -1466,3 +1466,5 @@ Video Disk Recorder Revision History
|
||||
Helmut Auer).
|
||||
- Fixed starting a recording of the current channel with only one DVB card
|
||||
(thanks to Stefan Huelswitt for his help).
|
||||
- A previous 'Transfer Mode' is now automatically re-started after a replay
|
||||
stops.
|
||||
|
22
device.c
22
device.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: device.c 1.19 2002/09/08 14:03:43 kls Exp $
|
||||
* $Id: device.c 1.20 2002/09/15 11:05:41 kls Exp $
|
||||
*/
|
||||
|
||||
#include "device.h"
|
||||
@ -47,6 +47,8 @@ cDevice::cDevice(void)
|
||||
|
||||
player = NULL;
|
||||
|
||||
playerDetached = false;
|
||||
|
||||
for (int i = 0; i < MAXRECEIVERS; i++)
|
||||
receiver[i] = NULL;
|
||||
ca = -1;
|
||||
@ -108,6 +110,13 @@ bool cDevice::HasDecoder(void) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cDevice::PlayerDetached(void)
|
||||
{
|
||||
bool result = playerDetached;
|
||||
playerDetached = false;
|
||||
return result;
|
||||
}
|
||||
|
||||
cOsdBase *cDevice::NewOsd(int x, int y)
|
||||
{
|
||||
return NULL;
|
||||
@ -438,6 +447,7 @@ void cDevice::Detach(cPlayer *Player)
|
||||
player->device = NULL;
|
||||
player = NULL;
|
||||
SetPlayMode(pmNone);
|
||||
playerDetached = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -447,16 +457,6 @@ void cDevice::StopReplay(void)
|
||||
Detach(player);
|
||||
if (IsPrimaryDevice())
|
||||
cControl::Shutdown();
|
||||
/*XXX+
|
||||
if (IsPrimaryDevice()) {
|
||||
// let's explicitly switch the channel back in case it was in Transfer Mode:
|
||||
cChannel *Channel = Channels.GetByNumber(currentChannel);
|
||||
if (Channel) {
|
||||
Channel->Switch(this, false);
|
||||
usleep(100000); // allow driver to sync in case a new replay will start immediately
|
||||
}
|
||||
}
|
||||
XXX*/
|
||||
}
|
||||
}
|
||||
|
||||
|
5
device.h
5
device.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: device.h 1.17 2002/09/14 10:00:16 kls Exp $
|
||||
* $Id: device.h 1.18 2002/09/15 11:05:41 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __DEVICE_H
|
||||
@ -236,6 +236,7 @@ public:
|
||||
|
||||
private:
|
||||
cPlayer *player;
|
||||
bool playerDetached;
|
||||
protected:
|
||||
virtual bool SetPlayMode(ePlayMode PlayMode);
|
||||
// Sets the device into the given play mode.
|
||||
@ -276,6 +277,8 @@ public:
|
||||
// Attaches the given player to this device.
|
||||
void Detach(cPlayer *Player);
|
||||
// Detaches the given player from this device.
|
||||
bool PlayerDetached(void);
|
||||
// Returns true if a player has been detached and resets the 'playerDetached' flag.
|
||||
|
||||
// Receiver facilities
|
||||
|
||||
|
5
vdr.c
5
vdr.c
@ -22,7 +22,7 @@
|
||||
*
|
||||
* The project's page is at http://www.cadsoft.de/people/kls/vdr
|
||||
*
|
||||
* $Id: vdr.c 1.122 2002/09/08 11:19:01 kls Exp $
|
||||
* $Id: vdr.c 1.123 2002/09/15 11:08:35 kls Exp $
|
||||
*/
|
||||
|
||||
#include <getopt.h>
|
||||
@ -400,6 +400,9 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
// Attach launched player control:
|
||||
cControl::Attach();
|
||||
// Make sure Transfer-Mode is re-started after detaching a player:
|
||||
if (cDevice::PrimaryDevice()->PlayerDetached() && !cDevice::PrimaryDevice()->Replaying())
|
||||
Channels.SwitchTo(cDevice::CurrentChannel());
|
||||
// Restart the Watchdog timer:
|
||||
if (WatchdogTimeout > 0) {
|
||||
int LatencyTime = WatchdogTimeout - alarm(WatchdogTimeout);
|
||||
|
Loading…
Reference in New Issue
Block a user