tests: update for GstXOverlay => GstVideoOverlay
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 8 Aug 2011 12:55:21 +0000 (13:55 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 8 Aug 2011 13:12:15 +0000 (14:12 +0100)
15 files changed:
tests/check/libs/gstlibscpp.cc
tests/check/libs/libsabi.c
tests/examples/overlay/.gitignore
tests/examples/overlay/Makefile.am
tests/examples/overlay/gtk-videooverlay.c [moved from tests/examples/overlay/gtk-xoverlay.c with 95% similarity]
tests/examples/overlay/qt-videooverlay.cpp [moved from tests/examples/overlay/qt-xoverlay.cpp with 96% similarity]
tests/examples/overlay/qtgv-videooverlay.cpp [moved from tests/examples/overlay/qtgv-xoverlay.cpp with 92% similarity]
tests/examples/overlay/qtgv-videooverlay.h [moved from tests/examples/overlay/qtgv-xoverlay.h with 100% similarity]
tests/examples/seek/jsseek.c
tests/examples/seek/seek.c
tests/icles/.gitignore
tests/icles/Makefile.am
tests/icles/stress-videooverlay.c [moved from tests/icles/stress-xoverlay.c with 91% similarity]
tests/icles/test-colorkey.c
tests/icles/test-videooverlay.c [moved from tests/icles/test-xoverlay.c with 92% similarity]

index 3cea168..fdcd482 100644 (file)
@@ -64,7 +64,7 @@
 #include <gst/interfaces/tuner.h>
 #include <gst/interfaces/tunernorm.h>
 #include <gst/interfaces/videoorientation.h>
-#include <gst/interfaces/xoverlay.h>
+#include <gst/interfaces/videooverlay.h>
 
 #include <gst/netbuffer/gstnetbuffer.h>
 
index 24398a3..5c4135d 100644 (file)
@@ -45,7 +45,7 @@
 #include <gst/interfaces/streamvolume.h>
 #include <gst/interfaces/tuner.h>
 #include <gst/interfaces/videoorientation.h>
-#include <gst/interfaces/xoverlay.h>
+#include <gst/interfaces/videooverlay.h>
 #include <gst/netbuffer/gstnetbuffer.h>
 #include <gst/pbutils/pbutils.h>
 #include <gst/riff/riff-media.h>
index c8795e7..8857100 100644 (file)
@@ -1,5 +1,5 @@
-gtk-xoverlay
-qt-xoverlay
-qtgv-xoverlay
+gtk-videooverlay
+qt-videooverlay
+qtgv-videooverlay
 moc_*.cpp
 
index 55dbb02..24404c6 100644 (file)
@@ -3,41 +3,41 @@ EXAMPLES =
 if USE_X
 
 if HAVE_GTK_X11
-EXAMPLES += gtk-xoverlay
+EXAMPLES += gtk-videooverlay
 
-gtk_xoverlay_SOURCES = gtk-xoverlay.c
-gtk_xoverlay_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(X_CFLAGS) $(GTK_CFLAGS)
-gtk_xoverlay_LDADD = $(GST_LIBS) $(X_LIBS) $(LIBM) $(GTK_LIBS) \
+gtk_videooverlay_SOURCES = gtk-videooverlay.c
+gtk_videooverlay_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(X_CFLAGS) $(GTK_CFLAGS)
+gtk_videooverlay_LDADD = $(GST_LIBS) $(X_LIBS) $(LIBM) $(GTK_LIBS) \
        $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-$(GST_MAJORMINOR).la
 endif
 
 if HAVE_QT
-EXAMPLES += qt-xoverlay
+EXAMPLES += qt-videooverlay
 
-qt_xoverlay_SOURCES = qt-xoverlay.cpp
-qt_xoverlay_CXXFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CXXFLAGS) $(X_CFLAGS) $(QT_CFLAGS)
-qt_xoverlay_LDADD = $(GST_LIBS) $(X_LIBS) $(LIBM) $(QT_LIBS) \
+qt_videooverlay_SOURCES = qt-videooverlay.cpp
+qt_videooverlay_CXXFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CXXFLAGS) $(X_CFLAGS) $(QT_CFLAGS)
+qt_videooverlay_LDADD = $(GST_LIBS) $(X_LIBS) $(LIBM) $(QT_LIBS) \
        $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-$(GST_MAJORMINOR).la
 
 endif
 
 if HAVE_QT_GV
