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);
}
/* 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 */
#undef GstTypeFindPeekFunction
#define GstTypeFindPeekFunction GstCompatTypeFindPeekFunction

View file

@ -49,14 +49,6 @@
GST_DEBUG_CATEGORY_STATIC(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 */
#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->finish = GST_DEBUG_FUNCPTR(gst_vaapidecode_finish);
gst_element_class_set_details_simple(
element_class,
gst_vaapidecode_details.longname,
gst_vaapidecode_details.klass,
gst_vaapidecode_details.description,
gst_vaapidecode_details.author
);
gst_element_class_set_static_metadata(element_class,
"VA-API decoder",
"Codec/Decoder/Video",
GST_PLUGIN_DESC,
"Gwenole Beauchesne <gwenole.beauchesne@intel.com>");
/* sink pad */
pad_template = gst_static_pad_template_get(&gst_vaapidecode_sink_factory);

View file

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

View file

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

View file

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

View file

@ -44,14 +44,6 @@
GST_DEBUG_CATEGORY_STATIC(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 */
static const char gst_vaapiupload_yuv_caps_str[] =
"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->prepare_output_buffer = gst_vaapiupload_prepare_output_buffer;
gst_element_class_set_details_simple(
element_class,
gst_vaapiupload_details.longname,
gst_vaapiupload_details.klass,
gst_vaapiupload_details.description,
gst_vaapiupload_details.author
);
gst_element_class_set_static_metadata(element_class,
"VA-API colorspace converter",
"Filter/Converter/Video",
GST_PLUGIN_DESC,
"Gwenole Beauchesne <gwenole.beauchesne@intel.com>");
/* sink pad */
pad_template = gst_static_pad_template_get(&gst_vaapiupload_sink_factory);