2003-12-02 02:33:35 +03:00
|
|
|
#ifndef _PLUGIN_MANAGER_H
|
|
|
|
#define _PLUGIN_MANAGER_H
|
|
|
|
|
|
|
|
#include "ReaderPlugin.h"
|
|
|
|
#include "DecoderPlugin.h"
|
2003-12-05 04:18:51 +03:00
|
|
|
#include <TList.h>
|
|
|
|
#include <Locker.h>
|
2003-12-02 02:33:35 +03:00
|
|
|
|
|
|
|
status_t _CreateReader(Reader **reader, int32 *streamCount, media_file_format *mff, BDataIO *source);
|
2004-02-29 23:09:42 +03:00
|
|
|
status_t _CreateDecoder(Decoder **decoder, const media_format &format);
|
2003-12-02 02:33:35 +03:00
|
|
|
|
|
|
|
void _DestroyReader(Reader *reader);
|
|
|
|
void _DestroyDecoder(Decoder *decoder);
|
|
|
|
|
2003-12-05 04:18:51 +03:00
|
|
|
|
|
|
|
class PluginManager
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PluginManager();
|
|
|
|
~PluginManager();
|
|
|
|
|
2003-12-14 22:23:16 +03:00
|
|
|
MediaPlugin * GetPlugin(const entry_ref &ref);
|
2003-12-05 04:18:51 +03:00
|
|
|
void PutPlugin(MediaPlugin *plugin);
|
|
|
|
|
|
|
|
private:
|
2003-12-14 22:23:16 +03:00
|
|
|
bool LoadPlugin(const entry_ref &ref, MediaPlugin **plugin, image_id *image);
|
2003-12-05 04:18:51 +03:00
|
|
|
|
|
|
|
struct plugin_info
|
|
|
|
{
|
|
|
|
char name[260];
|
|
|
|
int usecount;
|
|
|
|
MediaPlugin *plugin;
|
|
|
|
image_id image;
|
|
|
|
};
|
|
|
|
|
|
|
|
List<plugin_info> *fPluginList;
|
|
|
|
BLocker *fLocker;
|
|
|
|
};
|
|
|
|
|
2003-12-02 02:33:35 +03:00
|
|
|
#endif
|