plugins: use modern GstElement metadata information.

Use gst_element_class_set_static_metadata() from GStreamer 1.0, which
basically is the same as gst_element_class_set_details_simple() in
GStreamer 0.10 context.
This commit is contained in:
Gwenole Beauchesne 2013-03-20 18:41:40 +01:00
parent 7fd648b8b0
commit 2dcc9f19da
6 changed files with 37 additions and 75 deletions

View file

@ -50,6 +50,18 @@ gst_compat_video_overlay_rectangle_get_pixels_unscaled_raw(
&width, &height, &stride, flags); &width, &height, &stride, flags);
} }
/* GstElement */
#undef gst_element_class_set_static_metadata
#define gst_element_class_set_static_metadata(klass, name, path, desc, author) \
gst_compat_element_class_set_static_metadata(klass, name, path, desc, author)
static inline void
gst_compat_element_class_set_static_metadata(GstElementClass *klass,
const gchar *name, const char *path, const gchar *desc, const gchar *author)
{
gst_element_class_set_details_simple(klass, name, path, desc, author);
}
/* GstTypeFind */ /* GstTypeFind */
#undef GstTypeFindPeekFunction #undef GstTypeFindPeekFunction
#define GstTypeFindPeekFunction GstCompatTypeFindPeekFunction #define GstTypeFindPeekFunction GstCompatTypeFindPeekFunction

View file

@ -49,14 +49,6 @@
GST_DEBUG_CATEGORY_STATIC(gst_debug_vaapidecode); GST_DEBUG_CATEGORY_STATIC(gst_debug_vaapidecode);
#define GST_CAT_DEFAULT gst_debug_vaapidecode #define GST_CAT_DEFAULT gst_debug_vaapidecode
/* ElementFactory information */
static const GstElementDetails gst_vaapidecode_details =
GST_ELEMENT_DETAILS(
"VA-API decoder",
"Codec/Decoder/Video",
GST_PLUGIN_DESC,
"Gwenole Beauchesne <gwenole.beauchesne@intel.com>");
/* Default templates */ /* Default templates */
#define GST_CAPS_CODEC(CODEC) CODEC "; " #define GST_CAPS_CODEC(CODEC) CODEC "; "
@ -563,13 +555,11 @@ gst_vaapidecode_class_init(GstVaapiDecodeClass *klass)
vdec_class->handle_frame = GST_DEBUG_FUNCPTR(gst_vaapidecode_handle_frame); vdec_class->handle_frame = GST_DEBUG_FUNCPTR(gst_vaapidecode_handle_frame);
vdec_class->finish = GST_DEBUG_FUNCPTR(gst_vaapidecode_finish); vdec_class->finish = GST_DEBUG_FUNCPTR(gst_vaapidecode_finish);
gst_element_class_set_details_simple( gst_element_class_set_static_metadata(element_class,
element_class, "VA-API decoder",
gst_vaapidecode_details.longname, "Codec/Decoder/Video",
gst_vaapidecode_details.klass, GST_PLUGIN_DESC,
gst_vaapidecode_details.description, "Gwenole Beauchesne <gwenole.beauchesne@intel.com>");
gst_vaapidecode_details.author
);
/* sink pad */ /* sink pad */
pad_template = gst_static_pad_template_get(&gst_vaapidecode_sink_factory); pad_template = gst_static_pad_template_get(&gst_vaapidecode_sink_factory);

View file

@ -43,14 +43,6 @@
GST_DEBUG_CATEGORY_STATIC(gst_debug_vaapidownload); GST_DEBUG_CATEGORY_STATIC(gst_debug_vaapidownload);
#define GST_CAT_DEFAULT gst_debug_vaapidownload #define GST_CAT_DEFAULT gst_debug_vaapidownload
/* ElementFactory information */
static const GstElementDetails gst_vaapidownload_details =
GST_ELEMENT_DETAILS(
"VA-API colorspace converter",
"Filter/Converter/Video",
GST_PLUGIN_DESC,
"Gwenole Beauchesne <gwenole.beauchesne@intel.com>");
/* Default templates */ /* Default templates */
static const char gst_vaapidownload_yuv_caps_str[] = static const char gst_vaapidownload_yuv_caps_str[] =
"video/x-raw-yuv, " "video/x-raw-yuv, "
@ -237,13 +229,11 @@ gst_vaapidownload_class_init(GstVaapiDownloadClass *klass)
trans_class->transform_size = gst_vaapidownload_transform_size; trans_class->transform_size = gst_vaapidownload_transform_size;
trans_class->set_caps = gst_vaapidownload_set_caps; trans_class->set_caps = gst_vaapidownload_set_caps;
gst_element_class_set_details_simple( gst_element_class_set_static_metadata(element_class,
element_class, "VA-API colorspace converter",
gst_vaapidownload_details.longname, "Filter/Converter/Video",
gst_vaapidownload_details.klass, GST_PLUGIN_DESC,
gst_vaapidownload_details.description, "Gwenole Beauchesne <gwenole.beauchesne@intel.com>");
gst_vaapidownload_details.author
);
/* sink pad */ /* sink pad */
pad_template = gst_static_pad_template_get(&gst_vaapidownload_sink_factory); pad_template = gst_static_pad_template_get(&gst_vaapidownload_sink_factory);

View file

