*
* XImageSink renders video frames to a drawable (XWindow) on a local or remote
* display. This element can receive a Window ID from the application through
- * the XOverlay interface and will then render video frames in this drawable.
- * If no Window ID was provided by the application, the element will create its
- * own internal window and render into it.
+ * the #GstVideoOverlay interface and will then render video frames in this
+ * drawable. If no Window ID was provided by the application, the element will
+ * create its own internal window and render into it.
*
* <refsect2>
* <title>Scaling</title>
/* Our interfaces */
#include <gst/interfaces/navigation.h>
-#include <gst/interfaces/xoverlay.h>
+#include <gst/interfaces/videooverlay.h>
#include <gst/video/gstmetavideo.h>
static void gst_ximagesink_reset (GstXImageSink * ximagesink);
static void gst_ximagesink_xwindow_update_geometry (GstXImageSink * ximagesink);
-static void gst_ximagesink_expose (GstXOverlay * overlay);
+static void gst_ximagesink_expose (GstVideoOverlay * overlay);
static GstStaticPadTemplate gst_ximagesink_sink_template_factory =
GST_STATIC_PAD_TEMPLATE ("sink",
/* */
/* =========================================== */
static void gst_ximagesink_navigation_init (GstNavigationInterface * klass);
-static void gst_ximagesink_xoverlay_init (GstXOverlayClass * klass);
+static void gst_ximagesink_video_overlay_init (GstVideoOverlayIface * iface);
#define gst_ximagesink_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstXImageSink, gst_ximagesink, GST_TYPE_VIDEO_SINK,
G_IMPLEMENT_INTERFACE (GST_TYPE_NAVIGATION, gst_ximagesink_navigation_init);
- G_IMPLEMENT_INTERFACE (GST_TYPE_X_OVERLAY, gst_ximagesink_xoverlay_init));
+ G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_OVERLAY,
+ gst_ximagesink_video_overlay_init));
/* ============================================================= */
/* */
gst_ximagesink_xwindow_decorate (ximagesink, xwindow);
- gst_x_overlay_got_window_handle (GST_X_OVERLAY (ximagesink), xwindow->win);
+ gst_video_overlay_got_window_handle (GST_VIDEO_OVERLAY (ximagesink),
+ xwindow->win);
return xwindow;
}
g_mutex_unlock (ximagesink->x_lock);
g_mutex_unlock (ximagesink->flow_lock);
- gst_ximagesink_expose (GST_X_OVERLAY (ximagesink));
+ gst_ximagesink_expose (GST_VIDEO_OVERLAY (ximagesink));
g_mutex_lock (ximagesink->flow_lock);
g_mutex_lock (ximagesink->x_lock);
g_mutex_lock (ximagesink->flow_lock);
if (!ximagesink->xwindow) {
g_mutex_unlock (ximagesink->flow_lock);
- gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (ximagesink));
+ gst_video_overlay_prepare_window_handle (GST_VIDEO_OVERLAY (ximagesink));
} else {
g_mutex_unlock (ximagesink->flow_lock);
}
}
static void
-gst_ximagesink_set_window_handle (GstXOverlay * overlay, guintptr id)
+gst_ximagesink_set_window_handle (GstVideoOverlay * overlay, guintptr id)
{
XID xwindow_id = id;
GstXImageSink *ximagesink = GST_XIMAGESINK (overlay);
}
static void
-gst_ximagesink_expose (GstXOverlay * overlay)
+gst_ximagesink_expose (GstVideoOverlay * overlay)
{
GstXImageSink *ximagesink = GST_XIMAGESINK (overlay);
}
static void
-gst_ximagesink_set_event_handling (GstXOverlay * overlay,
+gst_ximagesink_set_event_handling (GstVideoOverlay * overlay,
gboolean handle_events)
{
GstXImageSink *ximagesink = GST_XIMAGESINK (overlay);
}
static void
-gst_ximagesink_xoverlay_init (GstXOverlayClass * iface)
+gst_ximagesink_video_overlay_init (GstVideoOverlayIface * iface)
{
iface->set_window_handle = gst_ximagesink_set_window_handle;
iface->expose = gst_ximagesink_expose;
}
break;
case PROP_HANDLE_EVENTS:
- gst_ximagesink_set_event_handling (GST_X_OVERLAY (ximagesink),
+ gst_ximagesink_set_event_handling (GST_VIDEO_OVERLAY (ximagesink),
g_value_get_boolean (value));
gst_ximagesink_manage_event_thread (ximagesink);
break;
/* Our interfaces */
#include <gst/interfaces/navigation.h>
-#include <gst/interfaces/xoverlay.h>
+#include <gst/interfaces/videooverlay.h>
#include <gst/interfaces/colorbalance.h>
#include <gst/interfaces/propertyprobe.h>
/* Helper functions */
static void gst_xvimagesink_reset (GstXvImageSink * xvimagesink);
static void gst_xvimagesink_xwindow_update_geometry (GstXvImageSink *
xvimagesink);
-static void gst_xvimagesink_expose (GstXOverlay * overlay);
+static void gst_xvimagesink_expose (GstVideoOverlay * overlay);
/* Default template - initiated with class struct to allow gst-register to work
without X running */
/* */
/* =========================================== */
static void gst_xvimagesink_navigation_init (GstNavigationInterface * iface);
-static void gst_xvimagesink_xoverlay_init (GstXOverlayClass * iface);
+static void gst_xvimagesink_video_overlay_init (GstVideoOverlayIface * iface);
static void gst_xvimagesink_colorbalance_init (GstColorBalanceClass * iface);
static void
gst_xvimagesink_property_probe_interface_init (GstPropertyProbeInterface *
G_DEFINE_TYPE_WITH_CODE (GstXvImageSink, gst_xvimagesink, GST_TYPE_VIDEO_SINK,
G_IMPLEMENT_INTERFACE (GST_TYPE_NAVIGATION,
gst_xvimagesink_navigation_init);
- G_IMPLEMENT_INTERFACE (GST_TYPE_X_OVERLAY, gst_xvimagesink_xoverlay_init);
+ G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_OVERLAY,
+ gst_xvimagesink_video_overlay_init);
G_IMPLEMENT_INTERFACE (GST_TYPE_COLOR_BALANCE,
gst_xvimagesink_colorbalance_init);
G_IMPLEMENT_INTERFACE (GST_TYPE_PROPERTY_PROBE,
gst_xvimagesink_xwindow_decorate (xvimagesink, xwindow);
- gst_x_overlay_got_window_handle (GST_X_OVERLAY (xvimagesink), xwindow->win);
+ gst_video_overlay_got_window_handle (GST_VIDEO_OVERLAY (xvimagesink),
+ xwindow->win);
return xwindow;
}
g_mutex_unlock (xvimagesink->x_lock);
g_mutex_unlock (xvimagesink->flow_lock);
- gst_xvimagesink_expose (GST_X_OVERLAY (xvimagesink));
+ gst_xvimagesink_expose (GST_VIDEO_OVERLAY (xvimagesink));
g_mutex_lock (xvimagesink->flow_lock);
g_mutex_lock (xvimagesink->x_lock);
g_mutex_lock (xvimagesink->flow_lock);
if (!xvimagesink->xwindow) {
g_mutex_unlock (xvimagesink->flow_lock);
- gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (xvimagesink));
+ gst_video_overlay_prepare_window_handle (GST_VIDEO_OVERLAY (xvimagesink));
} else {
g_mutex_unlock (xvimagesink->flow_lock);
}
}
static void
-gst_xvimagesink_set_window_handle (GstXOverlay * overlay, guintptr id)
+gst_xvimagesink_set_window_handle (GstVideoOverlay * overlay, guintptr id)
{
XID xwindow_id = id;
GstXvImageSink *xvimagesink = GST_XVIMAGESINK (overlay);
}
static void
-gst_xvimagesink_expose (GstXOverlay * overlay)
+gst_xvimagesink_expose (GstVideoOverlay * overlay)
{
GstXvImageSink *xvimagesink = GST_XVIMAGESINK (overlay);
}
static void
-gst_xvimagesink_set_event_handling (GstXOverlay * overlay,
+gst_xvimagesink_set_event_handling (GstVideoOverlay * overlay,
gboolean handle_events)
{
GstXvImageSink *xvimagesink = GST_XVIMAGESINK (overlay);
}
static void
-gst_xvimagesink_set_render_rectangle (GstXOverlay * overlay, gint x, gint y,
+gst_xvimagesink_set_render_rectangle (GstVideoOverlay * overlay, gint x, gint y,
gint width, gint height)
{
GstXvImageSink *xvimagesink = GST_XVIMAGESINK (overlay);
}
static void
-gst_xvimagesink_xoverlay_init (GstXOverlayClass * iface)
+gst_xvimagesink_video_overlay_init (GstVideoOverlayIface * iface)
{
iface->set_window_handle = gst_xvimagesink_set_window_handle;
iface->expose = gst_xvimagesink_expose;
xvimagesink->keep_aspect = g_value_get_boolean (value);
break;
case PROP_HANDLE_EVENTS:
- gst_xvimagesink_set_event_handling (GST_X_OVERLAY (xvimagesink),
+ gst_xvimagesink_set_event_handling (GST_VIDEO_OVERLAY (xvimagesink),
g_value_get_boolean (value));
gst_xvimagesink_manage_event_thread (xvimagesink);
break;