summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2019-12-19 18:26:10 +0100
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2019-12-20 05:01:07 +0000
commite398f2c24571fdc5c4a8256fddedbee2d26e515f (patch)
tree072365ccb49c210765e5766358a4e445f8ce91ec
parent84cc6f31a56aa9a0fa8774af92c3c0d5f8954e8a (diff)
libs: surface: rename create function names to init
There are several internal functions with 'create' name, but they don't create any new structure, but rather it initializes that structure. Renaming those function to reflect better their purpose.
-rw-r--r--gst-libs/gst/vaapi/gstvaapisurface.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapisurface.c b/gst-libs/gst/vaapi/gstvaapisurface.c
index 4ca6c6d8..e206229d 100644
--- a/gst-libs/gst/vaapi/gstvaapisurface.c
+++ b/gst-libs/gst/vaapi/gstvaapisurface.c
@@ -91,7 +91,7 @@ gst_vaapi_surface_destroy (GstVaapiSurface * surface)
}
static gboolean
-gst_vaapi_surface_create (GstVaapiSurface * surface,
+gst_vaapi_surface_init (GstVaapiSurface * surface,
GstVaapiChromaType chroma_type, guint width, guint height)
{
GstVaapiDisplay *const display = GST_VAAPI_OBJECT_DISPLAY (surface);
@@ -126,7 +126,7 @@ error_unsupported_chroma_type:
}
static gboolean
-gst_vaapi_surface_create_full (GstVaapiSurface * surface,
+gst_vaapi_surface_init_full (GstVaapiSurface * surface,
const GstVideoInfo * vip, guint flags)
{
GstVaapiDisplay *const display = GST_VAAPI_OBJECT_DISPLAY (surface);
@@ -218,7 +218,7 @@ error_unsupported_format:
}
static gboolean
-gst_vaapi_surface_create_from_buffer_proxy (GstVaapiSurface * surface,
+gst_vaapi_surface_init_from_buffer_proxy (GstVaapiSurface * surface,
GstVaapiBufferProxy * proxy, const GstVideoInfo * vip)
{
GstVaapiDisplay *const display = GST_VAAPI_OBJECT_DISPLAY (surface);
@@ -339,7 +339,7 @@ gst_vaapi_surface_new_from_formats (GstVaapiDisplay * display,
surface = gst_vaapi_object_new (gst_vaapi_surface_class (), display);
if (!surface)
return NULL;
- if (!gst_vaapi_surface_create (surface, chroma_type, width, height))
+ if (!gst_vaapi_surface_init (surface, chroma_type, width, height))
goto error;
return surface;
@@ -385,10 +385,10 @@ gst_vaapi_surface_new (GstVaapiDisplay * display,
surface_format = gst_vaapi_video_format_from_chroma (chroma_type);
gst_video_info_set_format (&vi, surface_format, width, height);
- if (gst_vaapi_surface_create_full (surface, &vi, 0))
+ if (gst_vaapi_surface_init_full (surface, &vi, 0))
return surface;
}
- if (!gst_vaapi_surface_create (surface, chroma_type, width, height))
+ if (!gst_vaapi_surface_init (surface, chroma_type, width, height))
goto error;
return surface;
@@ -427,7 +427,7 @@ gst_vaapi_surface_new_full (GstVaapiDisplay * display,
if (!surface)
return NULL;
- if (!gst_vaapi_surface_create_full (surface, vip, flags))
+ if (!gst_vaapi_surface_init_full (surface, vip, flags))
goto error;
return surface;
@@ -493,7 +493,7 @@ gst_vaapi_surface_new_from_buffer_proxy (GstVaapiDisplay * display,
if (!surface)
return NULL;
- if (!gst_vaapi_surface_create_from_buffer_proxy (surface, proxy, info))
+ if (!gst_vaapi_surface_init_from_buffer_proxy (surface, proxy, info))
goto error;
return surface;