Shorter code (and more correct).

This commit is contained in:
gb 2010-03-05 10:07:22 +00:00
parent 372e9f5d4d
commit ffb296984e

View file

@ -277,11 +277,9 @@ gst_vaapi_surface_new(GstVaapiDisplay *display,
VASurfaceID VASurfaceID
gst_vaapi_surface_get_id(GstVaapiSurface *surface) 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); g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), VA_INVALID_SURFACE);
return priv->surface_id; return surface->priv->surface_id;
} }
GstVaapiDisplay * GstVaapiDisplay *
@ -295,29 +293,23 @@ gst_vaapi_surface_get_display(GstVaapiSurface *surface)
guint guint
gst_vaapi_surface_get_width(GstVaapiSurface *surface) gst_vaapi_surface_get_width(GstVaapiSurface *surface)
{ {
GstVaapiSurfacePrivate * const priv = surface->priv;
g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), 0); g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), 0);
return priv->width; return surface->priv->width;
} }
guint guint
gst_vaapi_surface_get_height(GstVaapiSurface *surface) gst_vaapi_surface_get_height(GstVaapiSurface *surface)
{ {
GstVaapiSurfacePrivate * const priv = surface->priv;
g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), 0); g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), 0);
return priv->height; return surface->priv->height;
} }
guint guint
gst_vaapi_surface_get_format(GstVaapiSurface *surface) gst_vaapi_surface_get_format(GstVaapiSurface *surface)
{ {
GstVaapiSurfacePrivate *priv = surface->priv;
g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), 0); g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), 0);
return priv->format; return surface->priv->format;
} }