mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
va: remove unused parameters in internal function
gst_va_buffer_surface_new() don't use neither format, width nor height. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4768>
This commit is contained in:
parent
c46805cb0d
commit
e074cb55f7
1 changed files with 4 additions and 11 deletions
|
@ -132,8 +132,7 @@ gst_va_buffer_surface_unref (gpointer data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstVaBufferSurface *
|
static GstVaBufferSurface *
|
||||||
gst_va_buffer_surface_new (VASurfaceID surface, GstVideoFormat format,
|
gst_va_buffer_surface_new (VASurfaceID surface)
|
||||||
gint width, gint height)
|
|
||||||
{
|
{
|
||||||
GstVaBufferSurface *buf = g_new (GstVaBufferSurface, 1);
|
GstVaBufferSurface *buf = g_new (GstVaBufferSurface, 1);
|
||||||
|
|
||||||
|
@ -624,7 +623,7 @@ gst_va_dmabuf_allocator_setup_buffer_full (GstAllocator * allocator,
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
buf = gst_va_buffer_surface_new (surface, format, desc.width, desc.height);
|
buf = gst_va_buffer_surface_new (surface);
|
||||||
if (G_UNLIKELY (info)) {
|
if (G_UNLIKELY (info)) {
|
||||||
*info = self->info;
|
*info = self->info;
|
||||||
GST_VIDEO_INFO_SIZE (info) = 0;
|
GST_VIDEO_INFO_SIZE (info) = 0;
|
||||||
|
@ -1048,8 +1047,7 @@ gst_va_dmabuf_memories_setup (GstVaDisplay * display, GstVideoInfo * info,
|
||||||
GST_LOG_OBJECT (display, "Created surface %#x [%dx%d]", surface,
|
GST_LOG_OBJECT (display, "Created surface %#x [%dx%d]", surface,
|
||||||
ext_buf.width, ext_buf.height);
|
ext_buf.width, ext_buf.height);
|
||||||
|
|
||||||
buf = gst_va_buffer_surface_new (surface, rt_format, ext_buf.width,
|
buf = gst_va_buffer_surface_new (surface);
|
||||||
ext_buf.height);
|
|
||||||
buf->display = gst_object_ref (display);
|
buf->display = gst_object_ref (display);
|
||||||
buf->n_mems = n_planes;
|
buf->n_mems = n_planes;
|
||||||
memcpy (buf->mems, mem, sizeof (buf->mems));
|
memcpy (buf->mems, mem, sizeof (buf->mems));
|
||||||
|
@ -2037,7 +2035,6 @@ gst_va_buffer_create_aux_surface (GstBuffer * buffer)
|
||||||
VASurfaceID surface = VA_INVALID_ID;
|
VASurfaceID surface = VA_INVALID_ID;
|
||||||
GstVaDisplay *display = NULL;
|
GstVaDisplay *display = NULL;
|
||||||
GstVideoFormat format;
|
GstVideoFormat format;
|
||||||
gint width, height;
|
|
||||||
GstVaBufferSurface *surface_buffer;
|
GstVaBufferSurface *surface_buffer;
|
||||||
|
|
||||||
mem = gst_buffer_peek_memory (buffer, 0);
|
mem = gst_buffer_peek_memory (buffer, 0);
|
||||||
|
@ -2067,8 +2064,6 @@ gst_va_buffer_create_aux_surface (GstBuffer * buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
display = self->display;
|
display = self->display;
|
||||||
width = GST_VIDEO_INFO_WIDTH (&self->info);
|
|
||||||
height = GST_VIDEO_INFO_HEIGHT (&self->info);
|
|
||||||
if (!va_create_surfaces (self->display, rt_format, fourcc,
|
if (!va_create_surfaces (self->display, rt_format, fourcc,
|
||||||
GST_VIDEO_INFO_WIDTH (&self->info),
|
GST_VIDEO_INFO_WIDTH (&self->info),
|
||||||
GST_VIDEO_INFO_HEIGHT (&self->info), self->usage_hint, NULL,
|
GST_VIDEO_INFO_HEIGHT (&self->info), self->usage_hint, NULL,
|
||||||
|
@ -2083,8 +2078,6 @@ gst_va_buffer_create_aux_surface (GstBuffer * buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
display = self->display;
|
display = self->display;
|
||||||
width = GST_VIDEO_INFO_WIDTH (&self->info);
|
|
||||||
height = GST_VIDEO_INFO_HEIGHT (&self->info);
|
|
||||||
format = GST_VIDEO_INFO_FORMAT (&self->info);
|
format = GST_VIDEO_INFO_FORMAT (&self->info);
|
||||||
if (!va_create_surfaces (self->display, self->rt_format, self->fourcc,
|
if (!va_create_surfaces (self->display, self->rt_format, self->fourcc,
|
||||||
GST_VIDEO_INFO_WIDTH (&self->info),
|
GST_VIDEO_INFO_WIDTH (&self->info),
|
||||||
|
@ -2098,7 +2091,7 @@ gst_va_buffer_create_aux_surface (GstBuffer * buffer)
|
||||||
if (!display || surface == VA_INVALID_ID)
|
if (!display || surface == VA_INVALID_ID)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
surface_buffer = gst_va_buffer_surface_new (surface, format, width, height);
|
surface_buffer = gst_va_buffer_surface_new (surface);
|
||||||
surface_buffer->display = gst_object_ref (display);
|
surface_buffer->display = gst_object_ref (display);
|
||||||
g_atomic_int_add (&surface_buffer->ref_count, 1);
|
g_atomic_int_add (&surface_buffer->ref_count, 1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue