2 * gstvaapiutils.h - VA-API utilities
4 * Copyright (C) 2010-2011 Splitted-Desktop Systems
5 * Copyright (C) 2011-2012 Intel Corporation
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public License
9 * as published by the Free Software Foundation; either version 2.1
10 * of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301 USA
23 #ifndef GST_VAAPI_UTILS_H
24 #define GST_VAAPI_UTILS_H
30 /** Check VA status for success or print out an error */
33 vaapi_check_status(VAStatus status, const char *msg);
38 vaapi_map_buffer(VADisplay dpy, VABufferID buf_id);
40 /** Unmaps VA buffer */
43 vaapi_unmap_buffer(VADisplay dpy, VABufferID buf_id, void **pbuf);
45 /** Creates and maps VA buffer */
58 /** Destroy VA buffer */
61 vaapi_destroy_buffer(VADisplay dpy, VABufferID *buf_id);
63 /** Return a string representation of a VAProfile */
65 const char *string_of_VAProfile(VAProfile profile);
67 /** Return a string representation of a VAEntrypoint */
69 const char *string_of_VAEntrypoint(VAEntrypoint entrypoint);
71 /* Return a string representation of a VADisplayAttributeType */
74 string_of_VADisplayAttributeType(VADisplayAttribType attribute_type);
78 from_GstVaapiSurfaceRenderFlags(guint flags);
82 to_GstVaapiSurfaceStatus(guint va_flags);
86 from_GstVaapiRotation(guint value);
90 to_GstVaapiRotation(guint value);
94 from_GstVaapiRateControl(guint value);
98 to_GstVaapiRateControl(guint value);
102 string_of_VARateControl(guint rate_control);
104 #endif /* GST_VAAPI_UTILS_H */