GST_DEBUG_CATEGORY (goom_debug);
#define GST_CAT_DEFAULT goom_debug
+#define DEFAULT_WIDTH 320
+#define DEFAULT_HEIGHT 240
+
/* signals and args */
enum
{
static void
gst_goom_init (GstGoom * goom)
{
- goom->width = -1;
- goom->height = -1;
+ goom->width = DEFAULT_WIDTH;
+ goom->height = DEFAULT_HEIGHT;
goom->channels = 0;
+
+ goom->plugin = goom_init (goom->width, goom->height);
}
static void
{
GstGoom *goom = GST_GOOM (base);
- if (!goom->plugin ||
- goom->width != GST_VIDEO_INFO_WIDTH (&base->vinfo) ||
- goom->height != GST_VIDEO_INFO_HEIGHT (&base->vinfo)) {
- goom->width = GST_VIDEO_INFO_WIDTH (&base->vinfo);
- goom->height = GST_VIDEO_INFO_HEIGHT (&base->vinfo);
- if (goom->plugin)
- goom_close (goom->plugin);
- goom->plugin = goom_init (goom->width, goom->height);
- }
+ goom->width = GST_VIDEO_INFO_WIDTH (&base->vinfo);
+ goom->height = GST_VIDEO_INFO_HEIGHT (&base->vinfo);
return TRUE;
}
gint16 *adata;
gint i;
- if (!goom->plugin)
- return FALSE;
-
/* get next GOOM_SAMPLES, we have at least this amount of samples */
gst_buffer_map (audio, &amap, GST_MAP_READ);
adata = (gint16 *) amap.data;