diff options
author | Yan Yin <yan.yin@intel.com> | 2012-07-31 18:24:14 +0800 |
---|---|---|
committer | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2012-08-01 18:27:38 +0200 |
commit | 8bd3070c51b3cee9900668c38282184e71b41ed1 (patch) | |
tree | f2652c4cffd3d708c4e119477d51f60db2630559 | |
parent | a72d10ca0ed086f8812af8aa83a1dbe087c8789c (diff) |
display: query for supported display attributes.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidisplay.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay.c b/gst-libs/gst/vaapi/gstvaapidisplay.c index 6f9c75f4..90d695e6 100644 --- a/gst-libs/gst/vaapi/gstvaapidisplay.c +++ b/gst-libs/gst/vaapi/gstvaapidisplay.c @@ -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); |