Main Page   Modules   Compound List   File List   Compound Members   File Members  

xlv_plugin_mgr.h File Reference

This file describes the XLV_PluginMgr object and the generic XLV_Plugin API used to talk to plugins. More...

#include <glib.h>
#include <gmodule.h>

Go to the source code of this file.

Compounds

struct  _XLV_Data
struct  _XLV_GUID
 XLV GUID structure. More...

struct  _XLV_Plugin
struct  _XLV_PluginGetOption
 Descriptor of an option This structure contains:. More...

struct  _XLV_PluginOption
struct  _XLV_PluginOptionsList
struct  _XLV_PluginStream
struct  _XLV_Stream
struct  _XLV_StreamBuilder

Errors

#define XLV_STREAM_OK   0
#define XLV_STREAM_EOF   1
#define XLV_STREAM_ERRIO   2
#define XLV_STREAM_UNSUPPORTED   3
#define XLV_STREAM_INVAL   4
#define XLV_STREAM_NOMEM   5

Plugin types

#define XLV_PLUGIN_NONE   0
 This is an unknown plugin.

#define XLV_PLUGIN_AUDIO_RENDERER   1
 This is an audio renderer.

#define XLV_PLUGIN_VIDEO_RENDERER   2
 This is a video renderer.

#define XLV_PLUGIN_AUDIO_CODEC   3
 This is an audio codec.

#define XLV_PLUGIN_VIDEO_CODEC   4
 This is a video codec.

#define XLV_PLUGIN_INPUT_STREAM   5
 This is an input stream.

#define XLV_PLUGIN_SYSTEM   6
 This is a demultiplexer (maybe a multiplexer).

#define XLV_PLUGIN_SYSENC   7
 This is a multiplexer.

#define XLV_PLUGIN_GLUE   8
 This is a glue plugin.


Generic plugin ioctl

#define XLV_PLUGIN_GET_CAPS   0
 Return capabilities of the plugin.


XLV Plugin Stream API

#define XLV_STREAM_RESET   10
#define XLV_STREAM_SEEK   11
#define XLV_STREAM_SKIP   12
#define XLV_STREAM_TELL   13
#define XLV_STREAM_SIZE   14
#define XLV_STREAM_ENABLE_CACHE   15
#define XLV_STREAM_DISABLE_CACHE   16

Possible flags for XLV_Data

#define XLV_DATA_UNKNOWN   0x0000
 No flags.

#define XLV_DATA_KEY_FRAME   0x0001
 This is a key frame.

#define XLV_DATA_TIMESTAMP   0x0002
 Timestamp is valid.

#define XLV_DATA_NO_DATA   0x0004
 This buffer does not contain data (there is not anymore data).

#define XLV_DATA_NULL_DATA   0x0008
 This buffer does not contain data (there is no data for the moment).

typedef _XLV_Data XLV_Data

Plugin caps

#define XLV_PLUGIN_PREALLOC_CAPABLE   0x01
 plugin can prealloc buffers (useful for renderers).

#define XLV_PLUGIN_WRITABLE   0x02
 plugin can accept buffers through Write.

#define XLV_PLUGIN_READABLE   0x04
 plugin can read buffers through Read.

#define XLV_PLUGIN_DECODER   0x08
 plugin can decode (it may be a demuxer or a codec).

#define XLV_PLUGIN_ENCODER   0x10
 plugin can encode (it may be a demuxer or a codec).

#define XLV_PLUGIN_CONFIGURABLE   0x20
 plugin can be configured.

#define XLV_PLUGIN_SEEKABLE   0x40
 plugin can seek streams.

#define XLV_PLUGIN_CODEC_CONFIG   0x80
 plugin follow XLV Codec Config API.


Stream mode

#define XLV_READ_ONLY   0
#define XLV_WRITE_ONLY   1
#define XLV_RDWR   2

Defines

#define xlv_fourcc(a, b, c, d)   ( ((guint32)(a)) | ((guint32)(b)) << 8 | ((guint32)(c)) << 16 | ((guint32)(d)) << 24)
#define XLV_PLUGIN_GET_OPTIONS_LIST   1
#define XLV_PLUGIN_GET_OPTION   2
#define XLV_PLUGIN_SET_OPTION   3
#define XLV_PLUGIN_OPTION_UINT8   0
 option is an 8 bits integer.

#define XLV_PLUGIN_OPTION_UINT16   1
 option is a 16 bits integer.

#define XLV_PLUGIN_OPTION_UINT32   2
 option is a 32 bits integer.

#define XLV_PLUGIN_OPTION_STRING   3
 option is a string.

#define XLV_PLUGIN_OPTION_CHOOSEONE   4
 option is a single choose options described by m_option_substree.

#define XLV_PLUGIN_OPTION_CHOOSEMULTI   5
 option is a multiple choose options described by m_option_substree.

#define XLV_PLUGIN_OPTION_GROUP   6
 this is a group of options. Options are described in m_option_subtree.

#define XLV_PLUGIN_OPTION_BOOL   7
 option is a boolean.

#define XLV_ADAPTOR_SET_REQUIRED   500
#define XLV_NULL_GUID   {0, 0, 0, {0,0,0,0, 0,0,0,0}}
#define XLV_CLOSE(s)   ((s)->m_plugin->f_close((s)->m_stream))
#define XLV_IOCTL(s, cmd, len)   ( ((s)->m_plugin->f_ioctl != NULL) ? ((s)->m_plugin->f_ioctl((s)->m_stream, cmd, len)) : -1 )
#define XLV_READ(s, b, len)   xlv_read((s), (b), (len))
#define XLV_WRITE(s, b, len)   xlv_write((s), (b), (len))
#define xlv_plugin_add(mgr, plug)   xlv_plugin_package_add(mgr, NULL, plug)

