summaryrefslogtreecommitdiff
path: root/gst-libs/gst
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-08-27 19:00:37 +0200
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-08-27 19:00:37 +0200
commit1069ce433fa37bdc80e284c21010b48e4122f6f9 (patch)
tree67dacde7d2794fd0f4b3d8fc5a1b6744773769cc /gst-libs/gst
parentc899947e17b250a70d26332210314f31934823a3 (diff)
display: fix gst_vaapi_display_has_property().
Append the "render-mode" and "rotation" properties, should they be supported by the underlying VA driver.
Diffstat (limited to 'gst-libs/gst')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidisplay.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay.c b/gst-libs/gst/vaapi/gstvaapidisplay.c
index a212a106..6ef4ae9b 100644
--- a/gst-libs/gst/vaapi/gstvaapidisplay.c
+++ b/gst-libs/gst/vaapi/gstvaapidisplay.c
@@ -51,6 +51,10 @@ struct _GstVaapiProperty {
VADisplayAttribute attribute;
};
+/* XXX: export property names when the API is stable enough */
+#define GST_VAAPI_DISPLAY_PROP_RENDER_MODE "render-mode"
+#define GST_VAAPI_DISPLAY_PROP_ROTATION "rotation"
+
enum {
PROP_0,
@@ -580,12 +584,24 @@ gst_vaapi_display_create(GstVaapiDisplay *display)
GST_DEBUG(" %s", string_of_VADisplayAttributeType(attr->type));
switch (attr->type) {
+#if !VA_CHECK_VERSION(0,34,0)
+ case VADisplayAttribDirectSurface:
+ prop.name = GST_VAAPI_DISPLAY_PROP_RENDER_MODE;
+ break;
+#endif
+ case VADisplayAttribRenderMode:
+ prop.name = GST_VAAPI_DISPLAY_PROP_RENDER_MODE;
+ break;
+ case VADisplayAttribRotation:
+ prop.name = GST_VAAPI_DISPLAY_PROP_ROTATION;
+ break;
default:
- prop.attribute.flags = 0;
+ prop.name = NULL;
break;
}
- if (!prop.attribute.flags)
+ if (!prop.name)
continue;
+ prop.attribute = *attr;
g_array_append_val(priv->properties, prop);
}