/** * gst_x_overlay_set_window_handle: * @overlay: a #GstXOverlay to set the window on. * @handle: a handle referencing the window. * * This will call the video overlay's set_window_handle method. You * should use this method to tell to a XOverlay to display video output to a * specific window (e.g. an XWindow on X11). Passing 0 as the @handle will * tell the overlay to stop using that window and create an internal one. * * Since: 0.10.31 */ void gst_x_overlay_set_window_handle (GstXOverlay * overlay, guintptr handle) { GstXOverlayClass *klass; g_return_if_fail (overlay != NULL); g_return_if_fail (GST_IS_X_OVERLAY (overlay)); klass = GST_X_OVERLAY_GET_CLASS (overlay); if (klass->set_window_handle) { klass->set_window_handle (overlay, handle); } else { #ifndef GST_REMOVE_DEPRECATED #ifdef GST_DISABLE_DEPRECATED #define set_xwindow_id set_xwindow_id_disabled #endif if (sizeof (guintptr) <= sizeof (gulong) && klass->set_xwindow_id) { GST_WARNING_OBJECT (overlay, "Calling deprecated set_xwindow_id() method"); klass->set_xwindow_id (overlay, handle); } else { g_warning ("Refusing to cast guintptr to smaller gulong"); } #endif } }
/** * gst_x_overlay_handle_events: * @overlay: a #GstXOverlay to expose. * @handle_events: a #gboolean indicating if events should be handled or not. * * Tell an overlay that it should handle events from the window system. These * events are forwared upstream as navigation events. In some window system, * events are not propagated in the window hierarchy if a client is listening * for them. This method allows you to disable events handling completely * from the XOverlay. * * Since: 0.10.12 */ void gst_x_overlay_handle_events (GstXOverlay * overlay, gboolean handle_events) { GstXOverlayClass *klass; g_return_if_fail (overlay != NULL); g_return_if_fail (GST_IS_X_OVERLAY (overlay)); klass = GST_X_OVERLAY_GET_CLASS (overlay); if (klass->handle_events) { klass->handle_events (overlay, handle_events); } }
/** * gst_x_overlay_expose: * @overlay: a #GstXOverlay to expose. * * Tell an overlay that it has been exposed. This will redraw the current frame * in the drawable even if the pipeline is PAUSED. */ void gst_x_overlay_expose (GstXOverlay * overlay) { GstXOverlayClass *klass; g_return_if_fail (overlay != NULL); g_return_if_fail (GST_IS_X_OVERLAY (overlay)); klass = GST_X_OVERLAY_GET_CLASS (overlay); if (klass->expose) { klass->expose (overlay); } }
/** * gst_x_overlay_set_xwindow_id: * @overlay: a #GstXOverlay to set the XWindow on. * @xwindow_id: a #XID referencing the XWindow. * * This will call the video overlay's set_xwindow_id method. You should * use this method to tell to a XOverlay to display video output to a * specific XWindow. Passing 0 as the xwindow_id will tell the overlay to * stop using that window and create an internal one. */ void gst_x_overlay_set_xwindow_id (GstXOverlay * overlay, gulong xwindow_id) { GstXOverlayClass *klass; g_return_if_fail (overlay != NULL); g_return_if_fail (GST_IS_X_OVERLAY (overlay)); klass = GST_X_OVERLAY_GET_CLASS (overlay); if (klass->set_xwindow_id) { klass->set_xwindow_id (overlay, xwindow_id); } }
/** * gst_x_overlay_set_render_rectangle: * @overlay: a #GstXOverlay * @x: the horizontal offset of the render area inside the window * @y: the vertical offset of the render area inside the window * @width: the width of the render area inside the window * @height: the height of the render area inside the window * * Configure a subregion as a video target within the window set by * gst_x_overlay_set_window_handle(). If this is not used or not supported * the video will fill the area of the window set as the overlay to 100%. * By specifying the rectangle, the video can be overlayed to a specific region * of that window only. After setting the new rectangle one should call * gst_x_overlay_expose() to force a redraw. To unset the region pass -1 for * the @width and @height parameters. * * This method is needed for non fullscreen video overlay in UI toolkits that * do not support subwindows. * * Returns: %FALSE if not supported by the sink. * * Since: 0.10.29 */ gboolean gst_x_overlay_set_render_rectangle (GstXOverlay * overlay, gint x, gint y, gint width, gint height) { GstXOverlayClass *klass; g_return_val_if_fail (overlay != NULL, FALSE); g_return_val_if_fail (GST_IS_X_OVERLAY (overlay), FALSE); g_return_val_if_fail ((width == -1 && height == -1) || (width > 0 && height > 0), FALSE); klass = GST_X_OVERLAY_GET_CLASS (overlay); if (klass->set_render_rectangle) { klass->set_render_rectangle (overlay, x, y, width, height); return TRUE; } return FALSE; }