+2008-04-22 Jan Schmidt <jan.schmidt@sun.com>
+
+ * gst/goom/config_param.c: (goom_plugin_parameters_free):
+ * gst/goom/convolve_fx.c: (convolve_init), (convolve_free):
+ * gst/goom/filters.c: (zoomFilterVisualFXWrapper_free):
+ * gst/goom/flying_stars_fx.c: (fs_free):
+ * gst/goom/goom_config_param.h:
+ * gst/goom/goom_core.c: (goom_init), (goom_close):
+ * gst/goom/goom_plugin_info.h:
+ * gst/goom/gstgoom.c: (gst_goom_finalize):
+ * gst/goom/lines.c: (goom_lines_free):
+ * gst/goom/plugin_info.c: (plugin_info_init), (plugin_info_free):
+ * gst/goom/surf3d.c: (grid3d_free):
+ * gst/goom/surf3d.h:
+ * gst/goom/tentacle3d.c: (tentacle_free):
+ Free a bunch of stuff, and initialise things to fix leaks
+ and valgrind warnings in the testsuite.
+
+ Fixes: #529268
+
2008-04-21 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_init), (request_pt_map),
return p;
}
+void
+goom_plugin_parameters_free (PluginParameters * p)
+{
+ free (p->params);
+}
+
/*---------------------------------------------------------------------------*/
void
data->params.params[3] = &data->factor_p;
data->params.params[4] = 0;
+ data->h_height = 0;
+
/* init rotozoom tables */
compute_tables (_this, info);
data->theta = 0;
static void
convolve_free (VisualFX * _this)
{
+ ConvData *data = (ConvData *) _this->fx_data;
+
+ goom_plugin_parameters_free (&data->params);
+
free (_this->fx_data);
}
static void
zoomFilterVisualFXWrapper_free (struct _VISUAL_FX *_this)
{
+ ZoomFilterFXWrapperData *data = (ZoomFilterFXWrapperData *) _this->fx_data;
+
+ if (data->freebrutT)
+ free (data->freebrutT);
+ if (data->freebrutS)
+ free (data->freebrutS);
+ if (data->freebrutD)
+ free (data->freebrutD);
+ if (data->firedec)
+ free (data->firedec);
+
+ goom_plugin_parameters_free (_this->params);
+
free (_this->fx_data);
}
static void
fs_free (VisualFX * _this)
{
+ FSData *data = (FSData *) _this->fx_data;
+
+ goom_plugin_parameters_free (&data->params);
+
+ free (data->stars);
free (_this->fx_data);
}
} PluginParameters;
PluginParameters goom_plugin_parameters(const char *name, int nb);
+void goom_plugin_parameters_free(PluginParameters *p);
#define secure_param goom_secure_param
#define secure_f_param goom_secure_f_param
plugin_info_init (goomInfo, 4);
+ goomInfo->screen.width = resx;
+ goomInfo->screen.height = resy;
+ goomInfo->screen.size = resx * resy;
+
+ init_buffers (goomInfo, goomInfo->screen.size);
+ goomInfo->gRandom = goom_random_init ((uintptr_t) goomInfo->pixel);
+
+ goomInfo->cycle = 0;
+
goomInfo->star_fx = flying_star_create ();
goomInfo->star_fx.init (&goomInfo->star_fx, goomInfo);
plugin_info_add_visual (goomInfo, 2, &goomInfo->star_fx);
plugin_info_add_visual (goomInfo, 3, &goomInfo->convolve_fx);
- goomInfo->screen.width = resx;
- goomInfo->screen.height = resy;
- goomInfo->screen.size = resx * resy;
-
- init_buffers (goomInfo, goomInfo->screen.size);
- goomInfo->gRandom = goom_random_init ((uintptr_t) goomInfo->pixel);
-
- goomInfo->cycle = 0;
-
goomInfo->ifs_fx = ifs_visualfx_create ();
goomInfo->ifs_fx.init (&goomInfo->ifs_fx, goomInfo);
goomInfo->tentacles_fx.free (&goomInfo->tentacles_fx);
goomInfo->zoomFilter_fx.free (&goomInfo->zoomFilter_fx);
+ plugin_info_free (goomInfo);
free (goomInfo);
}
};
void plugin_info_init(PluginInfo *p, int nbVisual);
+void plugin_info_free(PluginInfo *p);
/* i = [0..p->nbVisual-1] */
void plugin_info_add_visual(PluginInfo *p, int i, VisualFX *visual);
GstGoom *goom = GST_GOOM (object);
goom_close (goom->plugin);
+ goom->plugin = NULL;
g_object_unref (goom->adapter);
void
goom_lines_free (GMLine ** l)
{
+ free ((*l)->points2);
free ((*l)->points);
free (*l);
l = NULL;
p.sound.prov_max = 0;
p.sound.goom_limit = 1;
p.sound.allTimesMax = 1;
+ p.sound.timeSinceLastGoom = 1;
+ p.sound.timeSinceLastBigGoom = 1;
+ p.sound.cycle = 0;
p.sound.volume_p = secure_f_feedback ("Sound Volume");
p.sound.accel_p = secure_f_feedback ("Sound Acceleration");
p.sound.params = plugin_parameters ("Sound", 11);
p.nbParams = 0;
+ p.params = NULL;
p.nbVisuals = nbVisuals;
p.visuals = (VisualFX **) malloc (sizeof (VisualFX *) * nbVisuals);
}
}
}
+
+void
+plugin_info_free (PluginInfo * p)
+{
+ goom_plugin_parameters_free (&p->sound.params);
+
+ if (p->params)
+ free (p->params);
+ free (p->visuals);
+}
}
void
+grid3d_free (grid3d * g)
+{
+ surf3d *s = &(g->surf);
+
+ free (s->vertex);
+ free (s->svertex);
+
+ free (g);
+}
+
+void
grid3d_draw (PluginInfo * plug, grid3d * g, int color, int colorlow,
int dist, Pixel * buf, Pixel * back, int W, int H)
{
/* works on grid3d */
grid3d *grid3d_new (int sizex, int defx, int sizez, int defz, v3d center);
+void grid3d_free (grid3d *g);
void grid3d_update (grid3d *s, float angle, float *vals, float dist);
/* low level */
static void
tentacle_free (TentacleFXData * data)
{
- /* TODO : un vrai FREE GRID!! */
+ int tmp;
+
+ /* FREE GRID */
+ for (tmp = 0; tmp < nbgrid; tmp++)
+ grid3d_free (data->grille[tmp]);
free (data->vals);
+
+ goom_plugin_parameters_free (&data->params);
}
static void