diff options
-rw-r--r-- | CONTRIBUTORS | 2 | ||||
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | PLUGINS/src/status/HISTORY | 4 | ||||
-rw-r--r-- | PLUGINS/src/status/status.c | 16 | ||||
-rw-r--r-- | menu.c | 10 | ||||
-rw-r--r-- | rcu.c | 4 | ||||
-rw-r--r-- | rcu.h | 4 | ||||
-rw-r--r-- | status.c | 10 | ||||
-rw-r--r-- | status.h | 24 |
9 files changed, 45 insertions, 33 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index b9b2e321..d62c9d3e 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1352,6 +1352,8 @@ Andreas Brugger <brougs78@gmx.net> for reporting the missing Euro sign in iso8859-1 for reporting a problem with making changes to timers through SVDRP while they are being edited via the menu + for suggesting to change the API of the functions cStatus::Recording() and + cStatus::Replaying(), so that they can provide the full file name of the recording Dino Ravnic <dino.ravnic@fer.hr> for fixing some characters in the iso8859-2 font file @@ -4047,3 +4047,7 @@ Video Disk Recorder Revision History longer run as user 'root' (unless you explicitly start it with '-u root', but this is not recommended!). The 'runvdr' script has been changed to use the '-u' option. +- Changed the API of the functions cStatus::Recording() and cStatus::Replaying(), + so that they can provide the full file name of the recording. Plugins that use + these (or the related cStatus::Msg...() functions) need to be adapted + (suggested by Andreas Brugger). diff --git a/PLUGINS/src/status/HISTORY b/PLUGINS/src/status/HISTORY index 1c399aab..998e23df 100644 --- a/PLUGINS/src/status/HISTORY +++ b/PLUGINS/src/status/HISTORY @@ -31,3 +31,7 @@ VDR Plugin 'status' Revision History 2002-12-13: Version 0.1.0 - Changed setting of CXX and CXXFLAGS variables in Makefile. + +2005-12-31: Version 0.2.0 + +- API change in cStatus. diff --git a/PLUGINS/src/status/status.c b/PLUGINS/src/status/status.c index a0346591..71639279 100644 --- a/PLUGINS/src/status/status.c +++ b/PLUGINS/src/status/status.c @@ -3,13 +3,13 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: status.c 1.7 2002/12/13 15:01:53 kls Exp $ + * $Id: status.c 1.8 2005/12/31 15:19:45 kls Exp $ */ #include <vdr/plugin.h> #include <vdr/status.h> -static const char *VERSION = "0.1.0"; +static const char *VERSION = "0.2.0"; static const char *DESCRIPTION = "Status monitor test"; static const char *MAINMENUENTRY = NULL; @@ -18,8 +18,8 @@ static const char *MAINMENUENTRY = NULL; class cStatusTest : public cStatus { protected: virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber); - virtual void Recording(const cDevice *Device, const char *Name); - virtual void Replaying(const cControl *Control, const char *Name); + virtual void Recording(const cDevice *Device, const char *Name, const char *FileName, bool On); + virtual void Replaying(const cControl *Control, const char *Name, const char *FileName, bool On); virtual void SetVolume(int Volume, bool Absolute); virtual void OsdClear(void); virtual void OsdTitle(const char *Title); @@ -36,14 +36,14 @@ void cStatusTest::ChannelSwitch(const cDevice *Device, int ChannelNumber) dsyslog("status: cStatusTest::ChannelSwitch %d %d", Device->CardIndex(), ChannelNumber); } -void cStatusTest::Recording(const cDevice *Device, const char *Name) +void cStatusTest::Recording(const cDevice *Device, const char *Name, const char *FileName, bool On) { - dsyslog("status: cStatusTest::Recording %d %s", Device->CardIndex(), Name); + dsyslog("status: cStatusTest::Recording %d %s %s %d", Device->CardIndex(), Name, FileName, On); } -void cStatusTest::Replaying(const cControl *Control, const char *Name) +void cStatusTest::Replaying(const cControl *Control, const char *Name, const char *FileName, bool On) { - dsyslog("status: cStatusTest::Replaying %s", Name); + dsyslog("status: cStatusTest::Replaying %s %s %d", Name, FileName, On); } void cStatusTest::SetVolume(int Volume, bool Absolute) @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.382 2005/12/28 12:35:54 kls Exp $ + * $Id: menu.c 1.383 2005/12/31 15:08:19 kls Exp $ */ #include "menu.h" @@ -3293,7 +3293,7 @@ cRecordControl::cRecordControl(cDevice *Device, cTimer *Timer, bool Pause) recorder = new cRecorder(fileName, ch->Ca(), timer->Priority(), ch->Vpid(), ch->Apids(), ch->Dpids(), ch->Spids()); if (device->AttachReceiver(recorder)) { Recording.WriteInfo(); - cStatus::MsgRecording(device, Recording.Name()); + cStatus::MsgRecording(device, Recording.Name(), Recording.FileName(), true); if (!Timer && !cReplayControl::LastReplayed()) // an instant recording, maybe from cRecordControls::PauseLiveVideo() cReplayControl::SetRecording(fileName, Recording.Name()); Recordings.AddByName(fileName); @@ -3352,7 +3352,7 @@ void cRecordControl::Stop(void) DELETENULL(recorder); timer->SetRecording(false); timer = NULL; - cStatus::MsgRecording(device, NULL); + cStatus::MsgRecording(device, NULL, fileName, false); cRecordingUserCommand::InvokeCommand(RUC_AFTERRECORDING, fileName); } } @@ -3551,13 +3551,13 @@ cReplayControl::cReplayControl(void) timeSearchActive = false; marks.Load(fileName); cRecording Recording(fileName); - cStatus::MsgReplaying(this, Recording.Name()); + cStatus::MsgReplaying(this, Recording.Name(), Recording.FileName(), true); } cReplayControl::~cReplayControl() { Hide(); - cStatus::MsgReplaying(this, NULL); + cStatus::MsgReplaying(this, NULL, fileName, false); Stop(); } @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: rcu.c 1.11 2005/12/16 14:43:37 kls Exp $ + * $Id: rcu.c 1.12 2005/12/31 15:09:32 kls Exp $ */ #include "rcu.h" @@ -322,7 +322,7 @@ void cRcuRemote::ChannelSwitch(const cDevice *Device, int ChannelNumber) SetNumber(cDevice::CurrentChannel()); } -void cRcuRemote::Recording(const cDevice *Device, const char *Name) +void cRcuRemote::Recording(const cDevice *Device, const char *Name, const char *FileName, bool On) { SetPoints(1 << Device->DeviceNumber(), Device->Receiving()); } @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: rcu.h 1.5 2005/12/16 14:21:20 kls Exp $ + * $Id: rcu.h 1.6 2005/12/31 15:09:25 kls Exp $ */ #ifndef __RCU_H @@ -35,7 +35,7 @@ private: bool DetectCode(unsigned char *Code); virtual void Action(void); virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber); - virtual void Recording(const cDevice *Device, const char *Name); + virtual void Recording(const cDevice *Device, const char *Name, const char *FileName, bool On); public: cRcuRemote(const char *DeviceName); virtual ~cRcuRemote(); @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: status.c 1.7 2005/01/09 11:51:04 kls Exp $ + * $Id: status.c 1.8 2005/12/31 15:10:10 kls Exp $ */ #include "status.h" @@ -29,16 +29,16 @@ void cStatus::MsgChannelSwitch(const cDevice *Device, int ChannelNumber) sm->ChannelSwitch(Device, ChannelNumber); } -void cStatus::MsgRecording(const cDevice *Device, const char *Name) +void cStatus::MsgRecording(const cDevice *Device, const char *Name, const char *FileName, bool On) { for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) - sm->Recording(Device, Name); + sm->Recording(Device, Name, FileName, On); } -void cStatus::MsgReplaying(const cControl *Control, const char *Name) +void cStatus::MsgReplaying(const cControl *Control, const char *Name, const char *FileName, bool On) { for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) - sm->Replaying(Control, Name); + sm->Replaying(Control, Name, FileName, On); } void cStatus::MsgSetVolume(int Volume, bool Absolute) @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: status.h 1.8 2005/01/09 11:50:21 kls Exp $ + * $Id: status.h 1.9 2005/12/31 15:15:25 kls Exp $ */ #ifndef __STATUS_H @@ -24,15 +24,17 @@ protected: // Indicates a channel switch on the given DVB device. // If ChannelNumber is 0, this is before the channel is being switched, // otherwise ChannelNumber is the number of the channel that has been switched to. - virtual void Recording(const cDevice *Device, const char *Name) {} - // The given DVB device has started recording Name. Name is the name of the - // recording, without any directory path. - // If Name is NULL, the recording has ended. - virtual void Replaying(const cControl *Control, const char *Name) {} - // The given player control has started replaying Name. Name is the name of the - // recording, without any directory path. In case of a player that can't provide + virtual void Recording(const cDevice *Device, const char *Name, const char *FileName, bool On) {} + // The given DVB device has started (On = true) or stopped (On = false) recording Name. + // Name is the name of the recording, without any directory path. The full file name + // of the recording is given in FileName, which may be NULL in case there is no + // actual file involved. If On is false, Name may be NULL. + virtual void Replaying(const cControl *Control, const char *Name, const char *FileName, bool On) {} + // The given player control has started (On = true) or stopped (On = false) replaying Name. + // Name is the name of the recording, without any directory path. In case of a player that can't provide // a name, Name can be a string that identifies the player type (like, e.g., "DVD"). - // If Name is NULL, the replay has ended. + // The full file name of the recording is given in FileName, which may be NULL in case there is no + // actual file involved. If On is false, Name may be NULL. virtual void SetVolume(int Volume, bool Absolute) {} // The volume has been set to the given value, either // absolutely or relative to the current volume. @@ -70,8 +72,8 @@ public: virtual ~cStatus(); // These functions are called whenever the related status information changes: static void MsgChannelSwitch(const cDevice *Device, int ChannelNumber); - static void MsgRecording(const cDevice *Device, const char *Name); - static void MsgReplaying(const cControl *Control, const char *Name); + static void MsgRecording(const cDevice *Device, const char *Name, const char *FileName, bool On); + static void MsgReplaying(const cControl *Control, const char *Name, const char *FileName, bool On); static void MsgSetVolume(int Volume, bool Absolute); static void MsgSetAudioTrack(int Index, const char * const *Tracks); static void MsgSetAudioChannel(int AudioChannel); |