Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Calling plugins derived from cOsdObject



Am Mittwoch, 5. Mai 2004 08:49 schrieb Christian Wieninger:
> the idea was: I wanted to write a plugin from which one can launch other
> plugins. The reason: Some plugins are not used very often, but can be
> configured to appear/disappear in the main menu, e.g. femon, dvd, vcd. When
> I disable them, but want to call them, I first have to go to the setup
> menu, enable them, close the osd and reopen the osd. After using, the same
> procedure to disable them. Of course, itīs not a big thing, but I thought
> it would be nice to have a plugin, which always lists all other plugins and
> allows to launch them, regardless if the appear in the main menu or not.
> The whole thing was also meant as a little excercise for me in writing my
> first plugin.
>
> So I tried to call them in the same way as you do in the cMainMenu:
>
> if (p) {
>     cOsdObject *menu = p->MainMenuAction();
>     if (menu) {
>         if (menu->IsMenu())
>             return AddSubMenu((cOsdMenu *)menu);
>         else {
>             pluginOsdObject = menu;
>             return osPlugin;
>         }
>     }
> }
>
> But since pluginOsdObject is privat, I cannot do this the same way. Plugins
> with menus work fine.
> My question: is there a way to launch plugins, that are derived from
> cOsdObject?

Look into the games and media detection plugin to see how that's done... In 
ProcessKeys of your cOsdObject, you can return osPlugin, which calls the main 
menu entry of your plugin again. So, you can do the same thing in your 
MainMenuAction that is done in the code you posted. This way you can return 
completely different cOsdObject's than that currently in action.

Greetings,
Sascha



-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index