mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 03:30:35 +00:00
Add gst_vaapi_window_x11_is_foreign_xid() helper.
This commit is contained in:
parent
b36a2142e4
commit
fddeb54248
2 changed files with 20 additions and 0 deletions
|
@ -564,3 +564,20 @@ gst_vaapi_window_x11_get_xid(GstVaapiWindowX11 *window)
|
|||
|
||||
return GST_VAAPI_OBJECT_ID(window);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_window_x11_is_foreign_xid:
|
||||
* @window: a #GstVaapiWindowX11
|
||||
*
|
||||
* Checks whether the @window XID was created by gst_vaapi_window_x11_new() or bound with gst_vaapi_window_x11_new_with_xid().
|
||||
*
|
||||
* Return value: %TRUE if the underlying X window is owned by the
|
||||
* caller (foreign window)
|
||||
*/
|
||||
gboolean
|
||||
gst_vaapi_window_x11_is_foreign_xid(GstVaapiWindowX11 *window)
|
||||
{
|
||||
g_return_val_if_fail(GST_VAAPI_IS_WINDOW_X11(window), FALSE);
|
||||
|
||||
return !window->priv->create_window;
|
||||
}
|
||||
|
|
|
@ -105,6 +105,9 @@ gst_vaapi_window_x11_new_with_xid(GstVaapiDisplay *display, Window xid);
|
|||
Window
|
||||
gst_vaapi_window_x11_get_xid(GstVaapiWindowX11 *window);
|
||||
|
||||
gboolean
|
||||
gst_vaapi_window_x11_is_foreign_xid(GstVaapiWindowX11 *window);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* GST_VAAPI_WINDOW_X11_H */
|
||||
|
|
Loading…
Reference in a new issue