7b7cbfee26b747af68dafdb830e9f12ca69d7020
[platform/upstream/gstreamer-vaapi.git] / gst-libs / gst / vaapi / gstvaapiwindow.h
1 /*
2  *  gstvaapiwindow.h - VA window abstraction
3  *
4  *  Copyright (C) 2010-2011 Splitted-Desktop Systems
5  *    Author: Gwenole Beauchesne <gwenole.beauchesne@splitted-desktop.com>
6  *  Copyright (C) 2012-2013 Intel Corporation
7  *    Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
8  *
9  *  This library is free software; you can redistribute it and/or
10  *  modify it under the terms of the GNU Lesser General Public License
11  *  as published by the Free Software Foundation; either version 2.1
12  *  of the License, or (at your option) any later version.
13  *
14  *  This library is distributed in the hope that it will be useful,
15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  *  Lesser General Public License for more details.
18  *
19  *  You should have received a copy of the GNU Lesser General Public
20  *  License along with this library; if not, write to the Free
21  *  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22  *  Boston, MA 02110-1301 USA
23  */
24
25 #ifndef GST_VAAPI_WINDOW_H
26 #define GST_VAAPI_WINDOW_H
27
28 #include <gst/video/gstvideosink.h>
29 #include <gst/vaapi/gstvaapitypes.h>
30 #include <gst/vaapi/gstvaapiobject.h>
31 #include <gst/vaapi/gstvaapidisplay.h>
32 #include <gst/vaapi/gstvaapisurface.h>
33 #include <gst/vaapi/gstvaapipixmap.h>
34
35 G_BEGIN_DECLS
36
37 #define GST_VAAPI_WINDOW(obj) \
38     ((GstVaapiWindow *)(obj))
39
40 typedef struct _GstVaapiWindow GstVaapiWindow;
41 typedef struct _GstVaapiWindowClass GstVaapiWindowClass;
42
43 GstVaapiWindow *
44 gst_vaapi_window_ref (GstVaapiWindow * window);
45
46 void
47 gst_vaapi_window_unref (GstVaapiWindow * window);
48
49 void
50 gst_vaapi_window_replace (GstVaapiWindow ** old_window_ptr,
51     GstVaapiWindow * new_window);
52
53 GstVaapiDisplay *
54 gst_vaapi_window_get_display (GstVaapiWindow * window);
55
56 void
57 gst_vaapi_window_show (GstVaapiWindow * window);
58
59 void
60 gst_vaapi_window_hide (GstVaapiWindow * window);
61
62 gboolean
63 gst_vaapi_window_get_fullscreen (GstVaapiWindow * window);
64
65 void
66 gst_vaapi_window_set_fullscreen (GstVaapiWindow * window, gboolean fullscreen);
67
68 guint
69 gst_vaapi_window_get_width (GstVaapiWindow * window);
70
71 guint
72 gst_vaapi_window_get_height (GstVaapiWindow * window);
73
74 void
75 gst_vaapi_window_get_size (GstVaapiWindow * window, guint * width_ptr,
76     guint * height_ptr);
77
78 void
79 gst_vaapi_window_set_width (GstVaapiWindow * window, guint width);
80
81 void
82 gst_vaapi_window_set_height (GstVaapiWindow * window, guint height);
83
84 void
85 gst_vaapi_window_set_size (GstVaapiWindow * window, guint width, guint height);
86
87 gboolean
88 gst_vaapi_window_put_surface (GstVaapiWindow * window,
89     GstVaapiSurface * surface, const GstVaapiRectangle * src_rect,
90     const GstVaapiRectangle * dst_rect, guint flags);
91
92 gboolean
93 gst_vaapi_window_put_pixmap (GstVaapiWindow * window, GstVaapiPixmap * pixmap,
94     const GstVaapiRectangle * src_rect, const GstVaapiRectangle * dst_rect);
95
96 G_END_DECLS
97
98 #endif /* GST_VAAPI_WINDOW_H */