mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
surfaceproxy: minor clean-ups.
This commit is contained in:
parent
51d028a628
commit
9dcf082002
1 changed files with 5 additions and 6 deletions
|
@ -77,19 +77,18 @@ gst_vaapi_surface_proxy_class(void)
|
||||||
GstVaapiSurfaceProxy *
|
GstVaapiSurfaceProxy *
|
||||||
gst_vaapi_surface_proxy_new(GstVaapiContext *context, GstVaapiSurface *surface)
|
gst_vaapi_surface_proxy_new(GstVaapiContext *context, GstVaapiSurface *surface)
|
||||||
{
|
{
|
||||||
GstVaapiMiniObject *object;
|
|
||||||
GstVaapiSurfaceProxy *proxy;
|
GstVaapiSurfaceProxy *proxy;
|
||||||
|
|
||||||
g_return_val_if_fail(GST_VAAPI_IS_CONTEXT(context), NULL);
|
g_return_val_if_fail(GST_VAAPI_IS_CONTEXT(context), NULL);
|
||||||
g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), NULL);
|
g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), NULL);
|
||||||
|
|
||||||
object = gst_vaapi_mini_object_new(gst_vaapi_surface_proxy_class());
|
proxy = (GstVaapiSurfaceProxy *)
|
||||||
if (!object)
|
gst_vaapi_mini_object_new(gst_vaapi_surface_proxy_class());
|
||||||
|
if (!proxy)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
proxy = GST_VAAPI_SURFACE_PROXY(object);
|
proxy->context = g_object_ref(context);
|
||||||
gst_vaapi_surface_proxy_set_context(proxy, context);
|
proxy->surface = g_object_ref(surface);
|
||||||
gst_vaapi_surface_proxy_set_surface(proxy, surface);
|
|
||||||
return proxy;
|
return proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue