#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>
#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>
-gtk-xoverlay
-qt-xoverlay
-qtgv-xoverlay
+gtk-videooverlay
+qt-videooverlay
+qtgv-videooverlay
moc_*.cpp
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
/* 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
#include <gtk/gtk.h>
#include <gst/gst.h>
-#include <gst/interfaces/xoverlay.h>
+#include <gst/interfaces/videooverlay.h>
#include <string.h>
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 */
#include <glib.h>
#include <gst/gst.h>
-#include <gst/interfaces/xoverlay.h>
+#include <gst/interfaces/videooverlay.h>
#include <QApplication>
#include <QTimer>
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 */
#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)
{
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) {
#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)
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
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")) {
* 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;
}
/* 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
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
#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
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
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")) {
* 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;
}
/* 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
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
playbin-text
position-formats
stress-playbin
-stress-xoverlay
+stress-videooverlay
test-textoverlay
test-scale
test-box
test-colorkey
-test-xoverlay
+test-videooverlay
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) \
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
#endif
#include <gst/gst.h>
-#include <gst/interfaces/xoverlay.h>
+#include <gst/interfaces/videooverlay.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
}
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");
}
static gboolean
-cycle_window (GstXOverlay * ov)
+cycle_window (GstVideoOverlay * ov)
{
XGCValues values;
Window old_win = win;
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);
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");
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;
}
#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)
/* 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
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 ();
/* 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
#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)
static struct
{
gint w, h;
- GstXOverlay *overlay;
+ GstVideoOverlay *overlay;
GtkWidget *widget;
gdouble a, p;
GstVideoRectangle rect;
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);
}
if (verbose) {
g_print ("expose(%p)\n", widget);
}
- gst_x_overlay_expose (anim_state.overlay);
+ gst_video_overlay_expose (anim_state.overlay);
return FALSE;
}
}
/* 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;