gl/examples: update gtk examples for glupload
authorMatthew Waters <matthew@centricular.com>
Sun, 31 May 2015 05:42:48 +0000 (15:42 +1000)
committerMatthew Waters <matthew@centricular.com>
Sun, 31 May 2015 06:09:34 +0000 (16:09 +1000)
tests/examples/gl/gtk/filternovideooverlay/main.cpp
tests/examples/gl/gtk/filtervideooverlay/main.cpp

index 5b9257c..dc9e04b 100644 (file)
@@ -130,7 +130,7 @@ gint main (gint argc, gchar *argv[])
     gtk_widget_show (window_control);
 
     GstElement* videosrc = gst_element_factory_make ("videotestsrc", "videotestsrc");
-    GstElement* glfilterlaplacian = gst_element_factory_make ("glfilterblur", "glfilterblur");
+    GstElement* upload = gst_element_factory_make ("glupload", "glupload");
     GstElement* glfiltercube = gst_element_factory_make ("glfiltercube", "glfiltercube");
     GstElement* videosink = gst_element_factory_make ("glimagesink", "glimagesink");
 
@@ -138,12 +138,12 @@ gint main (gint argc, gchar *argv[])
                                         "width", G_TYPE_INT, 640,
                                         "height", G_TYPE_INT, 480,
                                         "framerate", GST_TYPE_FRACTION, 25, 1,
-                                        "format", G_TYPE_STRING, "YV12",
+                                        "format", G_TYPE_STRING, "RGBA",
                                         NULL) ;
 
-    gst_bin_add_many (GST_BIN (pipeline), videosrc, glfiltercube, glfilterlaplacian, videosink, NULL);
+    gst_bin_add_many (GST_BIN (pipeline), videosrc, upload, glfiltercube, videosink, NULL);
 
-    gboolean link_ok = gst_element_link_filtered(videosrc, glfiltercube, caps) ;
+    gboolean link_ok = gst_element_link_filtered(videosrc, upload, caps) ;
     gst_caps_unref(caps) ;
     if(!link_ok)
     {
@@ -151,7 +151,7 @@ gint main (gint argc, gchar *argv[])
         return -1;
     }
 
-    if(!gst_element_link_many(glfiltercube, glfilterlaplacian, videosink, NULL))
+    if(!gst_element_link_many(upload, glfiltercube, videosink, NULL))
     {
         g_warning("Failed to link glfiltercube to videosink!\n") ;
         return -1;
index 70b4b00..5a5c9f5 100644 (file)
@@ -220,20 +220,20 @@ gint main (gint argc, gchar *argv[])
     g_signal_connect(G_OBJECT(window), "delete-event", G_CALLBACK(destroy_cb), pipeline);
 
     GstElement* videosrc = gst_element_factory_make ("videotestsrc", "videotestsrc");
+    GstElement* upload = gst_element_factory_make ("glupload", "glupload");
     GstElement* glfiltercube = gst_element_factory_make ("glfiltercube", "glfiltercube");
-    GstElement* glfilterlaplacian = gst_element_factory_make ("glfilterlaplacian", "glfilterlaplacian");
     GstElement* videosink = gst_element_factory_make ("glimagesink", "glimagesink");
 
     GstCaps *caps = gst_caps_new_simple("video/x-raw",
                                         "width", G_TYPE_INT, 640,
                                         "height", G_TYPE_INT, 480,
                                         "framerate", GST_TYPE_FRACTION, 25, 1,
-                                        "format", G_TYPE_STRING, "AYUV",
+                                        "format", G_TYPE_STRING, "RGBA",
                                         NULL) ;
 
-    gst_bin_add_many (GST_BIN (pipeline), videosrc, glfiltercube, glfilterlaplacian, videosink, NULL);
+    gst_bin_add_many (GST_BIN (pipeline), videosrc, upload, glfiltercube, videosink, NULL);
 
-    gboolean link_ok = gst_element_link_filtered(videosrc, glfiltercube, caps) ;
+    gboolean link_ok = gst_element_link_filtered(videosrc, upload, caps) ;
     gst_caps_unref(caps) ;
     if(!link_ok)
     {
@@ -241,7 +241,7 @@ gint main (gint argc, gchar *argv[])
         return -1;
     }
 
-    if(!gst_element_link_many(glfiltercube, glfilterlaplacian, videosink, NULL))
+    if(!gst_element_link_many(upload, glfiltercube, videosink, NULL))
     {
         g_warning("Failed to link glfiltercube to videosink!\n") ;
         return -1;