diff --git a/tests/check/libs/gstlibscpp.cc b/tests/check/libs/gstlibscpp.cc index 3cea1685cc..fdcd482c06 100644 --- a/tests/check/libs/gstlibscpp.cc +++ b/tests/check/libs/gstlibscpp.cc @@ -64,7 +64,7 @@ #include #include #include -#include +#include #include diff --git a/tests/check/libs/libsabi.c b/tests/check/libs/libsabi.c index 24398a33f8..5c4135de5b 100644 --- a/tests/check/libs/libsabi.c +++ b/tests/check/libs/libsabi.c @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tests/examples/overlay/.gitignore b/tests/examples/overlay/.gitignore index c8795e7f6c..8857100118 100644 --- a/tests/examples/overlay/.gitignore +++ b/tests/examples/overlay/.gitignore @@ -1,5 +1,5 @@ -gtk-xoverlay -qt-xoverlay -qtgv-xoverlay +gtk-videooverlay +qt-videooverlay +qtgv-videooverlay moc_*.cpp diff --git a/tests/examples/overlay/Makefile.am b/tests/examples/overlay/Makefile.am index 55dbb024ef..24404c6da3 100644 --- a/tests/examples/overlay/Makefile.am +++ b/tests/examples/overlay/Makefile.am @@ -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 diff --git a/tests/examples/overlay/gtk-xoverlay.c b/tests/examples/overlay/gtk-videooverlay.c similarity index 95% rename from tests/examples/overlay/gtk-xoverlay.c rename to tests/examples/overlay/gtk-videooverlay.c index c05685c7e2..427aaa7e7f 100644 --- a/tests/examples/overlay/gtk-xoverlay.c +++ b/tests/examples/overlay/gtk-videooverlay.c @@ -1,7 +1,7 @@ /* GStreamer * Copyright (C) <2010> Stefan Kost * - * 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 #include -#include +#include #include @@ -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 */ diff --git a/tests/examples/overlay/qt-xoverlay.cpp b/tests/examples/overlay/qt-videooverlay.cpp similarity index 96% rename from tests/examples/overlay/qt-xoverlay.cpp rename to tests/examples/overlay/qt-videooverlay.cpp index aa483a71cd..e102280676 100644 --- a/tests/examples/overlay/qt-xoverlay.cpp +++ b/tests/examples/overlay/qt-videooverlay.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include @@ -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 */ diff --git a/tests/examples/overlay/qtgv-xoverlay.cpp b/tests/examples/overlay/qtgv-videooverlay.cpp similarity index 92% rename from tests/examples/overlay/qtgv-xoverlay.cpp rename to tests/examples/overlay/qtgv-videooverlay.cpp index 58af85bbde..fea8c5252a 100644 --- a/tests/examples/overlay/qtgv-xoverlay.cpp +++ b/tests/examples/overlay/qtgv-videooverlay.cpp @@ -23,12 +23,12 @@ #include "config.h" #endif -#include "qtgv-xoverlay.h" +#include "qtgv-videooverlay.h" #include #include -#include +#include 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) { diff --git a/tests/examples/overlay/qtgv-xoverlay.h b/tests/examples/overlay/qtgv-videooverlay.h similarity index 100% rename from tests/examples/overlay/qtgv-xoverlay.h rename to tests/examples/overlay/qtgv-videooverlay.h diff --git a/tests/examples/seek/jsseek.c b/tests/examples/seek/jsseek.c index f0bbc7e766..82b0b8b8be 100644 --- a/tests/examples/seek/jsseek.c +++ b/tests/examples/seek/jsseek.c @@ -45,7 +45,7 @@ #ifdef HAVE_X #include #endif -#include +#include 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 diff --git a/tests/examples/seek/seek.c b/tests/examples/seek/seek.c index 18677cadf6..71c382af39 100644 --- a/tests/examples/seek/seek.c +++ b/tests/examples/seek/seek.c @@ -39,7 +39,7 @@ #include #endif -#include +#include #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 diff --git a/tests/icles/.gitignore b/tests/icles/.gitignore index bd175b1a8b..e6333684a7 100644 --- a/tests/icles/.gitignore +++ b/tests/icles/.gitignore @@ -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 diff --git a/tests/icles/Makefile.am b/tests/icles/Makefile.am index d7a3236b90..a3764c1ca3 100644 --- a/tests/icles/Makefile.am +++ b/tests/icles/Makefile.am @@ -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 diff --git a/tests/icles/stress-xoverlay.c b/tests/icles/stress-videooverlay.c similarity index 91% rename from tests/icles/stress-xoverlay.c rename to tests/icles/stress-videooverlay.c index 9cfb3085d7..c6b5ebf646 100644 --- a/tests/icles/stress-xoverlay.c +++ b/tests/icles/stress-videooverlay.c @@ -22,7 +22,7 @@ #endif #include -#include +#include #include #include @@ -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; } diff --git a/tests/icles/test-colorkey.c b/tests/icles/test-colorkey.c index 947363c3dc..ad5db92102 100644 --- a/tests/icles/test-colorkey.c +++ b/tests/icles/test-colorkey.c @@ -31,7 +31,7 @@ #include #include -#include +#include #include #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 (); diff --git a/tests/icles/test-xoverlay.c b/tests/icles/test-videooverlay.c similarity index 92% rename from tests/icles/test-xoverlay.c rename to tests/icles/test-videooverlay.c index b1b9d92bb9..400d0ac32a 100644 --- a/tests/icles/test-xoverlay.c +++ b/tests/icles/test-videooverlay.c @@ -1,7 +1,7 @@ /* GStreamer * Copyright (C) <2008> Stefan Kost * - * 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 #include -#include +#include #include #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;