@ -43,14 +43,6 @@
GST_DEBUG_CATEGORY_STATIC(gst_debug_vaapipostproc); GST_DEBUG_CATEGORY_STATIC(gst_debug_vaapipostproc);
#define GST_CAT_DEFAULT gst_debug_vaapipostproc #define GST_CAT_DEFAULT gst_debug_vaapipostproc
/* ElementFactory information */
static const GstElementDetails gst_vaapipostproc_details =
GST_ELEMENT_DETAILS(
"VA-API video postprocessing",
"Filter/Converter/Video",
GST_PLUGIN_DESC,
"Gwenole Beauchesne <gwenole.beauchesne@intel.com>");
/* Default templates */ /* Default templates */
static const char gst_vaapipostproc_sink_caps_str[] = static const char gst_vaapipostproc_sink_caps_str[] =
GST_VAAPI_SURFACE_CAPS ", " GST_VAAPI_SURFACE_CAPS ", "
@ -651,13 +643,11 @@ gst_vaapipostproc_class_init(GstVaapiPostprocClass *klass)
element_class->change_state = gst_vaapipostproc_change_state; element_class->change_state = gst_vaapipostproc_change_state;
gst_element_class_set_details_simple( gst_element_class_set_static_metadata(element_class,
element_class, "VA-API video postprocessing",
gst_vaapipostproc_details.longname, "Filter/Converter/Video",
gst_vaapipostproc_details.klass, GST_PLUGIN_DESC,
gst_vaapipostproc_details.description, "Gwenole Beauchesne <gwenole.beauchesne@intel.com>");
gst_vaapipostproc_details.author
);
/* sink pad */ /* sink pad */
pad_template = gst_static_pad_template_get(&gst_vaapipostproc_sink_factory); pad_template = gst_static_pad_template_get(&gst_vaapipostproc_sink_factory);

View file

@ -63,14 +63,6 @@
GST_DEBUG_CATEGORY_STATIC(gst_debug_vaapisink); GST_DEBUG_CATEGORY_STATIC(gst_debug_vaapisink);
#define GST_CAT_DEFAULT gst_debug_vaapisink #define GST_CAT_DEFAULT gst_debug_vaapisink
/* ElementFactory information */
static const GstElementDetails gst_vaapisink_details =
GST_ELEMENT_DETAILS(
"VA-API sink",
"Sink/Video",
GST_PLUGIN_DESC,
"Gwenole Beauchesne <gwenole.beauchesne@intel.com>");
/* Default template */ /* Default template */
static const char gst_vaapisink_sink_caps_str[] = static const char gst_vaapisink_sink_caps_str[] =
"video/x-raw-yuv, " "video/x-raw-yuv, "
@ -1069,13 +1061,11 @@ gst_vaapisink_class_init(GstVaapiSinkClass *klass)
basesink_class->query = gst_vaapisink_query; basesink_class->query = gst_vaapisink_query;
basesink_class->buffer_alloc = gst_vaapisink_buffer_alloc; basesink_class->buffer_alloc = gst_vaapisink_buffer_alloc;
gst_element_class_set_details_simple( gst_element_class_set_static_metadata(element_class,
element_class, "VA-API sink",
gst_vaapisink_details.longname, "Sink/Video",
gst_vaapisink_details.klass, GST_PLUGIN_DESC,
gst_vaapisink_details.description, "Gwenole Beauchesne <gwenole.beauchesne@intel.com>");
gst_vaapisink_details.author
);
pad_template = gst_static_pad_template_get(&gst_vaapisink_sink_factory); pad_template = gst_static_pad_template_get(&gst_vaapisink_sink_factory);
gst_element_class_add_pad_template(element_class, pad_template); gst_element_class_add_pad_template(element_class, pad_template);

View file

@ -44,14 +44,6 @@
GST_DEBUG_CATEGORY_STATIC(gst_debug_vaapiupload); GST_DEBUG_CATEGORY_STATIC(gst_debug_vaapiupload);
#define GST_CAT_DEFAULT gst_debug_vaapiupload #define GST_CAT_DEFAULT gst_debug_vaapiupload
/* ElementFactory information */
static const GstElementDetails gst_vaapiupload_details =
GST_ELEMENT_DETAILS(
"VA-API colorspace converter",
"Filter/Converter/Video",
GST_PLUGIN_DESC,
"Gwenole Beauchesne <gwenole.beauchesne@intel.com>");
/* Default templates */ /* Default templates */
static const char gst_vaapiupload_yuv_caps_str[] = static const char gst_vaapiupload_yuv_caps_str[] =
"video/x-raw-yuv, " "video/x-raw-yuv, "
@ -215,13 +207,11 @@ gst_vaapiupload_class_init(GstVaapiUploadClass *klass)
trans_class->get_unit_size = gst_vaapiupload_get_unit_size; trans_class->get_unit_size = gst_vaapiupload_get_unit_size;
trans_class->prepare_output_buffer = gst_vaapiupload_prepare_output_buffer; trans_class->prepare_output_buffer = gst_vaapiupload_prepare_output_buffer;
gst_element_class_set_details_simple( gst_element_class_set_static_metadata(element_class,
element_class, "VA-API colorspace converter",
gst_vaapiupload_details.longname, "Filter/Converter/Video",
gst_vaapiupload_details.klass, GST_PLUGIN_DESC,
gst_vaapiupload_details.description, "Gwenole Beauchesne <gwenole.beauchesne@intel.com>");
gst_vaapiupload_details.author
);
/* sink pad */ /* sink pad */
pad_template = gst_static_pad_template_get(&gst_vaapiupload_sink_factory); pad_template = gst_static_pad_template_get(&gst_vaapiupload_sink_factory);