mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +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
|
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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue