9c3812f7b4b569217d1704436899195d0e44596c
[profile/ivi/gstreamer-vaapi.git] / gst / vaapi / gstvaapipluginutil.h
1 /*
2  *  gstvaapipluginutil.h - VA-API plugins private helper
3  *
4  *  Copyright (C) 2011-2012 Intel Corporation
5  *  Copyright (C) 2011 Collabora
6  *    Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
7  *
8  *  This library is free software; you can redistribute it and/or
9  *  modify it under the terms of the GNU Lesser General Public License
10  *  as published by the Free Software Foundation; either version 2.1
11  *  of the License, or (at your option) any later version.
12  *
13  *  This library is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  *  Lesser General Public License for more details.
17  *
18  *  You should have received a copy of the GNU Lesser General Public
19  *  License along with this library; if not, write to the Free
20  *  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  *  Boston, MA 02110-1301 USA
22  */
23
24 #ifndef GST_VAAPI_PLUGIN_UTIL_H
25 #define GST_VAAPI_PLUGIN_UTIL_H
26
27 #include <gst/vaapi/gstvaapidisplay.h>
28
29 /**
30  * GstVaapiDisplayType:
31  * @GST_VAAPI_DISPLAY_TYPE_AUTO: Automatic detection of the display type.
32  * @GST_VAAPI_DISPLAY_TYPE_X11: VA/X11 display.
33  * @GST_VAAPI_DISPLAY_TYPE_GLX: VA/GLX display.
34  */
35 typedef enum _GstVaapiDisplayType GstVaapiDisplayType;
36 enum _GstVaapiDisplayType {
37     GST_VAAPI_DISPLAY_TYPE_AUTO = 0,
38     GST_VAAPI_DISPLAY_TYPE_X11,
39     GST_VAAPI_DISPLAY_TYPE_GLX,
40 };
41
42 #define GST_VAAPI_TYPE_DISPLAY_TYPE \
43     gst_vaapi_display_type_get_type()
44
45 GType
46 gst_vaapi_display_type_get_type(void) G_GNUC_CONST;
47
48 gboolean
49 gst_vaapi_ensure_display(gpointer element, GstVaapiDisplay **display);
50
51 void
52 gst_vaapi_set_display(
53     const gchar      *type,
54     const GValue     *value,
55     GstVaapiDisplay **display
56 );
57
58 gboolean
59 gst_vaapi_reply_to_query(GstQuery *query, GstVaapiDisplay *display);
60
61 gboolean
62 gst_vaapi_append_surface_caps (GstCaps *out_caps, GstCaps *in_caps);
63
64 #endif /* GST_VAAPI_PLUGIN_UTIL_H */