/** * gst_vaapi_surface_get_width: * @surface: a #GstVaapiSurface * * Returns the @surface width. * * Return value: the surface width, in pixels */ guint gst_vaapi_surface_get_width (GstVaapiSurface * surface) { g_return_val_if_fail (surface != NULL, 0); return GST_VAAPI_SURFACE_WIDTH (surface); }
/** * gst_vaapi_surface_get_size: * @surface: a #GstVaapiSurface * @width_ptr: return location for the width, or %NULL * @height_ptr: return location for the height, or %NULL * * Retrieves the dimensions of a #GstVaapiSurface. */ void gst_vaapi_surface_get_size (GstVaapiSurface * surface, guint * width_ptr, guint * height_ptr) { g_return_if_fail (surface != NULL); if (width_ptr) *width_ptr = GST_VAAPI_SURFACE_WIDTH (surface); if (height_ptr) *height_ptr = GST_VAAPI_SURFACE_HEIGHT (surface); }
/** * gst_vaapi_pixmap_put_surface: * @pixmap: a #GstVaapiPixmap * @surface: a #GstVaapiSurface * @crop_rect: the video cropping rectangle, or %NULL if the entire * surface is to be used. * @flags: postprocessing flags. See #GstVaapiSurfaceRenderFlags * * Renders the whole @surface, or a cropped region defined with * @crop_rect, into the @pixmap, while scaling to fit the target * pixmap. The @flags specify how de-interlacing (if needed), color * space conversion, scaling and other postprocessing transformations * are performed. * * Return value: %TRUE on success */ gboolean gst_vaapi_pixmap_put_surface (GstVaapiPixmap * pixmap, GstVaapiSurface * surface, const GstVaapiRectangle * crop_rect, guint flags) { GstVaapiRectangle src_rect; g_return_val_if_fail (pixmap != NULL, FALSE); g_return_val_if_fail (surface != NULL, FALSE); if (!crop_rect) { src_rect.x = 0; src_rect.y = 0; src_rect.width = GST_VAAPI_SURFACE_WIDTH (surface); src_rect.height = GST_VAAPI_SURFACE_HEIGHT (surface); crop_rect = &src_rect; } return GST_VAAPI_PIXMAP_GET_CLASS (pixmap)->render (pixmap, surface, crop_rect, flags); }