summaryrefslogtreecommitdiff
path: root/mymenurecordinginfo.c
diff options
context:
space:
mode:
authorMartin Prochnow <nordlicht@martins-kabuff.de>2006-03-11 19:58:00 +0100
committerAndreas Mair <andreas@vdr-developer.org>2006-03-11 19:58:00 +0100
commitbabfdd26f9d2fbe164205951413d74aa6d21ef23 (patch)
treeabdcb04fadc2894e23ac028aa76835ecb55d991e /mymenurecordinginfo.c
parent93372f4ecc69a079c0e5c5af9169f39222983667 (diff)
downloadvdr-plugin-extrecmenu-babfdd26f9d2fbe164205951413d74aa6d21ef23.tar.gz
vdr-plugin-extrecmenu-babfdd26f9d2fbe164205951413d74aa6d21ef23.tar.bz2
Version 0.2v0.2
- implemented own dvbplayercontrol-class so that people who haved patch their vdr with the jumpplay-patch can compile the plugin - 'Info' while replaying opens recording info - option 'Info' added to recordings list to schow the description of a recording - details (date and time) of recordings are shown now
Diffstat (limited to 'mymenurecordinginfo.c')
-rw-r--r--mymenurecordinginfo.c72
1 files changed, 72 insertions, 0 deletions
diff --git a/mymenurecordinginfo.c b/mymenurecordinginfo.c
new file mode 100644
index 0000000..298a943
--- /dev/null
+++ b/mymenurecordinginfo.c
@@ -0,0 +1,72 @@
+#include "myreplaycontrol.h"
+
+myMenuRecordingInfo::myMenuRecordingInfo(const cRecording *Recording,bool WithButtons):cOsdMenu(tr("Recording info"))
+{
+ recording=Recording;
+ withButtons=WithButtons;
+ if(withButtons)
+ SetHelp(tr("Button$Play"),tr("Button$Rewind"));
+}
+
+void myMenuRecordingInfo::Display(void)
+{
+ cOsdMenu::Display();
+ DisplayMenu()->SetRecording(recording);
+ cStatus::MsgOsdTextItem(recording->Info()->Description());
+}
+
+eOSState myMenuRecordingInfo::Play()
+{
+ if(recording)
+ {
+ myReplayControl::SetRecording(recording->FileName(),recording->Title());
+ cControl::Shutdown(); // stop running playbacks
+ cControl::Launch(new myReplayControl); // start playback
+ return osEnd; // close plugin
+ }
+ return osContinue;
+}
+
+eOSState myMenuRecordingInfo::Rewind()
+{
+ if(recording)
+ {
+ cDevice::PrimaryDevice()->StopReplay();
+ cResumeFile ResumeFile(recording->FileName());
+ ResumeFile.Delete();
+ return Play();
+ }
+ return osContinue;
+}
+
+eOSState myMenuRecordingInfo::ProcessKey(eKeys Key)
+{
+ switch (Key)
+ {
+ case kUp|k_Repeat:
+ case kUp:
+ case kDown|k_Repeat:
+ case kDown:
+ case kLeft|k_Repeat:
+ case kLeft:
+ case kRight|k_Repeat:
+ case kRight: DisplayMenu()->Scroll(NORMALKEY(Key)==kUp||NORMALKEY(Key)==kLeft,NORMALKEY(Key)==kLeft||NORMALKEY(Key)==kRight);
+ cStatus::MsgOsdTextItem(NULL,NORMALKEY(Key)==kUp);
+ return osContinue;
+ default: break;
+ }
+
+ eOSState state=cOsdMenu::ProcessKey(Key);
+
+ if(state==osUnknown)
+ {
+ switch (Key)
+ {
+ case kRed: return Play();
+ case kGreen: return Rewind();
+ case kOk: return osBack;
+ default: break;
+ }
+ }
+ return state;
+}