Hallo,
In der "Start()"-Funktion möchte ich ALSA initialisieren. Das Plugin wird problemlos kompiliert. Eine notwendige ALSA Funktion macht aber Probleme:
snd_pcm_hw_params_alloca(snd_pcm_hw_params_t **ptr)
Die Fehlemeldung:
vdr: /usr/src/VDR/PLUGINS/lib/libvdr-test.so.1.3.23: undefined symbol: snd_pcm_hw_params_sizeof
Der Quelltext:
C
/*
/*
* test.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 <alsa/asoundlib.h>
static const char *VERSION = "0.0.1";
static const char *DESCRIPTION = "Enter description for 'test' plugin";
static const char *MAINMENUENTRY = "Test";
class cPluginTest : public cPlugin {
private:
// Add any member variables or functions you may need here.
public:
cPluginTest(void);
virtual ~cPluginTest();
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 const char *MainMenuEntry(void) { return MAINMENUENTRY; }
virtual cOsdObject *MainMenuAction(void);
virtual cMenuSetupPage *SetupMenu(void);
virtual bool SetupParse(const char *Name, const char *Value);
};
cPluginTest::cPluginTest(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!
}
cPluginTest::~cPluginTest()
{
// Clean up after yourself!
}
const char *cPluginTest::CommandLineHelp(void)
{
// Return a string that describes all known command line options.
return NULL;
}
bool cPluginTest::ProcessArgs(int argc, char *argv[])
{
// Implement command line argument processing here if applicable.
return true;
}
bool cPluginTest::Initialize(void)
{
// Initialize any background activities the plugin shall perform.
return true;
}
bool cPluginTest::Start(void)
{
// Start any background activities the plugin shall perform.
snd_pcm_hw_params_t *hwparams;
snd_pcm_hw_params_alloca(&hwparams);
return true;
}
void cPluginTest::Stop(void)
{
// Stop any background activities the plugin shall perform.
}
void cPluginTest::Housekeeping(void)
{
// Perform any cleanup or other regular tasks.
}
cOsdObject *cPluginTest::MainMenuAction(void)
{
// Perform the action when selected from the main VDR menu.
return NULL;
}
cMenuSetupPage *cPluginTest::SetupMenu(void)
{
// Return a setup menu in case the plugin supports one.
return NULL;
}
bool cPluginTest::SetupParse(const char *Name, const char *Value)
{
// Parse your own setup parameters and store their values.
return false;
}
VDRPLUGINCREATOR(cPluginTest); // Don't touch this!
Alles anzeigen
Weiß jemand eine Lösung?