-EXAMPLES += qtgv-xoverlay
+EXAMPLES += qtgv-videooverlay
 
-qtgv_xoverlay_SOURCES = qtgv-xoverlay.cpp qtgv-xoverlay.h
-qtgv_xoverlay_CXXFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CXXFLAGS) $(X_CFLAGS) $(QT_CFLAGS)
-qtgv_xoverlay_LDADD = $(GST_LIBS) $(X_LIBS) $(LIBM) $(QT_LIBS) \
+qtgv_videooverlay_SOURCES = qtgv-videooverlay.cpp qtgv-videooverlay.h
+qtgv_videooverlay_CXXFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CXXFLAGS) $(X_CFLAGS) $(QT_CFLAGS)
+qtgv_videooverlay_LDADD = $(GST_LIBS) $(X_LIBS) $(LIBM) $(QT_LIBS) \
        $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-$(GST_MAJORMINOR).la
 
 # qt moc support, according to http://qtnode.net/wiki/Qt_with_autotools
 
-nodist_qtgv_xoverlay_SOURCES = moc_qtgv-xoverlay.cpp
+nodist_qtgv_videooverlay_SOURCES = moc_qtgv-videooverlay.cpp
 
 moc_%.cpp:%.h
        $(AM_V_GEN)$(QT4_MOC) $< -o $@
 
-EXTRA_DIST = $(nodist_qtgv_xoverlay_SOURCES:moc_%.cpp=%.h)
-CLEANFILES = $(nodist_qtgv_xoverlay_SOURCES)
+EXTRA_DIST = $(nodist_qtgv_videooverlay_SOURCES:moc_%.cpp=%.h)
+CLEANFILES = $(nodist_qtgv_videooverlay_SOURCES)
 
 endif
 
similarity index 95%
rename from tests/examples/overlay/gtk-xoverlay.c
rename to tests/examples/overlay/gtk-videooverlay.c
index c05685c..427aaa7 100644 (file)
@@ -1,7 +1,7 @@
 /* GStreamer
  * Copyright (C) <2010> Stefan Kost <ensonic@users.sf.net>
  *
- * gtk-xoverlay: demonstrate overlay handling using gtk
+ * gtk-videooverlay: demonstrate overlay handling using gtk
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -28,7 +28,7 @@
 #include <gtk/gtk.h>
 
 #include <gst/gst.h>
-#include <gst/interfaces/xoverlay.h>
+#include <gst/interfaces/videooverlay.h>
 
 #include <string.h>
 
@@ -134,7 +134,7 @@ main (int argc, char **argv)
 
   video_window_xwindow = gtk_widget_get_window (video_window);
   embed_xid = GDK_WINDOW_XID (video_window_xwindow);
-  gst_x_overlay_set_window_handle (GST_X_OVERLAY (sink), embed_xid);
+  gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (sink), embed_xid);
 
   /* run the pipeline */
 
similarity index 96%
rename from tests/examples/overlay/qt-xoverlay.cpp
rename to tests/examples/overlay/qt-videooverlay.cpp
index aa483a7..e102280 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <glib.h>
 #include <gst/gst.h>
-#include <gst/interfaces/xoverlay.h>
+#include <gst/interfaces/videooverlay.h>
 
 #include <QApplication>
 #include <QTimer>
@@ -107,7 +107,7 @@ int main(int argc, char *argv[])
   window.show();
   
   WId xwinid = window.winId();
-  gst_x_overlay_set_window_handle (GST_X_OVERLAY (sink), xwinid);
+  gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (sink), xwinid);
 
   /* run the pipeline */
 
similarity index 92%
rename from tests/examples/overlay/qtgv-xoverlay.cpp
rename to tests/examples/overlay/qtgv-videooverlay.cpp
index 58af85b..fea8c52 100644 (file)
 #include "config.h"
 #endif
 
