mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 08:11:16 +00:00
libs: utils: remove unused function gst_vaapi_get_surface_formats()
This commit is contained in:
parent
6376e7e2bd
commit
4851959da8
2 changed files with 0 additions and 65 deletions
|
@ -121,66 +121,6 @@ error:
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_get_surface_formats:
|
||||
* @display: a #GstVaapiDisplay
|
||||
* @config: a #VAConfigID
|
||||
*
|
||||
* Gets surface formats for the supplied config.
|
||||
*
|
||||
* This function will query for all the supported formats for the
|
||||
* supplied VA @config.
|
||||
*
|
||||
* Return value: (transfer full): a #GArray of #GstVideoFormats or %NULL
|
||||
*/
|
||||
GArray *
|
||||
gst_vaapi_get_surface_formats (GstVaapiDisplay * display, VAConfigID config)
|
||||
{
|
||||
VASurfaceAttrib *surface_attribs;
|
||||
guint i, num_surface_attribs = 0;
|
||||
GArray *formats;
|
||||
|
||||
surface_attribs =
|
||||
get_surface_attributes (display, config, &num_surface_attribs);
|
||||
if (!surface_attribs)
|
||||
return NULL;
|
||||
|
||||
formats = g_array_sized_new (FALSE, FALSE, sizeof (GstVideoFormat),
|
||||
num_surface_attribs);
|
||||
if (!formats)
|
||||
goto error;
|
||||
|
||||
for (i = 0; i < num_surface_attribs; i++) {
|
||||
const VASurfaceAttrib *const attrib = &surface_attribs[i];
|
||||
GstVideoFormat fmt;
|
||||
|
||||
if (attrib->type != VASurfaceAttribPixelFormat)
|
||||
continue;
|
||||
if (!(attrib->flags & VA_SURFACE_ATTRIB_SETTABLE))
|
||||
continue;
|
||||
|
||||
fmt = gst_vaapi_video_format_from_va_fourcc (attrib->value.value.i);
|
||||
if (fmt == GST_VIDEO_FORMAT_UNKNOWN)
|
||||
continue;
|
||||
g_array_append_val (formats, fmt);
|
||||
}
|
||||
|
||||
if (formats->len == 0) {
|
||||
g_array_unref (formats);
|
||||
formats = NULL;
|
||||
}
|
||||
|
||||
g_free (surface_attribs);
|
||||
return formats;
|
||||
|
||||
/* ERRORS */
|
||||
error:
|
||||
{
|
||||
g_free (surface_attribs);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_config_surface_attribures_get:
|
||||
* @display: a #GstVaapiDisplay
|
||||
|
|
|
@ -59,11 +59,6 @@ gboolean
|
|||
gst_vaapi_get_config_attribute (GstVaapiDisplay * display, VAProfile profile,
|
||||
VAEntrypoint entrypoint, VAConfigAttribType type, guint * out_value_ptr);
|
||||
|
||||
/* Gets the available GstVideoFormats of a surface in a VAConfig */
|
||||
G_GNUC_INTERNAL
|
||||
GArray *
|
||||
gst_vaapi_get_surface_formats (GstVaapiDisplay * display, VAConfigID config);
|
||||
|
||||
G_GNUC_INTERNAL
|
||||
GstVaapiConfigSurfaceAttributes *
|
||||
gst_vaapi_config_surface_attributes_get (GstVaapiDisplay * display, VAConfigID config);
|
||||
|
|
Loading…
Reference in a new issue