[146/906] remove filteredge

This commit is contained in:
Julien Isorce 2008-08-11 15:40:39 +02:00 committed by Tim-Philipp Müller
parent ce17f1a2db
commit 4629bf1bc5

View file

@ -1,4 +1,4 @@
/*
/*
* GStreamer
* Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
* Copyright (C) 2008 Filippo Argiolas <filippo.argiolas@gmail.com>
@ -129,7 +129,7 @@ gst_gl_filter_set_property (GObject * object, guint prop_id,
{
//GstGLFilter *filter = GST_GL_FILTER (object);
switch (prop_id)
switch (prop_id)
{
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@ -143,7 +143,7 @@ gst_gl_filter_get_property (GObject * object, guint prop_id,
{
//GstGLFilter *filter = GST_GL_FILTER (object);
switch (prop_id)
switch (prop_id)
{
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@ -155,17 +155,17 @@ static void
gst_gl_filter_reset (GstGLFilter* filter)
{
GstGLFilterClass* filter_class = GST_GL_FILTER_GET_CLASS (filter);
if (filter_class->onReset)
filter_class->onReset (filter);
if (filter->display)
if (filter->display)
{
if (filter_class->display_reset_cb != NULL) {
gst_gl_display_thread_add (filter->display, gst_gl_filter_stop_gl, filter);
}
//blocking call, delete the FBO
gst_gl_display_del_fbo (filter->display, filter->fbo,
gst_gl_display_del_fbo (filter->display, filter->fbo,
filter->depthbuffer);
g_object_unref (filter->display);
filter->display = NULL;
@ -197,7 +197,7 @@ gst_gl_filter_start_gl (GstGLDisplay *display, gpointer data)
{
GstGLFilter *filter = GST_GL_FILTER (data);
GstGLFilterClass *filter_class = GST_GL_FILTER_GET_CLASS (filter);
filter_class->display_init_cb (filter);
}
@ -206,7 +206,7 @@ gst_gl_filter_stop_gl (GstGLDisplay *display, gpointer data)
{
GstGLFilter *filter = GST_GL_FILTER (data);
GstGLFilterClass *filter_class = GST_GL_FILTER_GET_CLASS (filter);
filter_class->display_reset_cb (filter);
}
@ -227,12 +227,12 @@ gst_gl_filter_transform_caps (GstBaseTransform* bt,
gst_caps_merge_structure (ret, gst_structure_copy (structure));
if ((par = gst_structure_get_value (structure, "pixel-aspect-ratio")))
if ((par = gst_structure_get_value (structure, "pixel-aspect-ratio")))
{
gst_structure_set (structure,
"pixel-aspect-ratio", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
gst_caps_merge_structure (ret, structure);
}
}
else
gst_structure_free (structure);
@ -251,7 +251,7 @@ gst_gl_filter_get_unit_size (GstBaseTransform* trans, GstCaps* caps,
gint height = 0;
ret = gst_gl_buffer_parse_caps (caps, &width, &height);
if (ret)
if (ret)
*size = gst_gl_buffer_get_size (width, height);
return TRUE;
@ -270,7 +270,7 @@ gst_gl_filter_prepare_output_buffer (GstBaseTransform* trans,
if (filter->display == NULL)
{
GstGLFilterClass* filter_class = GST_GL_FILTER_GET_CLASS (filter);
filter->display = g_object_ref (gl_inbuf->display);
//blocking call, generate a FBO
@ -310,13 +310,13 @@ gst_gl_filter_set_caps (GstBaseTransform* bt, GstCaps* incaps,
if (filter_class->set_caps)
filter_class->set_caps (filter, incaps, outcaps);
if (!ret)
if (!ret)
{
GST_DEBUG ("bad caps");
return FALSE;
}
GST_ERROR ("set_caps %d %d", filter->width, filter->height);
GST_DEBUG ("set_caps %d %d", filter->width, filter->height);
return ret;
}
@ -350,13 +350,13 @@ gst_gl_filter_do_transform (GstGLFilter* filter,
/* convenience functions to simplify filter development */
void
gst_gl_filter_render_to_target (GstGLFilter *filter,
gst_gl_filter_render_to_target (GstGLFilter *filter,
GLuint input, GLuint target,
GLCB func, gpointer data)
{
gst_gl_display_use_fbo (filter->display, filter->width, filter->height,
filter->fbo, filter->depthbuffer, target,
func,
gst_gl_display_use_fbo (filter->display, filter->width, filter->height,
filter->fbo, filter->depthbuffer, target,
func,
filter->width, filter->height, input,
0, filter->width, 0, filter->height,
GST_GL_DISPLAY_PROJECTION_ORTHO2D,