-#include "qtgv-xoverlay.h"
+#include "qtgv-videooverlay.h"
 
 #include <QApplication>
 #include <QTimer>
 
-#include <gst/interfaces/xoverlay.h>
+#include <gst/interfaces/videooverlay.h>
 
 SinkPipeline::SinkPipeline(QGraphicsView *parent) : QObject(parent)
 {
@@ -90,10 +90,10 @@ void SinkPipeline::startPipeline()
   GstStateChangeReturn sret;
 
   /* we know what the video sink is in this case (xvimagesink), so we can
-   * just set it directly here now (instead of waiting for a prepare-xwindow-id
-   * element message in a sync bus handler and setting it there) */
-
-  gst_x_overlay_set_window_handle (GST_X_OVERLAY (sink), xwinid);
+   * just set it directly here now (instead of waiting for a
+   * prepare-window-handle element message in a sync bus handler and setting
+   * it there) */
+  gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (sink), xwinid);
 
   sret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
   if (sret == GST_STATE_CHANGE_FAILURE) {
index f0bbc7e..82b0b8b 100644 (file)
@@ -45,7 +45,7 @@
 #ifdef HAVE_X
 #include <gdk/gdkx.h>
 #endif
-#include <gst/interfaces/xoverlay.h>
+#include <gst/interfaces/videooverlay.h>
 
 GST_DEBUG_CATEGORY_STATIC (seek_debug);
 #define GST_CAT_DEFAULT (seek_debug)
@@ -2438,7 +2438,7 @@ msg_clock_lost (GstBus * bus, GstMessage * message, GstPipeline * data)
 
 static gulong embed_xid = 0;
 
-/* We set the xid here in response to the prepare-xwindow-id message via a
+/* We set the xid here in response to the prepare-window-handle message via a
  * bus sync handler because we don't know the actual videosink used from the
  * start (as we don't know the pipeline, or bin elements such as autovideosink
  * or gconfvideosink may be used which create the actual videosink only once
@@ -2447,10 +2447,10 @@ static GstBusSyncReply
 bus_sync_handler (GstBus * bus, GstMessage * message, GstPipeline * data)
 {
   if ((GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT) &&
-      gst_message_has_name (message, "prepare-xwindow-id")) {
+      gst_message_has_name (message, "prepare-window-handle")) {
     GstElement *element = GST_ELEMENT (GST_MESSAGE_SRC (message));
 
-    g_print ("got prepare-xwindow-id, setting XID %lu\n", embed_xid);
+    g_print ("got prepare-window-handle, setting XID %lu\n", embed_xid);
 
     if (g_object_class_find_property (G_OBJECT_GET_CLASS (element),
             "force-aspect-ratio")) {
@@ -2464,7 +2464,8 @@ bus_sync_handler (GstBus * bus, GstMessage * message, GstPipeline * data)
      * shouldn't be done from a non-GUI thread without explicit locking).  */
     g_assert (embed_xid != 0);
 
-    gst_x_overlay_set_window_handle (GST_X_OVERLAY (element), embed_xid);
+    gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (element),
+        embed_xid);
   }
   return GST_BUS_PASS;
 }
@@ -2498,7 +2499,7 @@ realize_cb (GtkWidget * widget, gpointer data)
     /* This is here just for pedagogical purposes, GDK_WINDOW_XID will call it
      * as well */
     if (!gdk_window_ensure_native (window))
-      g_error ("Couldn't create native window needed for GstXOverlay!");
+      g_error ("Couldn't create native window needed for GstVideoOverlay!");
   }
 #endif
 
@@ -2541,7 +2542,7 @@ connect_bus_signals (GstElement * pipeline)
   GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
 
 #ifdef HAVE_X
-  /* handle prepare-xwindow-id element message synchronously */
+  /* handle prepare-window-handle element message synchronously */
   gst_bus_set_sync_handler (bus, (GstBusSyncHandler) bus_sync_handler,
       pipeline);
 #endif
index 18677ca..71c382a 100644 (file)
@@ -39,7 +39,7 @@
 #include <gdk/gdkwin32.h>
 #endif
 
-#include <gst/interfaces/xoverlay.h>
+#include <gst/interfaces/videooverlay.h>
 
 #if (!GTK_CHECK_VERSION(2, 23, 0) || GTK_CHECK_VERSION(2, 90, 0)) && !GTK_CHECK_VERSION(2, 91, 1)
 #define gtk_combo_box_text_new gtk_combo_box_new_text
@@ -1575,7 +1575,7 @@ msg_clock_lost (GstBus * bus, GstMessage * message, GstPipeline * data)
 
 static gulong embed_xid = 0;
 
-/* We set the xid here in response to the prepare-xwindow-id message via a
+/* We set the xid here in response to the prepare-window-handle message via a
  * bus sync handler because we don't know the actual videosink used from the
  * start (as we don't know the pipeline, or bin elements such as autovideosink
  * or gconfvideosink may be used which create the actual videosink only once
@@ -1584,10 +1584,10 @@ static GstBusSyncReply
 bus_sync_handler (GstBus * bus, GstMessage * message, GstPipeline * data)
 {
   if ((GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT) &&
-      gst_message_has_name (message, "prepare-xwindow-id")) {
+      gst_message_has_name (message, "prepare-window-handle")) {
     GstElement *element = GST_ELEMENT (GST_MESSAGE_SRC (message));
 
-    g_print ("got prepare-xwindow-id, setting XID %lu\n", embed_xid);
+    g_print ("got prepare-window-handle, setting XID %lu\n", embed_xid);
 
     if (g_object_class_find_property (G_OBJECT_GET_CLASS (element),
             "force-aspect-ratio")) {
@@ -1601,7 +1601,8 @@ bus_sync_handler (GstBus * bus, GstMessage * message, GstPipeline * data)
      * shouldn't be done from a non-GUI thread without explicit locking).  */
     g_assert (embed_xid != 0);
 
-    gst_x_overlay_set_window_handle (GST_X_OVERLAY (element), embed_xid);
+    gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (element),
+        embed_xid);
   }
   return GST_BUS_PASS;
 }
@@ -1635,7 +1636,7 @@ realize_cb (GtkWidget * widget, gpointer data)
     /* This is here just for pedagogical purposes, GDK_WINDOW_XID will call it
      * as well */
     if (!gdk_window_ensure_native (window))
-      g_error ("Couldn't create native window needed for GstXOverlay!");
+      g_error ("Couldn't create native window needed for GstVideoOverlay!");
   }
 #endif
 
@@ -1682,7 +1683,7 @@ connect_bus_signals (GstElement * pipeline)
   GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
 
 #if defined (GDK_WINDOWING_X11) || defined (GDK_WINDOWING_WIN32)
-  /* handle prepare-xwindow-id element message synchronously */
+  /* handle prepare-window-handle element message synchronously */
   gst_bus_set_sync_handler (bus, (GstBusSyncHandler) bus_sync_handler,
       pipeline);
 #endif
index bd175b1..e633368 100644 (file)
@@ -4,9 +4,9 @@ output-selector-test
 playbin-text
 position-formats
 stress-playbin
-stress-xoverlay
+stress-videooverlay
 test-textoverlay
 test-scale
 test-box
 test-colorkey
-test-xoverlay
+test-videooverlay
index d7a3236..a3764c1 100644 (file)
@@ -2,16 +2,16 @@ SUBDIRS = playback
 DIST_SUBDIRS = playback
 
 if USE_X
-X_TESTS = stress-xoverlay
+X_TESTS = stress-videooverlay
 
-stress_xoverlay_SOURCES = stress-xoverlay.c
-stress_xoverlay_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
+stress_videooverlay_SOURCES = stress-videooverlay.c
+stress_videooverlay_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
        $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(X_CFLAGS)
-stress_xoverlay_LDADD = $(GST_LIBS) $(X_LIBS) $(LIBM) \
+stress_videooverlay_LDADD = $(GST_LIBS) $(X_LIBS) $(LIBM) \
        $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-$(GST_MAJORMINOR).la
 
 if HAVE_GTK_X11
