Version 0.68

- Date and time in the title of an event info page are now always right adjusted.
- The 'current channel' is now handled device specific (in case there is more
  than one DVB card).
- The 'SetSystemTime' option in the "Setup" menu is now shown as "yes/no".
- Implemented "internationalization" (see 'i18n.c' for information on how to
  add new languages). Thanks to Miha Setina for translating the OSD texts to
  the Slovenian language.
- Fixed learning keys on the PC keyboard (display oscillated).
- Fixed a timing problem with OSD refresh and SVDRP.
- Avoiding multiple definitions of the same timer in the "Schedule" menu (this
  could happen when pressing the "Red" button while editing the timer).
- There can now be a configuration file named 'commands.conf' that defines
  commands that can be executed through the "Main" menu's "Commands" option
  (see FORMATS for details on how to define these commands).
- Added a 'fixed' font for use with the output of system commands.
- The 'Priority' parameter of the timers is now also used to interrupt a low
  priority timer recording if a higher priority timer wants to record.
- A timer recording on a DVB card with a CAM module will now be interrupted
  by a timer that needs to use this specific DVB card to record an encrypted
  channel, if the timer currently occupying this DVB card doesn't need the
  CAM module (and thus can continue recording on a different DVB card).
- The "Yellow" button in the "What's on now/next?" menus now displays the
  schedule of the current channel from that menu.
- All DVB cards in a multi-card system now write their EIT information into the
  same data structure.
- If there is more than one DVB card in the system, the non-primary cards are
  now used to periodically scan through the channels in order to keep the
  EPG info up-to-date. Scanning kicks in after 60 seconds of user inactivity
  (timeout in order to keep user interactions instantaneously) and each channel
  that has the 'pnr' parameter defined in 'channels.conf' is switched to for
  20 seconds. If there is only one DVB card in the system, that card will start
  scanning after 5 hours (configurable through the "Setup" menu) of user inactivity
  and will switch back to the channel it originally displayed at the first sign of
  user activity. Any scanning will only occur if that particular card is not
  currently recording or replaying.
- Now shifting the 'Subtitle' info into the 'ExtendedDescription' on stations
  that don't send the EIT information correctly (like, e.g., 'VOX').
- Implemented a 10 seconds latency when removing files.
- Fixed unwanted reaction on the "Green" and "Yellow" button in the "Event" display.
- Implemented 'Transfer Mode' to display video data from the DVB card that actually
  can receive a certain channel on the primary interface. This is currently in
  an early state and may still cause some problems, but it appears to work nice
  already.
This commit is contained in:
Klaus Schmidinger
2000-11-19 18:00:00 +01:00
parent a69b3211dc
commit 9aa2cda494
36 changed files with 8043 additions and 308 deletions

View File

