summaryrefslogtreecommitdiff
path: root/gst-libs/gst
diff options
context:
space:
mode:
authorYan Yin <yan.yin@intel.com>2012-07-31 18:22:48 +0800
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-08-01 18:27:37 +0200
commita72d10ca0ed086f8812af8aa83a1dbe087c8789c (patch)
treeeffb5437ab8eb70f88d0d247b28625af226d74dd /gst-libs/gst
parentdfff02689c895bda679ad035e62b8bb04abf2a69 (diff)
utils: add string_of_VADisplayAttributeType() helper.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Diffstat (limited to 'gst-libs/gst')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiutils.c36
-rw-r--r--gst-libs/gst/vaapi/gstvaapiutils.h5
2 files changed, 41 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiutils.c b/gst-libs/gst/vaapi/gstvaapiutils.c
index 8d5aeccf..41682a98 100644
--- a/gst-libs/gst/vaapi/gstvaapiutils.c
+++ b/gst-libs/gst/vaapi/gstvaapiutils.c
@@ -166,6 +166,42 @@ const char *string_of_VAEntrypoint(VAEntrypoint entrypoint)
return "<unknown>";
}
+/* Return a string representation of a VADisplayAttributeType */
+const char *
+string_of_VADisplayAttributeType(VADisplayAttribType attribute_type)
+{
+ switch (attribute_type) {
+#define MAP(attribute_type) \
+ STRCASEP(VADisplayAttrib, attribute_type)
+ MAP(Brightness);
+ MAP(Contrast);
+ MAP(Hue);
+ MAP(Saturation);
+ MAP(BackgroundColor);
+#if !VA_CHECK_VERSION(0,34,0)
+ MAP(DirectSurface);
+#endif
+ MAP(Rotation);
+ MAP(OutofLoopDeblock);
+#if VA_CHECK_VERSION(0,31,1) && !VA_CHECK_VERSION(0,34,0)
+ MAP(BLEBlackMode);
+ MAP(BLEWhiteMode);
+ MAP(BlueStretch);
+ MAP(SkinColorCorrection);
+#endif
+ MAP(CSCMatrix);
+ MAP(BlendColor);
+ MAP(OverlayAutoPaintColorKey);
+ MAP(OverlayColorKey);
+ MAP(RenderMode);
+ MAP(RenderDevice);
+ MAP(RenderRect);
+#undef MAP
+ default: break;
+ }
+ return "<unknown>";
+}
+
/**
* from_GstVaapiSurfaceRenderFlags:
* @flags: the #GstVaapiSurfaceRenderFlags
diff --git a/gst-libs/gst/vaapi/gstvaapiutils.h b/gst-libs/gst/vaapi/gstvaapiutils.h
index 9ee74f19..644fd584 100644
--- a/gst-libs/gst/vaapi/gstvaapiutils.h
+++ b/gst-libs/gst/vaapi/gstvaapiutils.h
@@ -68,6 +68,11 @@ const char *string_of_VAProfile(VAProfile profile);
G_GNUC_INTERNAL
const char *string_of_VAEntrypoint(VAEntrypoint entrypoint);
+/* Return a string representation of a VADisplayAttributeType */
+G_GNUC_INTERNAL
+const char *
+string_of_VADisplayAttributeType(VADisplayAttribType attribute_type);
+
G_GNUC_INTERNAL
guint
from_GstVaapiSurfaceRenderFlags(guint flags);