mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
window: allow for updating size from current geometry.
Add gst_vaapi_window_reconfigure() interface to force an update of the GstVaapiWindow "soft" size, based on the current geometry of the underlying native window. This can be useful for instance to synchronize the window size when the user changed it. Thanks to Fabrice Bellet for rebasing the patch. [changed interface to gst_vaapi_window_reconfigure()] Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
parent
3490212988
commit
08dc3036f4
2 changed files with 19 additions and 0 deletions
|
@ -483,3 +483,19 @@ gst_vaapi_window_put_pixmap (GstVaapiWindow * window,
|
|||
}
|
||||
return klass->render_pixmap (window, pixmap, src_rect, dst_rect);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_window_reconfigure:
|
||||
* @window: a #GstVaapiWindow
|
||||
*
|
||||
* Updates internal window size from geometry of the underlying window
|
||||
* implementation if necessary.
|
||||
*/
|
||||
void
|
||||
gst_vaapi_window_reconfigure (GstVaapiWindow * window)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
|
||||
window->check_geometry = TRUE;
|
||||
gst_vaapi_window_ensure_size (window);
|
||||
}
|
||||
|
|
|
@ -93,6 +93,9 @@ gboolean
|
|||
gst_vaapi_window_put_pixmap (GstVaapiWindow * window, GstVaapiPixmap * pixmap,
|
||||
const GstVaapiRectangle * src_rect, const GstVaapiRectangle * dst_rect);
|
||||
|
||||
void
|
||||
gst_vaapi_window_reconfigure (GstVaapiWindow * window);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* GST_VAAPI_WINDOW_H */
|
||||
|
|
Loading…
Reference in a new issue