utils: add string_of_VADisplayAttributeType() helper.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
Yan Yin 2012-07-31 18:22:48 +08:00 committed by Gwenole Beauchesne
parent dfff02689c
commit a72d10ca0e
2 changed files with 41 additions and 0 deletions

View file

@ -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

View file

@ -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);