Beispiel #1
0
/**
 * 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
  }
}