-X_TESTS += test-colorkey test-xoverlay
+X_TESTS += test-colorkey test-videooverlay
 
 test_colorkey_SOURCES = test-colorkey.c
 test_colorkey_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
@@ -19,10 +19,10 @@ test_colorkey_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
 test_colorkey_LDADD = $(GST_LIBS) $(X_LIBS) $(LIBM) $(GTK_LIBS) \
        $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-$(GST_MAJORMINOR).la
 
-test_xoverlay_SOURCES = test-xoverlay.c
-test_xoverlay_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
+test_videooverlay_SOURCES = test-videooverlay.c
+test_videooverlay_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
        $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(X_CFLAGS) $(GTK_CFLAGS)
-test_xoverlay_LDADD = $(GST_LIBS) $(X_LIBS) $(LIBM) $(GTK_LIBS) \
+test_videooverlay_LDADD = $(GST_LIBS) $(X_LIBS) $(LIBM) $(GTK_LIBS) \
        $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-$(GST_MAJORMINOR).la
 endif
 
similarity index 91%
rename from tests/icles/stress-xoverlay.c
rename to tests/icles/stress-videooverlay.c
index 9cfb308..c6b5ebf 100644 (file)
@@ -22,7 +22,7 @@
 #endif
 
 #include <gst/gst.h>
-#include <gst/interfaces/xoverlay.h>
+#include <gst/interfaces/videooverlay.h>
 
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
@@ -94,11 +94,11 @@ move_window (GstPipeline * pipeline)
 }
 
 static gboolean
