Luca Olivetti wrote:
Klaus Schmidinger wrote:I have many doubts here: a) How can I display that the dish is moving and its position without disrupting the normal osd and without crashing xine?
Try displaying a text message with
Skins.Message(mtInfo, "some text");
This should be displayed in the channel display (if open) or as a separate
message line.
Ideally the (new) channel display should stay open until the dish has reached the position (so looking at the screen you know why the dish is moving).
[.....]
Well, I had to patch vdr to accomplish what I need.Calling Skins.Message() is not thread safe, though. Maybe I need to do something
in that area...
Anyway the problem mentioned above (the display refreshed only every 2 seconds) won't go away, even if it is thread safe :-/
--- menu.c.orig 2004-06-22 19:17:03.929205392 +0200 +++ menu.c 2004-06-22 21:55:34.157430944 +0200 @@ -2637,6 +2637,7 @@ } }; if (time_ms() - lastTime < INFOTIMEOUT) { + if (cStatus::MsgAlterDisplayChannel(displayChannel)) lastTime = time_ms(); if (!number && group < 0 && channel && channel->Number() != cDevice::CurrentChannel()) Refresh(); // makes sure a channel switch through the SVDRP CHAN command is displayed DisplayInfo(); --- status.c.orig 2004-06-22 19:31:04.912356520 +0200 +++ status.c 2004-06-22 19:40:43.091459936 +0200 @@ -100,3 +100,10 @@ for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) sm->OsdProgramme(PresentTime, PresentTitle, PresentSubtitle, FollowingTime, FollowingTitle, FollowingSubtitle); } + +bool cStatus::MsgAlterDisplayChannel(cSkinDisplayChannel *displayChannel) +{ + for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) + if (sm->AlterDisplayChannel(displayChannel)) return true; + return false; +} --- status.h.orig 2004-06-22 19:30:58.919267608 +0200 +++ status.h 2004-06-22 19:40:43.582385304 +0200 @@ -59,6 +59,9 @@ // The OSD displays the single line Text with the current channel information. virtual void OsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle) {} // The OSD displays the given programme information. + virtual bool AlterDisplayChannel(cSkinDisplayChannel *displayChannel) { return false; } + // When channel information is on display the plugin can alter + // the display and, by returning true, keep it on screen public: cStatus(void); virtual ~cStatus(); @@ -76,6 +79,7 @@ static void MsgOsdTextItem(const char *Text, bool Scroll = false); static void MsgOsdChannel(const char *Text); static void MsgOsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle); + static bool MsgAlterDisplayChannel(cSkinDisplayChannel *displayChannel); }; #endif //__STATUS_H
Attachment:
signature.asc
Description: OpenPGP digital signature