mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
Add gst_vaapi_surface_sync().
This commit is contained in:
parent
17d221d7d6
commit
606c016263
2 changed files with 20 additions and 0 deletions
|
@ -396,3 +396,20 @@ gst_vaapi_surface_put_image(GstVaapiSurface *surface, GstVaapiImage *image)
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_vaapi_surface_sync(GstVaapiSurface *surface)
|
||||
{
|
||||
VAStatus status;
|
||||
|
||||
g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), FALSE);
|
||||
|
||||
status = vaSyncSurface(
|
||||
GST_VAAPI_DISPLAY_VADISPLAY(surface->priv->display),
|
||||
surface->priv->surface_id
|
||||
);
|
||||
if (!vaapi_check_status(status, "vaSyncSurface()"))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -113,6 +113,9 @@ gst_vaapi_surface_get_image(GstVaapiSurface *surface, GstVaapiImage *image);
|
|||
gboolean
|
||||
gst_vaapi_surface_put_image(GstVaapiSurface *surface, GstVaapiImage *image);
|
||||
|
||||
gboolean
|
||||
gst_vaapi_surface_sync(GstVaapiSurface *surface);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* GST_VAAPI_SURFACE_H */
|
||||
|
|
Loading…
Reference in a new issue