mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
Shorter code (and more correct).
This commit is contained in:
parent
372e9f5d4d
commit
ffb296984e
1 changed files with 4 additions and 12 deletions
|
@ -277,11 +277,9 @@ gst_vaapi_surface_new(GstVaapiDisplay *display,
|
|||
VASurfaceID
|
||||
gst_vaapi_surface_get_id(GstVaapiSurface *surface)
|
||||
{
|
||||
GstVaapiSurfacePrivate * const priv = surface->priv;
|
||||
|
||||
g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), VA_INVALID_SURFACE);
|
||||
|
||||
return priv->surface_id;
|
||||
return surface->priv->surface_id;
|
||||
}
|
||||
|
||||
GstVaapiDisplay *
|
||||
|
@ -295,29 +293,23 @@ gst_vaapi_surface_get_display(GstVaapiSurface *surface)
|
|||
guint
|
||||
gst_vaapi_surface_get_width(GstVaapiSurface *surface)
|
||||
{
|
||||
GstVaapiSurfacePrivate * const priv = surface->priv;
|
||||
|
||||
g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), 0);
|
||||
|
||||
return priv->width;
|
||||
return surface->priv->width;
|
||||
}
|
||||
|
||||
guint
|
||||
gst_vaapi_surface_get_height(GstVaapiSurface *surface)
|
||||
{
|
||||
GstVaapiSurfacePrivate * const priv = surface->priv;
|
||||
|
||||
g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), 0);
|
||||
|
||||
return priv->height;
|
||||
return surface->priv->height;
|
||||
}
|
||||
|
||||
guint
|
||||
gst_vaapi_surface_get_format(GstVaapiSurface *surface)
|
||||
{
|
||||
GstVaapiSurfacePrivate *priv = surface->priv;
|
||||
|
||||
g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), 0);
|
||||
|
||||
return priv->format;
|
||||
return surface->priv->format;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue