summaryrefslogtreecommitdiffstats
path: root/gst/smpte/gstmask.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2002-10-13 18:46:10 +0000
committerWim Taymans <wim.taymans@gmail.com>2002-10-13 18:46:10 +0000
commit20ef6b8c2c14674ae1afcce162517768e014d25f (patch)
tree051b027954ff62843dcc37e6c5a5efd39dd0acd6 /gst/smpte/gstmask.c
parentcea94d9130ef92d46589ec8b416acdf5905d7a66 (diff)
- reimplemented using organic masks, rendered with gouraud shaded triangles
Original commit message from CVS: - reimplemented using organic masks, rendered with gouraud shaded triangles - implemented more masks - implemented adjustable border
Diffstat (limited to 'gst/smpte/gstmask.c')
-rw-r--r--gst/smpte/gstmask.c35
1 files changed, 13 insertions, 22 deletions
diff --git a/gst/smpte/gstmask.c b/gst/smpte/gstmask.c
index a26d7190..14804524 100644
--- a/gst/smpte/gstmask.c
+++ b/gst/smpte/gstmask.c
@@ -19,6 +19,7 @@
#include "gstmask.h"
+#include "paint.h"
extern void _gst_barboxwipes_register (void);
@@ -73,31 +74,23 @@ gst_mask_factory_new (gint type, gint bpp, gint width, gint height)
definition = gst_mask_find_definition (type);
if (definition) {
- mask = definition->new_func (definition, bpp, width, height);
+ mask = g_new0 (GstMask, 1);
+
+ mask->type = definition->type;
+ mask->bpp = bpp;
+ mask->width = width;
+ mask->height = height;
+ mask->destroy_func = definition->destroy_func;
+ mask->user_data = definition->user_data;
+ mask->data = g_malloc (width * height * sizeof (guint32));
+
+ if (definition->draw_func)
+ definition->draw_func (mask);
}
return mask;
}
-GstMask*
-_gst_mask_default_new (GstMaskDefinition *definition,
- gint bpp, gint width, gint height)
-{
- GstMask *mask;
-
- mask = g_new0 (GstMask, 1);
-
- mask->type = definition->type;
- mask->bpp = bpp;
- mask->width = width;
- mask->height = height;
- mask->update_func = definition->update_func;
- mask->destroy_func = definition->destroy_func;
- mask->data = g_malloc (width * height * (bpp+7)>>3);
-
- return mask;
-}
-
void
_gst_mask_default_destroy (GstMask *mask)
{
@@ -119,6 +112,4 @@ gst_mask_update (GstMask *mask,
{
g_return_if_fail (mask != NULL);
- if (mask->update_func)
- mask->update_func (mask, position, duration);
}