summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY3
-rw-r--r--device.c9
-rw-r--r--device.h4
-rw-r--r--menu.c4
-rw-r--r--vdr.c4
6 files changed, 18 insertions, 7 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 965f175e..96d75af2 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1044,6 +1044,7 @@ Reinhard Nissl <rnissl@gmx.de>
DiSEqC data) if the lock is lost
for fixing handling TS packets in cTS2PES
for adding a mutex to synchronize cDevice::PlayPesPacket() and SetCurrentAudioTrack()
+ for a suggestion that lead to implementing cDevice::Transferring()
Richard Robson <richard_robson@beeb.net>
for reporting freezing replay if a timer starts while in Transfer Mode from the
diff --git a/HISTORY b/HISTORY
index 3e5a83a2..19e2793c 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4297,3 +4297,6 @@ Video Disk Recorder Revision History
if you don't want to use "fadvise" you need to comment out that line (thanks to
Artur Skawina).
- Fixed a missing ',' in the Swedish OSD texts (thanks to Arthur Konovalov).
+- cDevice::Transferring() can now be used to determine whether the (primary)
+ device is currently playing in Transfer Mode (based on a suggestion by
+ Reinhard Nissl).
diff --git a/device.c b/device.c
index faa59fd3..6a03ade0 100644
--- a/device.c
+++ b/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.122 2006/02/04 10:21:51 kls Exp $
+ * $Id: device.c 1.123 2006/02/04 14:58:24 kls Exp $
*/
#include "device.h"
@@ -924,12 +924,17 @@ bool cDevice::Replaying(void) const
return player != NULL;
}
+bool cDevice::Transferring(void) const
+{
+ return dynamic_cast<cTransfer *>(player) != NULL;
+}
+
bool cDevice::AttachPlayer(cPlayer *Player)
{
if (CanReplay()) {
if (player)
Detach(player);
- if (!dynamic_cast<cTransfer *>(Player))
+ if (!Transferring())
ClrAvailableTracks();
pesAssembler->Reset();
player = Player;
diff --git a/device.h b/device.h
index f250ec1e..e6e436b2 100644
--- a/device.h
+++ b/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.71 2006/02/04 10:22:54 kls Exp $
+ * $Id: device.h 1.72 2006/02/04 14:22:08 kls Exp $
*/
#ifndef __DEVICE_H
@@ -484,6 +484,8 @@ public:
///< guaranteed to always receive complete PES packets.
bool Replaying(void) const;
///< Returns true if we are currently replaying.
+ bool Transferring(void) const;
+ ///< Returns true if we are currently in Transfer Mode.
void StopReplay(void);
///< Stops the current replay session (if any).
bool AttachPlayer(cPlayer *Player);
diff --git a/menu.c b/menu.c
index acfece15..474022a2 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.408 2006/02/03 13:24:53 kls Exp $
+ * $Id: menu.c 1.409 2006/02/04 14:47:27 kls Exp $
*/
#include "menu.h"
@@ -3326,7 +3326,7 @@ cDisplayTracks::cDisplayTracks(void)
:cOsdObject(true)
{
cDevice::PrimaryDevice()->EnsureAudioTrack();
- SetTrackDescriptions(!cDevice::PrimaryDevice()->Replaying() || cTransferControl::ReceiverDevice() ? cDevice::CurrentChannel() : 0);
+ SetTrackDescriptions(!cDevice::PrimaryDevice()->Replaying() || cDevice::PrimaryDevice()->Transferring() ? cDevice::CurrentChannel() : 0);
currentDisplayTracks = this;
numTracks = track = 0;
audioChannel = cDevice::PrimaryDevice()->GetAudioChannel();
diff --git a/vdr.c b/vdr.c
index bf09c988..4a405bfb 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 1.247 2006/02/04 12:57:03 kls Exp $
+ * $Id: vdr.c 1.248 2006/02/04 14:49:12 kls Exp $
*/
#include <getopt.h>
@@ -709,7 +709,7 @@ int main(int argc, char *argv[])
if (Channel->Modification(CHANNELMOD_RETUNE)) {
cRecordControls::ChannelDataModified(Channel);
if (Channel->Number() == cDevice::CurrentChannel()) {
- if (!cDevice::PrimaryDevice()->Replaying() || cTransferControl::ReceiverDevice()) {
+ if (!cDevice::PrimaryDevice()->Replaying() || cDevice::PrimaryDevice()->Transferring()) {
if (cDevice::ActualDevice()->ProvidesTransponder(Channel)) { // avoids retune on devices that don't really access the transponder
isyslog("retuning due to modification of channel %d", Channel->Number());
Channels.SwitchTo(Channel->Number());