-I$(top_srcdir)/src/lib
noinst_PROGRAMS = \
- test
+ test \
+ list-parsers
test_SOURCES = test.c
test_LDADD = $(top_builddir)/src/lib/liblightmediascanner.la @SQLITE3_LIBS@
test_DEPENDENCIES = $(top_builddir)/src/lib/liblightmediascanner.la
+
+
+list_parsers_SOURCES = list-parsers.c
+list_parsers_LDADD = $(top_builddir)/src/lib/liblightmediascanner.la \
+ @SQLITE3_LIBS@
+list_parsers_DEPENDENCIES = $(top_builddir)/src/lib/liblightmediascanner.la
--- /dev/null
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <lightmediascanner.h>
+
+static void
+usage(const char *prgname)
+{
+ fprintf(stderr,
+ "Usage:\n"
+ "\t%s [category]\n"
+ "no category means all parsers.\n",
+ prgname);
+}
+
+static void
+print_array(const char * const *array)
+{
+ if (!array)
+ return;
+
+ for (; *array != NULL; array++)
+ printf("\t\t%s\n", *array);
+}
+
+static void
+print_parser(const char *path, const struct lms_parser_info *info)
+{
+ printf("parser: %s", path);
+
+ if (!info) {
+ fputs(" --- no information\n", stdout);
+ return;
+ }
+
+ fputc('\n', stdout);
+ printf("\tname.......: %s\n", info->name);
+ printf("\tcategories.:\n");
+ print_array(info->categories);
+ printf("\tdescription: %s\n", info->description);
+ printf("\tversion....: %s\n", info->version);
+ printf("\tauthors....:\n");
+ print_array(info->authors);
+ printf("\turi........: %s\n", info->uri);
+ fputc('\n', stdout);
+}
+
+static int
+list_by_category(void *data, const char *path, const struct lms_parser_info *info)
+{
+ print_parser(path, info);
+ return 1;
+}
+
+static int
+list_parser(void *data, const char *path)
+{
+ struct lms_parser_info *info;
+
+ info = lms_parser_info(path);
+ print_parser(path, info);
+ lms_parser_info_free(info);
+ return 1;
+}
+
+int
+main(int argc, char *argv[])
+{
+ int i;
+ char *category = NULL;
+
+ for (i = 1; i < argc; i++)
+ if (argv[i][0] == '-') {
+ if (strcmp(argv[i], "-h") == 0 ||
+ strcmp(argv[i], "--help") == 0) {
+ usage(argv[0]);
+ return 1;
+ } else {
+ fprintf(stderr, "ERROR: unknown option %s\n", argv[i]);
+ return 1;
+ }
+ } else
+ category = argv[i];
+
+ if (category)
+ lms_parsers_list_by_category(category, list_by_category, NULL);
+ else
+ lms_parsers_list(list_parser, NULL);
+ return 0;
+}
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <dirent.h>
+#include <errno.h>
#include "lightmediascanner.h"
#include "lightmediascanner_private.h"
return parser->plugin;
}
+static int
+lms_parser_find(char *buf, int buf_size, const char *name)
+{
+ int r;
+
+ r = snprintf(buf, buf_size, "%s/%s.so", PLUGINSDIR, name);
+ if (r >= buf_size)
+ return 0;
+
+ return 1;
+}
+
+
/**
* Add parser plugin given it's name.
*
if (!name)
return NULL;
- snprintf(so_path, sizeof(so_path), "%s/%s.so", PLUGINSDIR, name);
+ if (!lms_parser_find(so_path, sizeof(so_path), name))
+ return NULL;
return lms_parser_add(lms, so_path);
}
return lms_charset_conv_del(lms->cs_conv, charset);
}
+
+/**
+ * List all known parsers on the system.
+ *
+ * No information is retrieved, you might like to call lms_parser_info()
+ * on the callback path.
+ *
+ * @param cb function to call for each path found. If it returns 0,
+ * it stops iteraction.
+ * @param data extra data to pass to @a cb on every call.
+ */
+void
+lms_parsers_list(int (*cb)(void *data, const char *path), const void *data)
+{
+ void *datap = (void *)data;
+ char path[PATH_MAX] = PLUGINSDIR;
+ int base;
+ DIR *d;
+ struct dirent *de;
+
+ if (!cb)
+ return;
+
+ base = sizeof(PLUGINSDIR) - 1;
+ if (base + sizeof("/.so") >= PATH_MAX) {
+ fprintf(stderr, "ERROR: path is too long '%s'\n", path);
+ return;
+ }
+
+ d = opendir(path);
+ if (!d) {
+ fprintf(stderr, "ERROR: could not open directory %s: %s\n",
+ path, strerror(errno));
+ return;
+ }
+
+ path[base] = '/';
+ base++;
+
+ while ((de = readdir(d)) != NULL) {
+ int len;
+
+ if (de->d_name[0] == '.')
+ continue;
+
+ len = strlen(de->d_name);
+ if (len < 3 || memcmp(de->d_name + len - 3, ".so", 3) != 0)
+ continue;
+
+ memcpy(path + base, de->d_name, len + 1); /* copy \0 */
+ if (!cb(datap, path))
+ break;
+ }
+ closedir(d);
+}
+
+struct lms_parsers_list_by_category_data {
+ const char *category;
+ int (*cb)(void *data, const char *path, const struct lms_parser_info *info);
+ void *data;
+};
+
+static int
+_lms_parsers_list_by_category(void *data, const char *path)
+{
+ struct lms_parsers_list_by_category_data *d = data;
+ struct lms_parser_info *info;
+ int r;
+
+ info = lms_parser_info(path);
+ if (!info)
+ return 1;
+
+ r = 1;
+ if (info->categories) {
+ const char * const *itr;
+ for (itr = info->categories; *itr != NULL; itr++)
+ if (strcmp(d->category, *itr) == 0) {
+ r = d->cb(d->data, path, info);
+ break;
+ }
+ }
+
+ lms_parser_info_free(info);
+
+ return r;
+}
+
+/**
+ * List all known parsers of a given category.
+ *
+ * Since we need information to figure out parser category, these are
+ * passed as argument to callback, but you should NOT modify or reference it
+ * after callback function returns since it will be released after that.
+ *
+ * @param category which category to match.
+ * @param cb function to call for each path found. If it returns 0,
+ * it stops iteraction.
+ * @param data extra data to pass to @a cb on every call.
+ */
+void
+lms_parsers_list_by_category(const char *category, int (*cb)(void *data, const char *path, const struct lms_parser_info *info), const void *data)
+{
+ struct lms_parsers_list_by_category_data d;
+
+ if (!category || !cb)
+ return;
+
+ d.category = category;
+ d.cb = cb;
+ d.data = (void *)data;
+
+ lms_parsers_list(_lms_parsers_list_by_category, &d);
+}
+
+static int
+_lms_string_array_count(const char * const *array, int *size)
+{
+ int count, align_overflow;
+
+ *size = 0;
+ if (!array)
+ return 0;
+
+ count = 0;
+ for (; *array != NULL; array++) {
+ *size += sizeof(char *) + strlen(*array) + 1;
+ count++;
+ }
+ if (count) {
+ /* count NULL terminator */
+ count++;
+ *size += sizeof(char *);
+ }
+
+ align_overflow = *size % sizeof(char *);
+ if (align_overflow)
+ *size += sizeof(char *) - align_overflow;
+
+ return count;
+}
+
+static void
+_lms_string_array_copy(char **dst, const char * const *src, int count)
+{
+ char *d;
+
+ d = (char *)(dst + count);
+
+ for (; count > 1; count--, dst++, src++) {
+ int len;
+
+ len = strlen(*src) + 1;
+ *dst = d;
+ memcpy(*dst, *src, len);
+ d += len;
+ }
+
+ *dst = NULL;
+}
+
+/**
+ * Get parser information.
+ *
+ * Information can be used to let user choose parsers on Graphical User
+ * Interfaces.
+ *
+ * @param so_path full path to module.
+ * @see lms_parser_info_find()
+ */
+struct lms_parser_info *
+lms_parser_info(const char *so_path)
+{
+ const struct lms_plugin_info *(*plugin_info)(void);
+ const struct lms_plugin_info *pinfo;
+ struct lms_parser_info *ret;
+ const char *errmsg;
+ void *dl_handle;
+ int len, name_len, desc_len, ver_len, uri_len;
+ int cats_count, cats_size, authors_count, authors_size;
+
+ if (!so_path)
+ return NULL;
+
+ dl_handle = dlopen(so_path, RTLD_NOW | RTLD_LOCAL);
+ errmsg = dlerror();
+ if (errmsg) {
+ fprintf(stderr, "ERROR: could not dlopen() %s\n", errmsg);
+ return NULL;
+ }
+
+ ret = NULL;
+ plugin_info = dlsym(dl_handle, "lms_plugin_info");
+ errmsg = dlerror();
+ if (errmsg) {
+ fprintf(stderr, "ERROR: could not find plugin info function %s\n",
+ errmsg);
+ goto close_and_exit;
+ }
+
+ if (!plugin_info) {
+ fprintf(stderr, "ERROR: lms_plugin_info is NULL\n");
+ goto close_and_exit;
+ }
+
+ pinfo = plugin_info();
+ if (!pinfo) {
+ fprintf(stderr, "ERROR: lms_plugin_info() returned NULL\n");
+ goto close_and_exit;
+ }
+
+ name_len = pinfo->name ? strlen(pinfo->name) + 1 : 0;
+ desc_len = pinfo->description ? strlen(pinfo->description) + 1 : 0;
+ ver_len = pinfo->version ? strlen(pinfo->version) + 1 : 0;
+ uri_len = pinfo->uri ? strlen(pinfo->uri) + 1 : 0;
+
+ cats_count = _lms_string_array_count(pinfo->categories, &cats_size);
+ authors_count = _lms_string_array_count(pinfo->authors, &authors_size);
+
+ len = name_len + desc_len + ver_len + uri_len + cats_size + authors_size;
+ ret = malloc(sizeof(*ret) + len);
+ if (!ret) {
+ fprintf(stderr, "ERROR: could not alloc %d bytes: %s",
+ sizeof(*ret) + len, strerror(errno));
+ goto close_and_exit;
+ }
+
+ len = 0;
+
+ if (cats_count) {
+ ret->categories = (const char * const *)
+ ((char *)ret + sizeof(*ret) + len);
+ _lms_string_array_copy(
+ (char **)ret->categories, pinfo->categories, cats_count);
+ len += cats_size;
+ } else
+ ret->categories = NULL;
+
+ if (authors_count) {
+ ret->authors = (const char * const *)
+ ((char *)ret + sizeof(*ret) + len);
+ _lms_string_array_copy(
+ (char **)ret->authors, pinfo->authors, authors_count);
+ len += authors_size;
+ } else
+ ret->authors = NULL;
+
+ if (pinfo->name) {
+ ret->name = (char *)ret + sizeof(*ret) + len;
+ memcpy((char *)ret->name, pinfo->name, name_len);
+ len += name_len;
+ } else
+ ret->name = NULL;
+
+ if (pinfo->description) {
+ ret->description = (char *)ret + sizeof(*ret) + len;
+ memcpy((char *)ret->description, pinfo->description, desc_len);
+ len += desc_len;
+ } else
+ ret->description = NULL;
+
+ if (pinfo->version) {
+ ret->version = (char *)ret + sizeof(*ret) + len;
+ memcpy((char *)ret->version, pinfo->version, ver_len);
+ len += ver_len;
+ } else
+ ret->version = NULL;
+
+ if (pinfo->uri) {
+ ret->uri = (char *)ret + sizeof(*ret) + len;
+ memcpy((char *)ret->uri, pinfo->uri, uri_len);
+ len += uri_len;
+ } else
+ ret->uri = NULL;
+
+ close_and_exit:
+ dlclose(dl_handle);
+ return ret;
+}
+
+/**
+ * Find parser by name and get its information.
+ *
+ * Information can be used to let user choose parsers on Graphical User
+ * Interfaces.
+ *
+ * @param name name of .so to find the whole so_path and retrieve information.
+ * @see lms_parser_info()
+ */
+struct lms_parser_info *
+lms_parser_info_find(const char *name)
+{
+ char so_path[PATH_MAX];
+
+ if (!name)
+ return NULL;
+
+ if (!lms_parser_find(so_path, sizeof(so_path), name))
+ return NULL;
+
+ return lms_parser_info(so_path);
+}
+
+/**
+ * Free previously returned information.
+ *
+ * @note it is safe to call with NULL.
+ */
+void
+lms_parser_info_free(struct lms_parser_info *info)
+{
+ free(info);
+}
API void lms_set_commit_interval(lms_t *lms, unsigned int transactions) GNUC_NON_NULL(1);
API void lms_set_progress_callback(lms_t *lms, lms_progress_callback_t cb, const void *data, lms_free_callback_t free_data) GNUC_NON_NULL(1);
+
+ API void lms_parsers_list(int (*cb)(void *data, const char *path), const void *data);
+
+ struct lms_parser_info {
+ const char *name;
+ const char * const *categories;
+ const char *description;
+ const char *version;
+ const char *const *authors;
+ const char *uri;
+ };
+
+ API struct lms_parser_info *lms_parser_info(const char *so_path);
+ API struct lms_parser_info *lms_parser_info_find(const char *name);
+ API void lms_parser_info_free(struct lms_parser_info *info);
+
+ API void lms_parsers_list_by_category(const char *category, int (*cb)(void *data, const char *path, const struct lms_parser_info *info), const void *data);
+
API lms_plugin_t *lms_parser_add(lms_t *lms, const char *so_path) GNUC_NON_NULL(1, 2);
API lms_plugin_t *lms_parser_find_and_add(lms_t *lms, const char *name) GNUC_NON_NULL(1, 2);
API int lms_parser_del(lms_t *lms, lms_plugin_t *handle) GNUC_NON_NULL(1, 2);
/**
- * Copyright (C) 2007 by INdT
+ * Copyright (C) 2008 by ProFUSION
+ * 2007 by INdT
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * @author Gustavo Sverzut Barbieri <gustavo.barbieri@openbossa.org>
+ * @author Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
*/
/**
*
* @code
* struct lms_plugin *lms_plugin_open(void)
+ * const struct lms_plugin_info *lms_plugin_info(void)
* @endcode
*
* where:
* lms_plugin_start_fn_t start;
* lms_plugin_finish_fn_t finish;
* };
+ *
+ *
+ * struct lms_plugin_info {
+ * const char *name;
+ * const char *category;
+ * const char *description;
+ * const char *version;
+ * const char *author;
+ * const char *uri;
+ * };
* @endcode
*
* Users can add their own data to the end of this data
lms_plugin_finish_fn_t finish; /**< finish plugin */
};
+ struct lms_plugin_info {
+ const char *name; /**< plugin name, should be same as lms_plugin */
+ const char * const *categories; /**< NULL-terminated categories array */
+ const char *description; /**< free text description */
+ const char *version; /**< version string */
+ const char * const *authors; /**< NULL-terminated author array */
+ const char *uri; /**< how to find who wrote it (bug reports, etc) */
+ };
+
+
#ifdef __cplusplus
}
#endif
LMS_STATIC_STRING_SIZE(".wmv"),
LMS_STATIC_STRING_SIZE(".asf")
};
+static const char *_cats[] = {
+ "multimedia",
+ "audio",
+ NULL
+};
+static const char *_authors[] = {
+ "Andre Moreira Magalhaes",
+ NULL
+};
/* ASF GUIDs
*
return (struct lms_plugin *)plugin;
}
+
+API struct lms_plugin_info *
+lms_plugin_info(void)
+{
+ static struct lms_plugin_info info = {
+ _name,
+ _cats,
+ "Microsoft WMA, WMV and ASF",
+ PACKAGE_VERSION,
+ _authors,
+ "http://lms.garage.maemo.org"
+ };
+
+ return &info;
+}
static const struct lms_string_size _exts[] = {
LMS_STATIC_STRING_SIZE(".wav")
};
+static const char *_cats[] = {
+ "audio",
+ NULL
+};
+static const char *_authors[] = {
+ "Gustavo Sverzut Barbieri",
+ NULL
+};
struct plugin {
struct lms_plugin plugin;
return (struct lms_plugin *)plugin;
}
+
+API struct lms_plugin_info *
+lms_plugin_info(void)
+{
+ static struct lms_plugin_info info = {
+ _name,
+ _cats,
+ "Accept all audio extensions (just WAV now), "
+ "but no metadata is processed.",
+ PACKAGE_VERSION,
+ _authors,
+ "http://lms.garage.maemo.org"
+ };
+
+ return &info;
+}
#include <stdio.h>
static const char _name[] = "dummy";
+static const char *_cats[] = {
+ "all",
+ "audio",
+ "video",
+ "picture",
+ NULL
+};
+static const char *_authors[] = {
+ "Gustavo Sverzut Barbieri",
+ NULL
+};
struct plugin {
struct lms_plugin plugin;
return (struct lms_plugin *)plugin;
}
+
+API struct lms_plugin_info *
+lms_plugin_info(void)
+{
+ static struct lms_plugin_info info = {
+ _name,
+ _cats,
+ "Accept everything and print out to /tmp/dummy-$UID.log",
+ PACKAGE_VERSION,
+ _authors,
+ "http://lms.garage.maemo.org"
+ };
+
+ return &info;
+}
static const struct lms_string_size _exts[] = {
LMS_STATIC_STRING_SIZE(".flac")
};
+static const char *_cats[] = {
+ "multimedia",
+ "audio",
+ NULL
+};
+static const char *_authors[] = {
+ "Andre Moreira Magalhaes",
+ NULL
+};
static void *
_match(struct plugin *p, const char *path, int len, int base)
return (struct lms_plugin *)plugin;
}
+
+API struct lms_plugin_info *
+lms_plugin_info(void)
+{
+ static struct lms_plugin_info info = {
+ _name,
+ _cats,
+ "FLAC parser",
+ PACKAGE_VERSION,
+ _authors,
+ "http://lms.garage.maemo.org"
+ };
+
+ return &info;
+}
LMS_STATIC_STRING_SIZE(".mp3"),
LMS_STATIC_STRING_SIZE(".aac")
};
+static const char *_cats[] = {
+ "multimedia",
+ "audio",
+ NULL
+};
+static const char *_authors[] = {
+ "Andre Moreira Magalhaes",
+ "Gustavo Sverzut Barbieri",
+ NULL
+};
static unsigned int
_to_uint(const char *data, int data_size)
return (struct lms_plugin *)plugin;
}
+
+API struct lms_plugin_info *
+lms_plugin_info(void)
+{
+ static struct lms_plugin_info info = {
+ _name,
+ _cats,
+ "ID3 v1 and v2 for mp3 files",
+ PACKAGE_VERSION,
+ _authors,
+ "http://lms.garage.maemo.org"
+ };
+
+ return &info;
+}
LMS_STATIC_STRING_SIZE(".jpeg"),
LMS_STATIC_STRING_SIZE(".jpe")
};
+static const char *_cats[] = {
+ "multimedia",
+ "picture",
+ NULL
+};
+static const char *_authors[] = {
+ "Gustavo Sverzut Barbieri",
+ NULL
+};
struct plugin {
struct lms_plugin plugin;
return (struct lms_plugin *)plugin;
}
+
+API struct lms_plugin_info *
+lms_plugin_info(void)
+{
+ static struct lms_plugin_info info = {
+ _name,
+ _cats,
+ "JPEG pictures",
+ PACKAGE_VERSION,
+ _authors,
+ "http://lms.garage.maemo.org"
+ };
+
+ return &info;
+}
static const struct lms_string_size _exts[] = {
LMS_STATIC_STRING_SIZE(".m3u")
};
+static const char *_cats[] = {
+ "multimedia",
+ "audio",
+ "playlist",
+ NULL
+};
+static const char *_authors[] = {
+ "Gustavo Sverzut Barbieri",
+ NULL
+};
struct plugin {
struct lms_plugin plugin;
return (struct lms_plugin *)plugin;
}
+
+API struct lms_plugin_info *
+lms_plugin_info(void)
+{
+ static struct lms_plugin_info info = {
+ _name,
+ _cats,
+ "M3U playlists (aka WinAMP playlists)",
+ PACKAGE_VERSION,
+ _authors,
+ "http://lms.garage.maemo.org"
+ };
+
+ return &info;
+}
#include "config.h"
#endif
+static const char PV[] = PACKAGE_VERSION; /* mp4.h screws PACKAGE_VERSION */
+
#include <lightmediascanner_plugin.h>
#include <lightmediascanner_db.h>
#include <mp4.h>
LMS_STATIC_STRING_SIZE(".qt"),
LMS_STATIC_STRING_SIZE(".3gp")
};
+static const char *_cats[] = {
+ "multimedia",
+ "audio",
+ "video",
+ NULL
+};
+static const char *_authors[] = {
+ "Andre Moreira Magalhaes",
+ NULL
+};
static void *
_match(struct plugin *p, const char *path, int len, int base)
return (struct lms_plugin *)plugin;
}
+
+API struct lms_plugin_info *
+lms_plugin_info(void)
+{
+ static struct lms_plugin_info info = {
+ _name,
+ _cats,
+ "MP4 files (MP4, M4A, MOV, QT, 3GP)",
+ PV,
+ _authors,
+ "http://lms.garage.maemo.org"
+ };
+
+ return &info;
+}
static const struct lms_string_size _exts[] = {
LMS_STATIC_STRING_SIZE(".ogg")
};
+static const char *_cats[] = {
+ "multimedia",
+ "audio",
+ NULL
+};
+static const char *_authors[] = {
+ "Renato Chencarek",
+ "Eduardo Lima (Etrunko)",
+ NULL
+};
struct plugin {
struct lms_plugin plugin;
return (struct lms_plugin *)plugin;
}
+
+API struct lms_plugin_info *
+lms_plugin_info(void)
+{
+ static struct lms_plugin_info info = {
+ _name,
+ _cats,
+ "OGG files",
+ PACKAGE_VERSION,
+ _authors,
+ "http://lms.garage.maemo.org"
+ };
+
+ return &info;
+}
static const struct lms_string_size _exts[] = {
LMS_STATIC_STRING_SIZE(".pls")
};
+static const char *_cats[] = {
+ "multimedia",
+ "audio",
+ "playlist",
+ NULL
+};
+static const char *_authors[] = {
+ "Gustavo Sverzut Barbieri",
+ NULL
+};
struct plugin {
struct lms_plugin plugin;
return (struct lms_plugin *)plugin;
}
+
+API struct lms_plugin_info *
+lms_plugin_info(void)
+{
+ static struct lms_plugin_info info = {
+ _name,
+ _cats,
+ "Playlists (INI-style)",
+ PACKAGE_VERSION,
+ _authors,
+ "http://lms.garage.maemo.org"
+ };
+
+ return &info;
+}
static const struct lms_string_size _exts[] = {
LMS_STATIC_STRING_SIZE(".png")
};
+static const char *_cats[] = {
+ "multimedia",
+ "picture",
+ NULL
+};
+static const char *_authors[] = {
+ "Gustavo Sverzut Barbieri",
+ NULL
+};
struct plugin {
struct lms_plugin plugin;
return (struct lms_plugin *)plugin;
}
+
+API struct lms_plugin_info *
+lms_plugin_info(void)
+{
+ static struct lms_plugin_info info = {
+ _name,
+ _cats,
+ "PNG images",
+ PACKAGE_VERSION,
+ _authors,
+ "http://lms.garage.maemo.org"
+ };
+
+ return &info;
+}
LMS_STATIC_STRING_SIZE(".rmj"),
LMS_STATIC_STRING_SIZE(".rmvb")
};
+static const char *_cats[] = {
+ "multimedia",
+ "audio",
+ "video",
+ NULL
+};
+static const char *_authors[] = {
+ "Andre Moreira Magalhaes",
+ NULL
+};
/*
* A real media file header has the following format:
return (struct lms_plugin *)plugin;
}
+
+API struct lms_plugin_info *
+lms_plugin_info(void)
+{
+ static struct lms_plugin_info info = {
+ _name,
+ _cats,
+ "Real Networks audio and video files (RA, RV, RM, RMJ, RMVB)",
+ PACKAGE_VERSION,
+ _authors,
+ "http://lms.garage.maemo.org"
+ };
+
+ return &info;
+}
LMS_STATIC_STRING_SIZE(".ogm"),
LMS_STATIC_STRING_SIZE(".flv"),
};
+static const char *_cats[] = {
+ "multimedia",
+ "video",
+ NULL
+};
+static const char *_authors[] = {
+ "Gustavo Sverzut Barbieri",
+ NULL
+};
struct plugin {
struct lms_plugin plugin;
return (struct lms_plugin *)plugin;
}
+
+API struct lms_plugin_info *
+lms_plugin_info(void)
+{
+ static struct lms_plugin_info info = {
+ _name,
+ _cats,
+ "Accept all video extensions (AVI, MPG, MPEG, RAM, OGM, FLV), "
+ "but no metadata is processed.",
+ PACKAGE_VERSION,
+ _authors,
+ "http://lms.garage.maemo.org"
+ };
+
+ return &info;
+}