diff options
author | Yan Yin <yan.yin@intel.com> | 2012-07-31 18:22:48 +0800 |
---|---|---|
committer | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2012-08-03 10:23:39 +0200 |
commit | 068e01c319ca79819bfefc664fd897cacc8cc62a (patch) | |
tree | 9fa0e83329018316998db900600f34015196f947 | |
parent | a31087557844ab4a8414ec8a9560a536ebba325f (diff) | |
download | gst-vaapi-068e01c319ca79819bfefc664fd897cacc8cc62a.tar.gz |
utils: add string_of_VADisplayAttributeType() helper.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiutils.c | 36 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiutils.h | 5 |
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 5c75c8d7..9533994e 100644 --- a/gst-libs/gst/vaapi/gstvaapiutils.h +++ b/gst-libs/gst/vaapi/gstvaapiutils.h @@ -73,6 +73,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); |