mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
meta: Initialize all remaining metas in their init function
https://bugzilla.gnome.org/show_bug.cgi?id=764902
This commit is contained in:
parent
ccc068576a
commit
6c020b7f3c
2 changed files with 25 additions and 2 deletions
|
@ -168,6 +168,19 @@ gst_meta_dfbsurface_api_get_type (void)
|
|||
return type;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_meta_dfbsurface_init (GstMetaDfbSurface * meta, gpointer params,
|
||||
GstBuffer * buf)
|
||||
{
|
||||
meta->surface = NULL;
|
||||
meta->width = meta->height = 0;
|
||||
meta->locked = FALSE;
|
||||
meta->pixel_format = 0;
|
||||
meta->dfbvideosink = NULL;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* our metadata */
|
||||
const GstMetaInfo *
|
||||
gst_meta_dfbsurface_get_info (void)
|
||||
|
@ -178,7 +191,8 @@ gst_meta_dfbsurface_get_info (void)
|
|||
const GstMetaInfo *meta =
|
||||
gst_meta_register (gst_meta_dfbsurface_api_get_type (),
|
||||
"GstMetaDfbSurface", sizeof (GstMetaDfbSurface),
|
||||
(GstMetaInitFunction) NULL, (GstMetaFreeFunction) NULL,
|
||||
(GstMetaInitFunction) gst_meta_dfbsurface_init,
|
||||
(GstMetaFreeFunction) NULL,
|
||||
(GstMetaTransformFunction) NULL);
|
||||
g_once_init_leave (&meta_info, meta);
|
||||
}
|
||||
|
|
|
@ -37,6 +37,15 @@
|
|||
GST_DEBUG_CATEGORY_EXTERN (gst_debug_pvrvideosink);
|
||||
#define GST_CAT_DEFAULT gst_debug_pvrvideosink
|
||||
|
||||
static gboolean
|
||||
gst_pvr_meta_init (GstPVRMeta * meta, gpointer params, GstBuffer * buffer)
|
||||
{
|
||||
meta->src_mem = NULL;
|
||||
meta->sink = NULL;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_pvr_meta_free (GstPVRMeta * meta, GstBuffer * buffer)
|
||||
{
|
||||
|
@ -74,7 +83,7 @@ gst_pvr_meta_get_info (void)
|
|||
if (g_once_init_enter (&pvr_meta_info)) {
|
||||
const GstMetaInfo *meta = gst_meta_register ("GstPVRMeta", "GstPVRMeta",
|
||||
sizeof (GstPVRMeta),
|
||||
(GstMetaInitFunction) NULL,
|
||||
(GstMetaInitFunction) gst_pvr_meta_init,
|
||||
(GstMetaFreeFunction) gst_pvr_meta_free,
|
||||
(GstMetaCopyFunction) NULL, (GstMetaTransformFunction) NULL);
|
||||
g_once_init_leave (&pvr_meta_info, meta);
|
||||
|
|
Loading…
Reference in a new issue