Add gst_vaapi_surface_sync().

This commit is contained in:
gb 2010-03-15 16:13:51 +00:00
parent 17d221d7d6
commit 606c016263
2 changed files with 20 additions and 0 deletions

View file

@ -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;
}

View file

@ -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 */