@@ -4,12 +4,13 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: interface.c 1.28 2000/11/01 15:27:52 kls Exp $
* $Id: interface.c 1.32 2000/11/18 15:28:50 kls Exp $
*/
#include "interface.h"
#include <ctype.h>
#include <unistd.h>
#include "i18n.h"
cInterface *Interface = NULL;
@@ -57,8 +58,7 @@ void cInterface::Close(void)
unsigned int cInterface::GetCh(bool Wait, bool *Repeat, bool *Release)
{
if (open)
cDvbApi::PrimaryDvbApi->Flush();
Flush();
if (!rcIo->InputAvailable())
cFile::AnyFileReady(-1, Wait ? 1000 : 0);
unsigned int Command;
@@ -67,6 +67,7 @@ unsigned int cInterface::GetCh(bool Wait, bool *Repeat, bool *Release)
eKeys cInterface::GetKey(bool Wait)
{
Flush();
if (SVDRP)
SVDRP->Process();
eKeys Key = keyFromWait;
@@ -89,8 +90,7 @@ void cInterface::PutKey(eKeys Key)
eKeys cInterface::Wait(int Seconds, bool KeepChar)
{
if (open)
cDvbApi::PrimaryDvbApi->Flush();
Flush();
eKeys Key = kNone;
time_t timeout = time(NULL) + Seconds;
for (;;) {
@@ -136,6 +136,11 @@ void cInterface::SetCols(int *c)
}
}
eDvbFont cInterface::SetFont(eDvbFont Font)
{
return cDvbApi::PrimaryDvbApi->SetFont(Font);
}
char *cInterface::WrapText(const char *Text, int Width, int *Height)
{
// Wraps the Text to make it fit into the area defined by the given Width
@@ -238,11 +243,24 @@ void cInterface::WriteText(int x, int y, const char *s, eDvbColor FgColor, eDvbC
void cInterface::Title(const char *s)
{
int x = (Width() - strlen(s)) / 2;
if (x < 0)
x = 0;
ClearEol(0, 0, clrCyan);
Write(x, 0, s, clrBlack, clrCyan);
const char *t = strchr(s, '\t');
if (t) {
char buffer[Width() + 1];
unsigned int n = t - s;
if (n >= sizeof(buffer))
n = sizeof(buffer) - 1;
strn0cpy(buffer, s, n);
Write(1, 0, buffer, clrBlack, clrCyan);
t++;
Write(-(cDvbApi::PrimaryDvbApi->WidthInCells(t) + 1), 0, t, clrBlack, clrCyan);
}
else {
int x = (Width() - strlen(s)) / 2;
if (x < 0)
x = 0;
Write(x, 0, s, clrBlack, clrCyan);
}
}
void cInterface::Status(const char *s, eDvbColor FgColor, eDvbColor BgColor)
@@ -308,10 +326,10 @@ void cInterface::QueryKeys(void)
{
Keys.Clear();
Clear();
WriteText(1, 1, "Learning Remote Control Keys");
WriteText(1, 3, "Phase 1: Detecting RC code type");
WriteText(1, 5, "Press any key on the RC unit");
cDvbApi::PrimaryDvbApi->Flush();
WriteText(1, 1, tr("Learning Remote Control Keys"));
WriteText(1, 3, tr("Phase 1: Detecting RC code type"));
WriteText(1, 5, tr("Press any key on the RC unit"));
Flush();
#ifndef REMOTE_KBD
unsigned char Code = 0;
unsigned short Address;
@@ -325,22 +343,22 @@ void cInterface::QueryKeys(void)
if (rcIo->DetectCode(&Code, &Address)) {
Keys.code = Code;
Keys.address = Address;
WriteText(1, 5, "RC code detected!");
WriteText(1, 6, "Do not press any key...");
cDvbApi::PrimaryDvbApi->Flush();
WriteText(1, 5, tr("RC code detected!"));
WriteText(1, 6, tr("Do not press any key..."));
Flush();
rcIo->Flush(3000);
ClearEol(0, 5);
ClearEol(0, 6);
cDvbApi::PrimaryDvbApi->Flush();
Flush();
break;
}
#endif
}
WriteText(1, 3, "Phase 2: Learning specific key codes");
WriteText(1, 3, tr("Phase 2: Learning specific key codes"));
tKey *k = Keys.keys;
while (k->type != kNone) {
char *Prompt;
asprintf(&Prompt, "Press key for '%s'", k->name);
asprintf(&Prompt, tr("Press key for '%s'"), tr(k->name));
WriteText(1, 5, Prompt);
delete Prompt;
for (;;) {
@@ -352,8 +370,8 @@ void cInterface::QueryKeys(void)
break;
}
case kDown: if (k > Keys.keys + 1) {
WriteText(1, 5, "Press 'Up' to confirm");
WriteText(1, 6, "Press 'Down' to continue");
WriteText(1, 5, tr("Press 'Up' to confirm"));
WriteText(1, 6, tr("Press 'Down' to continue"));
ClearEol(0, 7);
ClearEol(0, 8);
for (;;) {
@@ -378,11 +396,11 @@ void cInterface::QueryKeys(void)
}
}
if (k > Keys.keys)
WriteText(1, 7, "(press 'Up' to go back)");
WriteText(1, 7, tr("(press 'Up' to go back)"));
else
ClearEol(0, 7);
if (k > Keys.keys + 1)
WriteText(1, 8, "(press 'Down' to end key definition)");
WriteText(1, 8, tr("(press 'Down' to end key definition)"));
else
ClearEol(0, 8);
}
@@ -396,9 +414,9 @@ void cInterface::LearnKeys(void)
Clear();
QueryKeys();
Clear();
WriteText(1, 1, "Learning Remote Control Keys");
WriteText(1, 3, "Phase 3: Saving key codes");
WriteText(1, 5, "Press 'Up' to save, 'Down' to cancel");
WriteText(1, 1, tr("Learning Remote Control Keys"));
WriteText(1, 3, tr("Phase 3: Saving key codes"));
WriteText(1, 5, tr("Press 'Up' to save, 'Down' to cancel"));
for (;;) {
eKeys key = GetKey();
if (key == kUp) {