summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthew Waters <ystreet00@gmail.com>2014-06-12 12:49:42 +1000
committerMatthew Waters <ystreet00@gmail.com>2014-06-12 12:49:42 +1000
commitd7f8cc9a78eff6e0e2cd6b5f050e4e630b913d5b (patch)
tree271c9b42ed2f9f51b55d957ce84f0c29a60f6c0f /tests
parent9e662b8229ea0ac6ae069ce259d6c603008502f9 (diff)
downloadgstreamer-plugins-bad-d7f8cc9a78eff6e0e2cd6b5f050e4e630b913d5b.tar.gz
glfilterapp: remove the reshape/draw properties
The reshape property was never used. Replace the draw property with a signal. Based on patch by Mathieu Duponchelle <mathieu.duponchelle@epitech.eu> https://bugzilla.gnome.org/show_bug.cgi?id=704507
Diffstat (limited to 'tests')
-rw-r--r--tests/examples/gl/generic/recordgraphic/main.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/tests/examples/gl/generic/recordgraphic/main.cpp b/tests/examples/gl/generic/recordgraphic/main.cpp
index 7771ac2b4..dbfffc1d8 100644
--- a/tests/examples/gl/generic/recordgraphic/main.cpp
+++ b/tests/examples/gl/generic/recordgraphic/main.cpp
@@ -65,19 +65,8 @@ static gboolean bus_call (GstBus *bus, GstMessage *msg, gpointer data)
return TRUE;
}
-//client reshape callback
-static void reshapeCallback (GLuint width, GLuint height)
-{
- glViewport(0, 0, width, height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- gluPerspective(45, (gfloat)width/(gfloat)height, 0.1, 100);
- glMatrixMode(GL_MODELVIEW);
-}
-
-
//client draw callback
-static gboolean drawCallback (GLuint width, GLuint height, GLuint texture, gpointer data)
+static gboolean drawCallback (void *filter, GLuint width, GLuint height, GLuint texture, gpointer data)
{
static GLfloat xrot = 0;
static GLfloat yrot = 0;
@@ -215,9 +204,7 @@ gint main (gint argc, gchar *argv[])
/* configure elements */
g_object_set(G_OBJECT(videosrc), "num-buffers", 400, NULL);
- g_object_set(G_OBJECT(glfilterapp), "client-reshape-callback", reshapeCallback, NULL);
- g_object_set(G_OBJECT(glfilterapp), "client-draw-callback", drawCallback, NULL);
- g_object_set(G_OBJECT(glfilterapp), "client-data", NULL, NULL);
+ g_signal_connect(G_OBJECT(glfilterapp), "client-draw", G_CALLBACK (drawCallback), NULL);
g_object_set(G_OBJECT(filesink), "location", "record.avi", NULL);
/* add elements */