Und man kann auch per simplen Dummy-Plugin *) jedes beliebige Plugin per SVDRP starten (per lircrc) und somit auf die festen VDR Tasten zum Aufruf verzichten (ohne durch die 4 Usertasten eingeschränkt zu sein).
Per irexec kann man dann auch z.B. die Programmliste von epgsearch öffnen und mit der selben Taste wieder schliessen ohne das man den MainMenuHook Patch benötigt.
Code
begin
prog = irexec
remote = *
button = snapshot
delay = 0
repeat = 0
config = /bin/echo -e "PLUG epgsearch MENU NOW\nQUIT" | /bin/netcat localhost 2001
end
Dann noch menuorg und man kann den VDR komplett so konfigurieren wie man möchte. Geht also schon jetzt alles was man nur will.
cu
*)
Hab nix mit C am Hut, aber das läuft bei mir schon ewig, da kann man dann auch das MPlayer-Plugin per Direkttaste aufrufen ("/usr/bin/svdrpsend.pl PLUG callplugin CALL mplayer ") usw.:
C
/*
* callplugin.c: A plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
* $Id$
*/
#include <vdr/plugin.h>
#include <vdr/remote.h>
static const char *VERSION = "0.0.1";
static const char *DESCRIPTION = "Enter description for 'callplugin' plugin";
static const char *MAINMENUENTRY = 0;
class cPluginCallplugin : public cPlugin {
private:
// Add any member variables or functions you may need here.
public:
cPluginCallplugin(void);
virtual ~cPluginCallplugin();
virtual const char *Version(void) { return VERSION; }
virtual const char *Description(void) { return DESCRIPTION; }
virtual const char *CommandLineHelp(void);
virtual bool ProcessArgs(int argc, char *argv[]);
virtual bool Initialize(void);
virtual bool Start(void);
virtual void Stop(void);
virtual void Housekeeping(void);
virtual void MainThreadHook(void);
virtual cString Active(void);
virtual time_t WakeupTime(void);
virtual const char *MainMenuEntry(void) { return MAINMENUENTRY; }
virtual cOsdObject *MainMenuAction(void);
virtual cMenuSetupPage *SetupMenu(void);
virtual bool SetupParse(const char *Name, const char *Value);
virtual bool Service(const char *Id, void *Data = NULL);
virtual const char **SVDRPHelpPages(void);
virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode);
};
cPluginCallplugin::cPluginCallplugin(void)
{
// Initialize any member variables here.
// DON'T DO ANYTHING ELSE THAT MAY HAVE SIDE EFFECTS, REQUIRE GLOBAL
// VDR OBJECTS TO EXIST OR PRODUCE ANY OUTPUT!
}
cPluginCallplugin::~cPluginCallplugin()
{
// Clean up after yourself!
}
const char *cPluginCallplugin::CommandLineHelp(void)
{
// Return a string that describes all known command line options.
return NULL;
}
bool cPluginCallplugin::ProcessArgs(int argc, char *argv[])
{
// Implement command line argument processing here if applicable.
return true;
}
bool cPluginCallplugin::Initialize(void)
{
// Initialize any background activities the plugin shall perform.
return true;
}
bool cPluginCallplugin::Start(void)
{
// Start any background activities the plugin shall perform.
return true;
}
void cPluginCallplugin::Stop(void)
{
// Stop any background activities the plugin is performing.
}
void cPluginCallplugin::Housekeeping(void)
{
// Perform any cleanup or other regular tasks.
}
void cPluginCallplugin::MainThreadHook(void)
{
// Perform actions in the context of the main program thread.
// WARNING: Use with great care - see PLUGINS.html!
}
cString cPluginCallplugin::Active(void)
{
// Return a message string if shutdown should be postponed
return NULL;
}
time_t cPluginCallplugin::WakeupTime(void)
{
// Return custom wakeup time for shutdown script
return 0;
}
cOsdObject *cPluginCallplugin::MainMenuAction(void)
{
// Perform the action when selected from the main VDR menu.
return NULL;
}
cMenuSetupPage *cPluginCallplugin::SetupMenu(void)
{
// Return a setup menu in case the plugin supports one.
return NULL;
}
bool cPluginCallplugin::SetupParse(const char *Name, const char *Value)
{
// Parse your own setup parameters and store their values.
return false;
}
bool cPluginCallplugin::Service(const char *Id, void *Data)
{
// Handle custom service requests from other plugins
return false;
}
const char **cPluginCallplugin::SVDRPHelpPages(void)
{
// Return help text for SVDRP commands this plugin implements
static const char *HelpPages[] = {
"CALL\n"
" Call a given Plugin.",
NULL
};
return HelpPages;
}
cString cPluginCallplugin::SVDRPCommand(const char *Command, const char *Option, int &ReplyCode)
{
// Process SVDRP commands this plugin implements
if (strcasecmp(Command, "CALL") == 0) {
if (cRemote::CallPlugin(Option))
return cString::sprintf("Opening %s plugin", Option);
else {
ReplyCode = 550; // Requested action not taken
return cString::sprintf("Opening %s plugin failed!", Option);
}
}
return NULL;
}
VDRPLUGINCREATOR(cPluginCallplugin); // Don't touch this!
Alles anzeigen