plugins: fix description for gst-inspect.

Fix the name of the plug-in element reported to gst-inspect-1.0. i.e. we
need an explicit definition for GStreamer >= 1.0 because the GST_PLUGIN_DEFINE
incorrectly uses #name for creating the plug-in name, instead of using macro
expansion (and let further expansion of macros) through e.g. G_STRINGIFY().
This commit is contained in:
Gwenole Beauchesne 2013-04-12 13:44:52 +02:00
parent be210a4722
commit 9b981dd244
2 changed files with 15 additions and 15 deletions

View file

@ -64,9 +64,6 @@ typedef void (*GstCompatTypeFindSuggestFunction)(gpointer, guint, GstCaps *);
#define GST_PAD_QUERY_FUNCTION_CALL(func, pad, parent, query) \
(func)(pad, parent, query)
/* GstPlugin */
#define GST_PLUGIN_DESC_NAME(NAME) NAME
/* Misc helpers */
#define GST_MAKE_FORMAT_STRING(FORMAT) \
"format=(string)" G_STRINGIFY(FORMAT)
@ -262,9 +259,6 @@ typedef void (*GstCompatTypeFindSuggestFunction)(gpointer, guint, const GstCaps
#define GST_PAD_QUERY_FUNCTION_CALL(func, pad, parent, query) \
(func)(pad, query)
/* GstPlugin */
#define GST_PLUGIN_DESC_NAME(NAME) G_STRINGIFY(NAME)
/* Misc helpers */
#define GST_MAKE_FORMAT_STRING(FORMAT) \
"format=(fourcc)" G_STRINGIFY(FORMAT)

View file

@ -29,6 +29,10 @@
#include "gstvaapipostproc.h"
#include "gstvaapisink.h"
#define PLUGIN_NAME "vaapi"
#define PLUGIN_DESC "VA-API based elements"
#define PLUGIN_LICENSE "LGPL"
static gboolean
plugin_init (GstPlugin *plugin)
{
@ -54,12 +58,14 @@ plugin_init (GstPlugin *plugin)
return TRUE;
}
GST_PLUGIN_DEFINE(
GST_VERSION_MAJOR, GST_VERSION_MINOR,
GST_PLUGIN_DESC_NAME(vaapi),
"VA-API based elements",
plugin_init,
PACKAGE_VERSION,
"LGPL",
PACKAGE,
PACKAGE_BUGREPORT)
#if GST_CHECK_VERSION(1,0,0)
/* XXX: use PLUGIN_NAME when GST_PLUGIN_DEFINE is fixed to use
G_STRINGIFY() for name argument, instead of plain #name */
GST_PLUGIN_DEFINE(GST_VERSION_MAJOR, GST_VERSION_MINOR,
vaapi, PLUGIN_DESC, plugin_init,
PACKAGE_VERSION, PLUGIN_LICENSE, PACKAGE, PACKAGE_BUGREPORT)
#else
GST_PLUGIN_DEFINE(GST_VERSION_MAJOR, GST_VERSION_MINOR,
PLUGIN_NAME, PLUGIN_DESC, plugin_init,
PACKAGE_VERSION, PLUGIN_LICENSE, PACKAGE, PACKAGE_BUGREPORT)
#endif