diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2006-02-04 14:58:24 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2006-02-04 14:58:24 +0100 |
commit | d5c739790b51c1503bad54b2edf384f359ed2a3b (patch) | |
tree | 87b9c108757e97365264bb40ebb0f96bb926f687 | |
parent | 8831fe304fd7992c4017b434d3d6e70478b34872 (diff) | |
download | vdr-d5c739790b51c1503bad54b2edf384f359ed2a3b.tar.gz vdr-d5c739790b51c1503bad54b2edf384f359ed2a3b.tar.bz2 |
Implemented cDevice::Transferring()
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | device.c | 9 | ||||
-rw-r--r-- | device.h | 4 | ||||
-rw-r--r-- | menu.c | 4 | ||||
-rw-r--r-- | vdr.c | 4 |
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 @@ -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). @@ -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; @@ -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); @@ -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(); @@ -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()); |