mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
- Fixed displaying the "Audio" menu with the "Green" button from the "Main" menu in case there is only one audio track (thanks to Sascha Volkenandt for reporting this one). - Now setting primaryDevice = NULL before deleting the devices in cDevice::Shutdown() to avoid problems in case other threads access it (thanks to Wolfgang Rohdewald for pointing this out). - Fixed a buffer overflow in case a station defines all 32 audio PIDs (thanks to Christian Jacobsen for reporting this one). - Fixed masking SubStreamType in cDevice::PlayPesPacket() (thanks to Werner Fink for pointing out this one). - The new function cPlugin::Stop() shall be used to stop any background activities of a plugin. Previously this was done in the plugin's destructor, but it is better to do this in a dedicated function that can be called early when shutting down. - Moved the call to SetAudioChannel(0) into cDevice::ClrAvailableTracks() to have it executed also when starting a replay. - Completed the Danish OSD texts (thanks to Mogens Elneff). - Completed the French OSD texts (thanks to Olivier Jacques). - The new setup option "OSD/Channel info time" can be used to define the time after which the channel display is removed if no key has been pressed (thanks to Olivier Jacques). - Modified cDolbyRepacker to make sure PES packets don't exceed the requested length (thanks to Reinhard Nissl). - Fixed several memory leaks that were introduced through the use of cString (thanks to Stefan Huelswitt for reporting these). - Added CMD_SPU_CHG_COLCON to cDvbSpuDecoder::setTime() (thanks to Marco Schlüßler). - Making sure the current audio track is actually one of the ones available in a recording (thanks to Sascha Volkenandt for reporting a problem when starting replay of a recording that has no Dolby Digital audio after switching to a channel that has DD and selecting the DD audio track). - Removed 'flags' from tTrackId (thought we would need this, but apparently we don't). - Making sure the "Mute" and "Volume+/-" keys don't interfere with digital audio. - Fixed the "pre 1.3.19" compatibility mode for old Dolby Digital recordings (thanks to Werner Fink for pointing out that this can be triggered in the default branch). - Calling pesAssembler->Reset() in cDevice::AttachPlayer() to avoid problems with residual data in replay and Transfer Mode (thanks to Werner Fink for pointing this out). - Added MPEG1 replay capability to cPesAssembler (thanks to Stefan Huelswitt).
96 lines
2.4 KiB
C++
96 lines
2.4 KiB
C++
/*
|
|
* plugin.h: The VDR plugin interface
|
|
*
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
* how to reach the author.
|
|
*
|
|
* $Id: plugin.h 1.8 2005/01/30 14:03:48 kls Exp $
|
|
*/
|
|
|
|
#ifndef __PLUGIN_H
|
|
#define __PLUGIN_H
|
|
|
|
#include "i18n.h"
|
|
#include "menuitems.h"
|
|
#include "osdbase.h"
|
|
#include "tools.h"
|
|
|
|
#define VDRPLUGINCREATOR(PluginClass) extern "C" void *VDRPluginCreator(void) { return new PluginClass; }
|
|
|
|
class cPlugin {
|
|
friend class cDll;
|
|
friend class cPluginManager;
|
|
private:
|
|
static char *configDirectory;
|
|
const char *name;
|
|
bool started;
|
|
void SetName(const char *s);
|
|
public:
|
|
cPlugin(void);
|
|
virtual ~cPlugin();
|
|
|
|
const char *Name(void) { return name; }
|
|
virtual const char *Version(void) = 0;
|
|
virtual const char *Description(void) = 0;
|
|
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);
|
|
virtual cOsdObject *MainMenuAction(void);
|
|
|
|
virtual cMenuSetupPage *SetupMenu(void);
|
|
virtual bool SetupParse(const char *Name, const char *Value);
|
|
void SetupStore(const char *Name, const char *Value = NULL);
|
|
void SetupStore(const char *Name, int Value);
|
|
|
|
void RegisterI18n(const tI18nPhrase * const Phrases);
|
|
|
|
static void SetConfigDirectory(const char *Dir);
|
|
static const char *ConfigDirectory(const char *PluginName = NULL);
|
|
};
|
|
|
|
class cDll : public cListObject {
|
|
private:
|
|
char *fileName;
|
|
char *args;
|
|
void *handle;
|
|
cPlugin *plugin;
|
|
public:
|
|
cDll(const char *FileName, const char *Args);
|
|
virtual ~cDll();
|
|
bool Load(bool Log = false);
|
|
cPlugin *Plugin(void) { return plugin; }
|
|
};
|
|
|
|
class cDlls : public cList<cDll> {};
|
|
|
|
class cPluginManager {
|
|
private:
|
|
static cPluginManager *pluginManager;
|
|
char *directory;
|
|
time_t lastHousekeeping;
|
|
int nextHousekeeping;
|
|
cDlls dlls;
|
|
public:
|
|
cPluginManager(const char *Directory);
|
|
virtual ~cPluginManager();
|
|
void SetDirectory(const char *Directory);
|
|
void AddPlugin(const char *Args);
|
|
bool LoadPlugins(bool Log = false);
|
|
bool InitializePlugins(void);
|
|
bool StartPlugins(void);
|
|
void Housekeeping(void);
|
|
static bool HasPlugins(void);
|
|
static cPlugin *GetPlugin(int Index);
|
|
static cPlugin *GetPlugin(const char *Name);
|
|
void StopPlugins(void);
|
|
void Shutdown(void);
|
|
};
|
|
|
|
#endif //__PLUGIN_H
|