Tizen 2.0 Release
[framework/multimedia/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 G_GNUC_INTERNAL
30 gboolean
31 gst_vaapi_ensure_display(
32     gpointer             element,
33     GstVaapiDisplayType  display_type,
34     GstVaapiDisplay    **display
35 );
36
37 G_GNUC_INTERNAL
38 void
39 gst_vaapi_set_display(
40     const gchar      *type,
41     const GValue     *value,
42     GstVaapiDisplay **display
43 );
44
45 G_GNUC_INTERNAL
46 gboolean
47 gst_vaapi_reply_to_query(GstQuery *query, GstVaapiDisplay *display);
48
49 G_GNUC_INTERNAL
50 gboolean
51 gst_vaapi_append_surface_caps (GstCaps *out_caps, GstCaps *in_caps);
52
53 #ifndef G_PRIMITIVE_SWAP
54 #define G_PRIMITIVE_SWAP(type, a, b) do {       \
55         const type t = a; a = b; b = t;         \
56     } while (0)
57 #endif
58
59 #endif /* GST_VAAPI_PLUGIN_UTIL_H */