mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
display: query for supported display attributes.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
parent
a72d10ca0e
commit
8bd3070c51
1 changed files with 17 additions and 0 deletions
|
@ -400,6 +400,7 @@ gst_vaapi_display_create(GstVaapiDisplay *display)
|
|||
GstVaapiDisplayPrivate * const priv = display->priv;
|
||||
GstVaapiDisplayCache *cache;
|
||||
gboolean has_errors = TRUE;
|
||||
VADisplayAttribute *display_attrs = NULL;
|
||||
VAProfile *profiles = NULL;
|
||||
VAEntrypoint *entrypoints = NULL;
|
||||
VAImageFormat *formats = NULL;
|
||||
|
@ -505,6 +506,21 @@ gst_vaapi_display_create(GstVaapiDisplay *display)
|
|||
}
|
||||
append_h263_config(priv->decoders);
|
||||
|
||||
/* VA display attributes */
|
||||
display_attrs =
|
||||
g_new(VADisplayAttribute, vaMaxNumDisplayAttributes(priv->display));
|
||||
if (!display_attrs)
|
||||
goto end;
|
||||
|
||||
n = 0; /* XXX: workaround old GMA500 bug */
|
||||
status = vaQueryDisplayAttributes(priv->display, display_attrs, &n);
|
||||
if (!vaapi_check_status(status, "vaQueryDisplayAttributes()"))
|
||||
goto end;
|
||||
|
||||
GST_DEBUG("%d display attributes", n);
|
||||
for (i = 0; i < n; i++)
|
||||
GST_DEBUG(" %s", string_of_VADisplayAttributeType(display_attrs[i].type));
|
||||
|
||||
/* VA image formats */
|
||||
formats = g_new(VAImageFormat, vaMaxNumImageFormats(priv->display));
|
||||
if (!formats)
|
||||
|
@ -552,6 +568,7 @@ gst_vaapi_display_create(GstVaapiDisplay *display)
|
|||
|
||||
has_errors = FALSE;
|
||||
end:
|
||||
g_free(display_attrs);
|
||||
g_free(profiles);
|
||||
g_free(entrypoints);
|
||||
g_free(formats);
|
||||
|
|
Loading…
Reference in a new issue