From 76c331181a23f97d5e3f2b55c4741ef4e521242d Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 10 Sep 2000 18:00:00 +0200 Subject: Version 0.63 - The new "Setup" menu allows the user to configure several parameters to his/her personal taste (see MANUAL for details). - Workaround for a driver timing problem in cDvbApi::Cmd(), which sometimes caused the OSD to no longer be displayed (thanks to Niels de Carpentier). - Added the '-m486' option to the compiler call. - If a channel name contains a colon (':') it is now replaced with a '|' in channels.conf. - Not everybody appears to like the "page scrolling" mechanism introduced by Heino Goldenstein in version 0.61, so this is now configurable via the "Setup" menu. - The new 'dvbrc2vdr' tool (thanks to Plamen Ganev!) can be used to convert 'dvbrc' channel files into 'vdr' format. - Channels can now be "grouped" (thanks to Plamen Ganev!). See MANUAL for details. There is currently no mechanism to define and maintain "Channel groups" via the menu, so you'll have to insert "Channel group" control lines into your 'channels.conf' file manually (for example with a text editor). - Started a new file named FORMATS with a description of the various file formats used by VDR. - The "Primary DVB interface" can now be chosen via the "Setup" menu. - Display of the "current/next" information when switching channels can now be disabled via the "Setup" menu. - The "current/next" display now only shows those lines that actually contain information. - When directly selecting a channel by entering the channel number, the digits entered so far together with the name of that channel are displayed on the OSD (suggested by Martin Hammerschmid). --- dvbapi.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'dvbapi.c') diff --git a/dvbapi.c b/dvbapi.c index 0562a4f..9f9cbab 100644 --- a/dvbapi.c +++ b/dvbapi.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbapi.c 1.22 2000/08/06 14:06:14 kls Exp $ + * $Id: dvbapi.c 1.24 2000/09/10 10:25:09 kls Exp $ */ #include "dvbapi.h" @@ -1097,16 +1097,34 @@ cDvbApi::~cDvbApi() delete replayTitle; } +bool cDvbApi::SetPrimaryDvbApi(int n) +{ + n--; + if (0 <= n && n < NumDvbApis && dvbApi[n]) { + isyslog(LOG_INFO, "setting primary DVB to %d", n + 1); + PrimaryDvbApi = dvbApi[n]; + return true; + } + esyslog(LOG_ERR, "invalid DVB interface: %d", n + 1); + return false; +} + cDvbApi *cDvbApi::GetDvbApi(int Ca) { + cDvbApi *d = NULL; Ca--; for (int i = MAXDVBAPI; --i >= 0; ) { - if (dvbApi[i]) { - if ((i == Ca || Ca < 0) && !dvbApi[i]->Recording()) + if (dvbApi[i] && !dvbApi[i]->Recording()) { + if (i == Ca) return dvbApi[i]; + if (Ca < 0) { + d = dvbApi[i]; + if (d != PrimaryDvbApi) + break; + } } } - return NULL; + return d; } int cDvbApi::Index(void) @@ -1199,6 +1217,10 @@ void cDvbApi::Cmd(OSD_Command cmd, int color, int x0, int y0, int x1, int y1, co dc.y1 = y1; dc.data = (void *)data; ioctl(videoDev, VIDIOCSOSDCOMMAND, &dc); + usleep(10); // XXX Workaround for a driver bug (cInterface::DisplayChannel() displayed texts at wrong places + // XXX and sometimes the OSD was no longer displayed). + // XXX Increase the value if the problem still persists on your particular system. + // TODO Check if this is still necessary with driver versions after 0.6. } } #endif -- cgit v1.2.3