diff --git a/gst-libs/gst/vaapi/gstvaapisurface.c b/gst-libs/gst/vaapi/gstvaapisurface.c index b15d05ac8c..dc414957db 100644 --- a/gst-libs/gst/vaapi/gstvaapisurface.c +++ b/gst-libs/gst/vaapi/gstvaapisurface.c @@ -319,3 +319,20 @@ gst_vaapi_surface_get_height(GstVaapiSurface *surface) return surface->priv->height; } + +void +gst_vaapi_surface_get_size( + GstVaapiSurface *surface, + guint *pwidth, + guint *pheight +) +{ + g_return_if_fail(GST_VAAPI_IS_SURFACE(surface)); + + if (pwidth) + *pwidth = gst_vaapi_surface_get_width(surface); + + if (pheight) + *pheight = gst_vaapi_surface_get_height(surface); +} + diff --git a/gst-libs/gst/vaapi/gstvaapisurface.h b/gst-libs/gst/vaapi/gstvaapisurface.h index 18630974f8..3e859a33c9 100644 --- a/gst-libs/gst/vaapi/gstvaapisurface.h +++ b/gst-libs/gst/vaapi/gstvaapisurface.h @@ -99,6 +99,13 @@ gst_vaapi_surface_get_width(GstVaapiSurface *surface); guint gst_vaapi_surface_get_height(GstVaapiSurface *surface); +void +gst_vaapi_surface_get_size( + GstVaapiSurface *surface, + guint *pwidth, + guint *pheight +); + G_END_DECLS #endif /* GST_VAAPI_SURFACE_H */