uvch264: Port test to gstreamer 1.0
authorSjoerd Simons <sjoerd@greynoise.nl>
Fri, 18 Jan 2013 22:14:27 +0000 (23:14 +0100)
committerSjoerd Simons <sjoerd@luon.net>
Mon, 11 Feb 2013 21:04:59 +0000 (22:04 +0100)
tests/examples/uvch264/Makefile.am
tests/examples/uvch264/test-uvch264.c
tests/examples/uvch264/window.glade

index e02b888..43d0c54 100644 (file)
@@ -20,7 +20,6 @@ test_uvch264_LDADD   = \
         $(GST_PLUGINS_BASE_LIBS) \
        $(GST_VIDEO_LIBS) \
         $(GST_LIBS) \
-        -lgstinterfaces-@GST_MAJORMINOR@ \
        $(GTK_LIBS) \
        $(GMODULE_EXPORT_LIBS)
 
index 78d8ac1..4541b86 100644 (file)
@@ -1,7 +1,6 @@
 #include <gst/gst.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
-#include <gst/interfaces/xoverlay.h>
 #include <gst/video/video.h>
 
 #define WINDOW_GLADE "window.glade"
@@ -247,8 +246,7 @@ set_caps (Main * self, gboolean send_event)
 
   if (send_event) {
     gst_element_send_event (GST_ELEMENT (self->src),
-        gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
-            gst_structure_new ("renegotiate", NULL)));
+        gst_event_new_reconfigure ());
   }
 
 end:
@@ -357,12 +355,14 @@ _bus_callback (GstBus * bus, GstMessage * message, gpointer user_data)
   GstObject *source = NULL;
 
   if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT &&
-      gst_structure_has_name (s, "prepare-xwindow-id")) {
+      gst_structure_has_name (s, "prepare-window-handle")) {
     source = GST_MESSAGE_SRC (message);
     if (!g_strcmp0 (gst_object_get_name (source), "h264_sink"))
-      gst_x_overlay_set_window_handle (GST_X_OVERLAY (source), h264_xid);
+      gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (source),
+          h264_xid);
     else
-      gst_x_overlay_set_window_handle (GST_X_OVERLAY (source), preview_xid);
+      gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (source),
+          preview_xid);
   }
 
   return TRUE;
@@ -531,7 +531,7 @@ main (int argc, char *argv[])
 
 
   self.bin = gst_parse_launch ("uvch264_src name=src src.vidsrc ! queue ! "
-      "capsfilter name=vid_cf ! identity name=identity ! ffdec_h264 ! "
+      "capsfilter name=vid_cf ! identity name=identity ! decodebin ! "
       "xvimagesink name=h264_sink async=false "
       "src.vfsrc ! queue ! capsfilter name=vf_cf ! "
       "xvimagesink name=preview_sink async=false", NULL);
index 8b7624a..6b28d7e 100644 (file)
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="invisible_char">●</property>
-                <property name="text" translatable="yes">video/x-raw-yuv,width=320,height=240,format=(fourcc)YUY2,framerate=15/1</property>
+                <property name="text" translatable="yes">video/x-raw,width=320,height=240,format=(fourcc)YUY2,framerate=15/1</property>
               </object>
               <packing>
                 <property name="expand">False</property>