summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-11-24 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-11-24 18:00:00 +0100
commitfe9499ba901f5c32dd0b3841a2b6e599fefc144f (patch)
tree3a9efdef4b928aeffea51fc36a011ef367c14b21 /menu.c
parent8b5d4040832f9a11119002fef5144a7d6705f19c (diff)
downloadvdr-patch-lnbsharing-fe9499ba901f5c32dd0b3841a2b6e599fefc144f.tar.gz
vdr-patch-lnbsharing-fe9499ba901f5c32dd0b3841a2b6e599fefc144f.tar.bz2
Version 1.1.17vdr-1.1.17
- Added new entries to 'ca.conf'. - Fixed closing unused PID handles (thanks to Stefan Schluenss for reporting this one). - Added more examples to 'diseqc.conf' (thanks to Oliver Endriss). - Fixed disabling multiple recordings on a single DVB card (comment out the definition of the macros DO_REC_AND_PLAY_ON_PRIMARY_DEVICE and DO_MULTIPLE_RECORDINGS in dvbdevice.c). - Plugins can now have their very own OSD setup in the object they return from a call to cPlugin::MainMenuAction(). In order to implement this, the return type of cPlugin::MainMenuAction() had to be changed from (cOsdMenu *) to (cOsdObject *). So in case you are compiling an existing plugin with this version of VDR and you get an error message, simply change cOsdMenu to cOsdObject in the plugin's source for the MainMenuAction() function. Plugin authors who have so far (ab)used the cControl mechanism to implement their own raw OSD should take a look at the new demo plugin 'osddemo'. It implements a very primitive game that shows how a plugin can have its own raw OSD. Especially look into cLineGame and see how it implements the Show() function. See also the chapter on "User interaction" in PLUGINS.html. - Added three new fields to the lines in 'channels.conf': NID, TID and RID. NID and TID are the Network and Transport Stream IDs, respectively. RID is an additional ID that can be used to tell apart channels that would otherwise be indistinguishable. This is typically the case with radio channels, which may have the same NID, TID and SID, but different "radio IDs". This new field is therefore called RID ("radio ID"). Currently NID and TID are not yet used by VDR and should always be 0. The RID is actually used when building the "unique channel ID", so if you have channels in your 'channels.conf' file that cause error messages when loading, you can set the RIDs of these channels to different values. When reading an old 'channels.conf' these new fields will be automatically initialized to 0 and once the file is written back to disk they will be appended to the channel definitions. Thanks to Régis Bossut for pointing out that with some providers the channels can only be distinguished through the RID. - The "unique channel ID" now contains an optional 5th part (the RID). See man vdr(5). - Updated 'channels.conf.cable' and made some channels unique using the new RID (thanks to Andreas Kool for pointing out the problems). - Made some channels unique in 'channels.conf.terr' using the new RID. - Extended the '-l' option to allow logging to LOG_LOCALn (n=0..7) by writing, for instance, '-l 3.7' (suggested by Jürgen Schmidt). - Now deleting stale lock files if they have a time stamp that is outside the window 'now +/- LOCKFILESTALETIME'. This improves things in cases where the system time makes far jumps, so that a lock file might end up with a time stamp that lies in the distant future (thanks to Oliver Endriss).
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c38
1 files changed, 29 insertions, 9 deletions
diff --git a/menu.c b/menu.c
index 2e29b02..0210e2d 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.224 2002/11/10 16:05:15 kls Exp $
+ * $Id: menu.c 1.226 2002/11/24 14:34:41 kls Exp $
*/
#include "menu.h"
@@ -582,6 +582,11 @@ void cMenuEditChannel::Setup(void)
Add(new cMenuEditIntItem( tr("Tpid"), &data.tpid, 0, 0x1FFF));
Add(new cMenuEditCaItem( tr("CA"), &data.ca, true));
Add(new cMenuEditIntItem( tr("Sid"), &data.sid, 0));
+ /* XXX not yet used
+ Add(new cMenuEditIntItem( tr("Nid"), &data.nid, 0));
+ Add(new cMenuEditIntItem( tr("Tid"), &data.tid, 0));
+ Add(new cMenuEditIntItem( tr("Rid"), &data.rid, 0));
+ XXX*/
// Parameters for specific types of sources:
ST(" S ") Add(new cMenuEditChrItem( tr("Polarization"), &data.polarization, "hv"));
ST("CS ") Add(new cMenuEditIntItem( tr("Srate"), &data.srate));
@@ -1089,7 +1094,7 @@ cMenuEvent::cMenuEvent(const cEventInfo *EventInfo, bool CanSwitch)
{
eventInfo = EventInfo;
if (eventInfo) {
- cChannel *channel = Channels.GetByChannelID(eventInfo->GetChannelID());
+ cChannel *channel = Channels.GetByChannelID(eventInfo->GetChannelID(), true);
if (channel) {
char *buffer;
asprintf(&buffer, "%-17.*s\t%.*s %s - %s", 17, channel->Name(), 5, eventInfo->GetDate(), eventInfo->GetTimeString(), eventInfo->GetEndTimeString());
@@ -1183,7 +1188,7 @@ cMenuWhatsOn::cMenuWhatsOn(const cSchedules *Schedules, bool Now, int CurrentCha
pArray[num] = Now ? Schedule->GetPresentEvent() : Schedule->GetFollowingEvent();
if (pArray[num]) {
- cChannel *channel = Channels.GetByChannelID(pArray[num]->GetChannelID());
+ cChannel *channel = Channels.GetByChannelID(pArray[num]->GetChannelID(), true);
if (channel) {
pArray[num]->SetChannelNumber(channel->Number());
num++;
@@ -1213,7 +1218,7 @@ eOSState cMenuWhatsOn::Switch(void)
{
cMenuWhatsOnItem *item = (cMenuWhatsOnItem *)Get(Current());
if (item) {
- cChannel *channel = Channels.GetByChannelID(item->eventInfo->GetChannelID());
+ cChannel *channel = Channels.GetByChannelID(item->eventInfo->GetChannelID(), true);
if (channel && cDevice::PrimaryDevice()->SwitchChannel(channel, true))
return osEnd;
}
@@ -1397,7 +1402,7 @@ eOSState cMenuSchedule::ProcessKey(eKeys Key)
if (!now && !next) {
int ChannelNr = 0;
if (Count()) {
- cChannel *channel = Channels.GetByChannelID(((cMenuScheduleItem *)Get(Current()))->eventInfo->GetChannelID());
+ cChannel *channel = Channels.GetByChannelID(((cMenuScheduleItem *)Get(Current()))->eventInfo->GetChannelID(), true);
if (channel)
ChannelNr = channel->Number();
}
@@ -1424,7 +1429,7 @@ eOSState cMenuSchedule::ProcessKey(eKeys Key)
now = next = false;
const cEventInfo *ei = cMenuWhatsOn::ScheduleEventInfo();
if (ei) {
- cChannel *channel = Channels.GetByChannelID(ei->GetChannelID());
+ cChannel *channel = Channels.GetByChannelID(ei->GetChannelID(), true);
if (channel) {
PrepareSchedule(channel);
if (channel->Number() != cDevice::CurrentChannel()) {
@@ -2176,6 +2181,8 @@ cMenuPluginItem::cMenuPluginItem(const char *Name, int Index)
#define STOP_RECORDING tr(" Stop recording ")
#define ON_PRIMARY_INTERFACE tr("on primary interface")
+cOsdObject *cMenuMain::pluginOsdObject = NULL;
+
cMenuMain::cMenuMain(bool Replaying, eOSState State)
:cOsdMenu("")
{
@@ -2195,6 +2202,13 @@ cMenuMain::cMenuMain(bool Replaying, eOSState State)
}
}
+cOsdObject *cMenuMain::PluginOsdObject(void)
+{
+ cOsdObject *o = pluginOsdObject;
+ pluginOsdObject = NULL;
+ return o;
+}
+
void cMenuMain::Set(void)
{
Clear();
@@ -2308,9 +2322,15 @@ eOSState cMenuMain::ProcessKey(eKeys Key)
if (item) {
cPlugin *p = cPluginManager::GetPlugin(item->PluginIndex());
if (p) {
- cOsdMenu *menu = p->MainMenuAction();
- if (menu)
- return AddSubMenu(menu);
+ cOsdObject *menu = p->MainMenuAction();
+ if (menu) {
+ if (menu->IsMenu())
+ return AddSubMenu((cOsdMenu *)menu);
+ else {
+ pluginOsdObject = menu;
+ return osPlugin;
+ }
+ }
}
}
state = osEnd;