From 9599a8fd8a6724e55ec4ad2ba2c975c0850073d9 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 27 May 2000 18:00:00 +0200 Subject: Version 0.05 - Support for more than one DVB card. - Simultaneous record and replay (with two DVB cards). - Instant recordings no longer get the name "instant". They now get the name of the channel, with a prepended '@' character. - Timers that are not given an explicit Name now use the channel name with a prepended '@' character. - If an instant recording is currently active, the Main menu now contains an option to stop that recording. - Timers are now only processed when the Menu is not active. So after editing a timer the effect will take place only after the menu has been closed. In order to avoid missing a timer event by inadvertently leaving the menu open, the menu will be closed automatically after about two minutes of inactivity. - If a recording is currently being replayed, the Main menu now contains an option to stop replaying. - Displaying the recording DVB interface status in the decimal points of the RCU display. - Reduced the number of remote control keys. Modified the key assignments for the PC keyboard to better resemble the "up-down-left-right-ok" layout on menu controlling remote control units. --- interface.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'interface.c') diff --git a/interface.c b/interface.c index 446f9c4..82f955d 100644 --- a/interface.c +++ b/interface.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: interface.c 1.6 2000/04/24 09:44:23 kls Exp $ + * $Id: interface.c 1.9 2000/05/07 09:28:39 kls Exp $ */ #include "interface.h" @@ -15,8 +15,6 @@ cRcIo RcIo("/dev/ttyS1"); #endif -cDvbApi DvbApi; //XXX member of cInterface??? - cInterface Interface; cInterface::cInterface(void) @@ -36,7 +34,7 @@ void cInterface::Init(void) void cInterface::Open(int NumCols, int NumLines) { if (!open++) - DvbApi.Open(NumCols, NumLines); + cDvbApi::PrimaryDvbApi->Open(NumCols, NumLines); } void cInterface::Close(void) @@ -44,7 +42,7 @@ void cInterface::Close(void) if (open == 1) Clear(); if (!--open) - DvbApi.Close(); + cDvbApi::PrimaryDvbApi->Close(); } unsigned int cInterface::GetCh(bool Wait) @@ -91,13 +89,13 @@ eKeys cInterface::Wait(int Seconds, bool KeepChar) void cInterface::Clear(void) { if (open) - DvbApi.Clear(); + cDvbApi::PrimaryDvbApi->Clear(); } void cInterface::ClearEol(int x, int y, eDvbColor Color) { if (open) - DvbApi.ClrEol(x, y, Color); + cDvbApi::PrimaryDvbApi->ClrEol(x, y, Color); } void cInterface::SetCols(int *c) @@ -112,7 +110,7 @@ void cInterface::SetCols(int *c) void cInterface::Write(int x, int y, const char *s, eDvbColor FgColor, eDvbColor BgColor) { if (open) - DvbApi.Text(x, y, s, FgColor, BgColor); + cDvbApi::PrimaryDvbApi->Text(x, y, s, FgColor, BgColor); } void cInterface::WriteText(int x, int y, const char *s, bool Current) @@ -198,8 +196,8 @@ void cInterface::HelpButton(int Index, const char *Text, eDvbColor FgColor, eDvb int l = (w - strlen(Text)) / 2; if (l < 0) l = 0; - DvbApi.Fill(Index * w, -1, w, 1, BgColor); - DvbApi.Text(Index * w + l, -1, Text, FgColor, BgColor); + cDvbApi::PrimaryDvbApi->Fill(Index * w, -1, w, 1, BgColor); + cDvbApi::PrimaryDvbApi->Text(Index * w + l, -1, Text, FgColor, BgColor); } } @@ -323,7 +321,7 @@ void cInterface::DisplayChannel(int Number, const char *Name) #ifndef DEBUG_REMOTE RcIo.Number(Number); #endif - if (Name) { + if (Name && !Recording()) { Open(MenuColumns, 1); char buffer[MenuColumns + 1]; snprintf(buffer, sizeof(buffer), "%d %s", Number, Name ? Name : ""); @@ -337,3 +335,16 @@ void cInterface::DisplayChannel(int Number, const char *Name) Close(); } } + +void cInterface::DisplayRecording(int Index, bool On) +{ +#ifndef DEBUG_REMOTE + RcIo.SetPoints(1 << Index, On); +#endif +} + +bool cInterface::Recording(void) +{ + // This is located here because the Interface has to do with the "PrimaryDvbApi" anyway + return cDvbApi::PrimaryDvbApi->Recording(); +} -- cgit v1.2.3