-toggle_events (GstXOverlay * ov)
+toggle_events (GstVideoOverlay * ov)
 {
   static gboolean events_toggled;
 
-  gst_x_overlay_handle_events (ov, events_toggled);
+  gst_video_overlay_handle_events (ov, events_toggled);
 
   if (events_toggled) {
     g_print ("Events are handled\n");
@@ -112,7 +112,7 @@ toggle_events (GstXOverlay * ov)
 }
 
 static gboolean
-cycle_window (GstXOverlay * ov)
+cycle_window (GstVideoOverlay * ov)
 {
   XGCValues values;
   Window old_win = win;
@@ -128,7 +128,7 @@ cycle_window (GstXOverlay * ov)
 
   XSync (disp, FALSE);
 
-  gst_x_overlay_set_window_handle (ov, win);
+  gst_video_overlay_set_window_handle (ov, win);
 
   if (old_win) {
     XDestroyWindow (disp, old_win);
@@ -143,14 +143,14 @@ static GstBusSyncReply
 create_window (GstBus * bus, GstMessage * message, GstPipeline * pipeline)
 {
   const GstStructure *s;
-  GstXOverlay *ov = NULL;
+  GstVideoOverlay *ov = NULL;
 
   s = gst_message_get_structure (message);
-  if (s == NULL || !gst_structure_has_name (s, "prepare-xwindow-id")) {
+  if (s == NULL || !gst_structure_has_name (s, "prepare-window-handle")) {
     return GST_BUS_PASS;
   }
 
-  ov = GST_X_OVERLAY (GST_MESSAGE_SRC (message));
+  ov = GST_VIDEO_OVERLAY (GST_MESSAGE_SRC (message));
 
   g_print ("Creating our own window\n");
 
@@ -206,7 +206,8 @@ main (int argc, char **argv)
   if (argc != 2) {
     g_print ("Usage: %s \"pipeline description with launch format\"\n",
         argv[0]);
-    g_print ("The pipeline should contain an element implementing XOverlay.\n");
+    g_print
+        ("The pipeline should contain an element implementing GstVideoOverlay.\n");
     g_print ("Example: %s \"videotestsrc ! ximagesink\"\n", argv[0]);
     return -1;
   }
index 947363c..ad5db92 100644 (file)
@@ -31,7 +31,7 @@
 #include <gtk/gtk.h>
 
 #include <gst/gst.h>
-#include <gst/interfaces/xoverlay.h>
+#include <gst/interfaces/videooverlay.h>
 #include <gst/interfaces/propertyprobe.h>
 
 #if !GTK_CHECK_VERSION (2, 17, 7)
@@ -105,7 +105,7 @@ realize_cb (GtkWidget * widget, gpointer data)
     /* This is here just for pedagogical purposes, GDK_WINDOW_XID will call it
      * as well */
     if (!gdk_window_ensure_native (window))
-      g_error ("Couldn't create native window needed for GstXOverlay!");
+      g_error ("Couldn't create native window needed for GstVideoOverlay!");
   }
 #endif
 
@@ -270,10 +270,11 @@ main (int argc, char **argv)
   g_assert (embed_xid != 0);
 
   /* we know what the video sink is in this case (xvimagesink), so we can
-   * just set it directly here now (instead of waiting for a prepare-xwindow-id
-   * element message in a sync bus handler and setting it there) */
+   * just set it directly here now (instead of waiting for a
+   * prepare-window-handle element message in a sync bus handler and setting
+   * it there) */
   g_print ("setting XID %lu\n", embed_xid);
-  gst_x_overlay_set_window_handle (GST_X_OVERLAY (sink), embed_xid);
+  gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (sink), embed_xid);
 
   g_idle_add (start_pipeline, pipeline);
   gtk_main ();
similarity index 92%
rename from tests/icles/test-xoverlay.c
rename to tests/icles/test-videooverlay.c
index b1b9d92..400d0ac 100644 (file)
@@ -1,7 +1,7 @@
 /* GStreamer
  * Copyright (C) <2008> Stefan Kost <ensonic@users.sf.net>
  *
- * test-xoverlay: test xoverlay custom event handling and subregions
+ * test-videooverlay: test videooverlay custom event handling and subregions
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -32,7 +32,7 @@
 #include <gtk/gtk.h>
 
 #include <gst/gst.h>
-#include <gst/interfaces/xoverlay.h>
+#include <gst/interfaces/videooverlay.h>
 #include <gst/video/gstvideosink.h>
 
 #if !GTK_CHECK_VERSION (2, 17, 7)
@@ -46,7 +46,7 @@ gtk_widget_get_allocation (GtkWidget * w, GtkAllocation * a)
 static struct
 {
   gint w, h;
-  GstXOverlay *overlay;
+  GstVideoOverlay *overlay;
   GtkWidget *widget;
   gdouble a, p;
   GstVideoRectangle rect;
@@ -72,7 +72,7 @@ animate_render_rect (gpointer user_data)
     r->h = anim_state.h / 2;
     r->y = (r->h - (r->h / 2)) + s * (r->h / 2);
 
-    gst_x_overlay_set_render_rectangle (anim_state.overlay, r->x, r->y,
+    gst_video_overlay_set_render_rectangle (anim_state.overlay, r->x, r->y,
         r->w, r->h);
     gtk_widget_queue_draw (anim_state.widget);
   }
@@ -131,7 +131,7 @@ handle_expose_cb (GtkWidget * widget, GdkEventExpose * event,
   if (verbose) {
     g_print ("expose(%p)\n", widget);
   }
-  gst_x_overlay_expose (anim_state.overlay);
+  gst_video_overlay_expose (anim_state.overlay);
   return FALSE;
 }
 
@@ -214,11 +214,12 @@ main (gint argc, gchar ** argv)
   }
 
   /* we know what the video sink is in this case (xvimagesink), so we can
-   * just set it directly here now (instead of waiting for a prepare-xwindow-id
-   * element message in a sync bus handler and setting it there) */
-  gst_x_overlay_set_window_handle (GST_X_OVERLAY (sink), embed_xid);
+   * just set it directly here now (instead of waiting for a
+   * prepare-window-handle element message in a sync bus handler and setting
+   * it there) */
+  gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (sink), embed_xid);
 
-  anim_state.overlay = GST_X_OVERLAY (sink);
+  anim_state.overlay = GST_VIDEO_OVERLAY (sink);
   anim_state.widget = video_window;
   anim_state.w = 320;
   anim_state.h = 240;