Typedefs

typedef _XLV_PluginGetOption XLV_PluginGetOption
 Descriptor of an option This structure contains:.

typedef _XLV_PluginOption XLV_PluginOption
typedef _XLV_PluginOptionsList XLV_PluginOptionsList
typedef _XLV_GUID XLV_GUID
 XLV GUID structure.

typedef _XLV_Stream XLV_Stream
 XLV Stream descriptor.

typedef _XLV_PluginMgr XLV_PluginMgr
 XLV Plugin Manager class container.

typedef _XLV_PluginStream XLV_PluginStream
 Stream specific to the plugin description. More...

typedef _XLV_Plugin XLV_Plugin
 XLV Plugin class definition.

typedef _XLV_Module XLV_Module
typedef XLV_PluginStream *(* XLV_OpenPlugin )(XLV_Stream *in_stream, gpointer plugdata)
typedef XLV_PluginStream *(* XLV_OpenStream )(const gchar *name, guint mode, gpointer plugdata)
typedef void(* XLV_ClosePlugin )(XLV_PluginStream *stream)
typedef gint(* XLV_Ioctl )(XLV_PluginStream *stream, guint cmd, gpointer param)
typedef guint32(* XLV_ReadData )(XLV_PluginStream *stream, gpointer data, guint32 len)
typedef guint32(* XLV_WriteData )(XLV_PluginStream *stream, gpointer data, guint32 len)
typedef void(* XLV_ReleasePlugin )(XLV_Plugin *plug)
typedef gboolean(* XLV_PluginInitializer )(XLV_PluginMgr *mgr, XLV_Module *module)
typedef _XLV_StreamBuilder XLV_StreamBuilder

Functions

XLV_PluginMgrxlv_plugin_mgr_new ()
 constructor.

void xlv_plugin_mgr_cleanup (XLV_PluginMgr *mgr)
 destructor.

void xlv_plugin_add_path (XLV_PluginMgr *mgr, const gchar *path)
 add path to the search path. More...

void xlv_plugin_load_all (XLV_PluginMgr *mgr, gboolean with_registered)
 it loads all plugins found in the searchpath into the memory. More...

gint xlv_plugin_load (XLV_PluginMgr *mgr, const gchar *name)
 it loads a new shared library into the memory and register the included plugins. More...

gboolean xlv_plugin_load_registered (XLV_Plugin *plugin)
 loads an already registered plugin. More...

void xlv_plugin_invalidate (XLV_Plugin *plugin)
 unloads a plugin from the memory. More...

gboolean xlv_plugin_unregister (XLV_Plugin *plugin)
 unregisters a plugin from the plugin database. More...

gint xlv_plugin_package_add (XLV_PluginMgr *mgr, XLV_Module *module, XLV_Plugin *plugin)
 adds a plugin to a master plugin. More...

gint xlv_plugin_add_module (XLV_PluginMgr *mgr, const gchar *module, const gchar *idname, guint32 plugin_type)
 it adds a new module/plugin to the plugin database of the plugin manager.

gboolean xlv_plugin_add_dep (XLV_Plugin *plugin, XLV_Plugin *dep)
 it makes depend a plugin on an another plugin. More...

gboolean xlv_plugin_add_named_dep (XLV_Plugin *plugin, const gchar *dep)
 it makes depend a plugin on an another named plugin. More...

guint xlv_get_number_of_plugins (XLV_PluginMgr *mgr)
 it returns the number of plugins currently registered in the database. More...

XLV_Pluginxlv_plugin_get_from_id (XLV_PluginMgr *mgr, guint id)
 Returns a plugin structure according to the id. More...

XLV_Pluginxlv_plugin_get_from_idname (XLV_PluginMgr *mgr, const gchar *idname)
 Returns a plugin structure according to the idname string. More...

XLV_Pluginxlv_plugin_get_from_guid (XLV_PluginMgr *mgr, XLV_GUID *guid)
 Returns a plugin structure according to the GUID. More...

GList * xlv_plugin_iterate (XLV_PluginMgr *mgr)
 Returns a list of the registered plugins. More...

void xlv_plugin_set_unused (XLV_Plugin *plugin)
 Mark a plugin as unused.

gboolean xlv_plugin_is_loaded (XLV_Plugin *plugin)
XLV_Streamxlv_open (XLV_Plugin *plug, XLV_Stream *in)
 opens a new stream in filter mode. More...

XLV_Streamxlv_open_stream (XLV_Plugin *plug, const gchar *name, guint mode)
 opens a new stream. More...

void xlv_close (XLV_Stream *s)
 closes a stream. More...

guint32 xlv_read (XLV_Stream *s, gpointer data, guint32 len)
guint32 xlv_write (XLV_Stream *s, gpointer data, guint32 len)


Detailed Description

This file describes the XLV_PluginMgr object and the generic XLV_Plugin API used to talk to plugins.

Author:
Guilhem Lavaux
Version:
0.7

Typedef Documentation

typedef struct _XLV_Data XLV_Data
 

This is a generic structure to give a buffer to a plugin. This includes a flag and the size of the buffer.


Generated on Mon Jul 1 19:39:08 2002 for XLV by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002