diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2006-03-26 09:46:58 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2006-03-26 09:46:58 +0200 |
commit | 22b60d96108b98f11af7fcf27f755637e2d106c5 (patch) | |
tree | 492770e115e27cd7621ff6865f7d855bcf140f45 | |
parent | 1fe46dfa9faf971fee27870a49f652485e52647a (diff) | |
download | vdr-22b60d96108b98f11af7fcf27f755637e2d106c5.tar.gz vdr-22b60d96108b98f11af7fcf27f755637e2d106c5.tar.bz2 |
The new function cDevice::ForceTransferMode() can be used to force the primary device into transfer mode
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | device.c | 11 | ||||
-rw-r--r-- | device.h | 4 | ||||
-rw-r--r-- | dvbdevice.c | 6 |
5 files changed, 18 insertions, 6 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 852297bc..f44f4379 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1069,6 +1069,7 @@ Reinhard Nissl <rnissl@gmx.de> for a suggestion that lead to implementing cDevice::Transferring() for fixing replaying recordings of radio channels with many audio tracks for speeding up cRemux::ScanVideoPacket() + for implementing cDevice::ForceTransferMode() Richard Robson <richard_robson@beeb.net> for reporting freezing replay if a timer starts while in Transfer Mode from the @@ -4445,3 +4445,5 @@ Video Disk Recorder Revision History - Speeded up cRemux::ScanVideoPacket() (thanks to Reinhard Nissl). - Enhanced logging EPG event data. - Fixed format string handling (thanks to Darren Salt). +- The new function cDevice::ForceTransferMode() can be used to force the primary + device into transfer mode (thanks to Reinhard Nissl). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 1.124 2006/02/24 14:05:26 kls Exp $ + * $Id: device.c 1.125 2006/03/26 09:42:48 kls Exp $ */ #include "device.h" @@ -697,6 +697,15 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView) return Result; } +void cDevice::ForceTransferMode(void) +{ + if (!cTransferControl::ReceiverDevice()) { + cChannel *Channel = Channels.GetByNumber(CurrentChannel()); + if (Channel) + SetChannelDevice(Channel, false); // this implicitly starts Transfer Mode + } +} + bool cDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) { return false; @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.h 1.72 2006/02/04 14:22:08 kls Exp $ + * $Id: device.h 1.73 2006/03/26 09:42:40 kls Exp $ */ #ifndef __DEVICE_H @@ -236,6 +236,8 @@ protected: public: static int CurrentChannel(void) { return primaryDevice ? currentChannel : 0; } ///< Returns the number of the current channel on the primary device. + void ForceTransferMode(void); + ///< Forces the device into transfermode for the current channel. virtual bool HasLock(int TimeoutMs = 0);//XXX PLUGINS.html ///< Returns true if the device has a lock on the requested transponder. ///< Default is true, a specific device implementation may return false diff --git a/dvbdevice.c b/dvbdevice.c index a722be99..af9b4a84 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 1.154 2006/03/19 12:34:24 kls Exp $ + * $Id: dvbdevice.c 1.155 2006/03/26 09:42:54 kls Exp $ */ #include "dvbdevice.h" @@ -930,9 +930,7 @@ void cDvbDevice::SetAudioTrackDevice(eTrackType Type) if (!setTransferModeForDolbyDigital) return; // Currently this works only in Transfer Mode - cChannel *Channel = Channels.GetByNumber(CurrentChannel()); - if (Channel) - SetChannelDevice(Channel, false); // this implicitly starts Transfer Mode + ForceTransferMode(); } } } |