video-overlay: change input param data type for setting wl_surface_id
[platform/upstream/gst-plugins-base.git] / gst-libs / gst / video / videooverlay.h
1 /* GStreamer Video Overlay Interface
2  * Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
3  * Copyright (C) 2003 Julien Moutte <julien@moutte.net>
4  * Copyright (C) 2011 Tim-Philipp Müller <tim@centricular.net>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21
22 #ifndef __GST_VIDEO_OVERLAY_H__
23 #define __GST_VIDEO_OVERLAY_H__
24
25 #include <gst/gst.h>
26
27 G_BEGIN_DECLS
28
29 #define GST_TYPE_VIDEO_OVERLAY \
30     (gst_video_overlay_get_type ())
31 #define GST_VIDEO_OVERLAY(obj) \
32     (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VIDEO_OVERLAY, GstVideoOverlay))
33 #define GST_IS_VIDEO_OVERLAY(obj) \
34     (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VIDEO_OVERLAY))
35 #define GST_VIDEO_OVERLAY_GET_INTERFACE(inst) \
36     (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_VIDEO_OVERLAY, GstVideoOverlayInterface))
37
38 /**
39  * GstVideoOverlay:
40  *
41  * Opaque #GstVideoOverlay interface structure
42  */
43 typedef struct _GstVideoOverlay GstVideoOverlay;
44 typedef struct _GstVideoOverlayInterface GstVideoOverlayInterface;
45
46 /**
47  * GstVideoOverlayInterface:
48  * @iface: parent interface type.
49  * @expose: virtual method to handle expose events
50  * @handle_events: virtual method to handle events
51  * @set_render_rectangle: virtual method to set the render rectangle
52  * @set_window_handle: virtual method to configure the window handle
53  *
54  * #GstVideoOverlay interface
55  */
56 struct _GstVideoOverlayInterface {
57   GTypeInterface iface;
58
59   /* virtual functions */
60   void (*expose)               (GstVideoOverlay *overlay);
61
62   void (*handle_events)        (GstVideoOverlay *overlay, gboolean handle_events);
63
64   void (*set_render_rectangle) (GstVideoOverlay *overlay,
65                                 gint x, gint y,
66                                 gint width, gint height);
67
68   void (*set_window_handle)    (GstVideoOverlay *overlay, guintptr handle);
69
70   void (*set_wl_window_wl_surface_id)   (GstVideoOverlay * overlay, gint wl_surface_id);
71
72   void (*set_display_roi_area) (GstVideoOverlay *overlay,
73                                 gint x, gint y,
74                                 gint width, gint height);
75
76   void (*set_video_roi_area)   (GstVideoOverlay *overlay,
77                                 gdouble x_scale, gdouble y_scale,
78                                 gdouble w_scale, gdouble h_scale);
79 };
80
81 GType   gst_video_overlay_get_type (void);
82
83 /* virtual function wrappers */
84
85 gboolean        gst_video_overlay_set_render_rectangle  (GstVideoOverlay * overlay,
86                                                          gint              x,
87                                                          gint              y,
88                                                          gint              width,
89                                                          gint              height);
90
91 void            gst_video_overlay_expose                (GstVideoOverlay * overlay);
92
93 void            gst_video_overlay_handle_events         (GstVideoOverlay * overlay,
94                                                          gboolean          handle_events);
95
96 void            gst_video_overlay_set_window_handle     (GstVideoOverlay * overlay,
97                                                          guintptr handle);
98
99 /* public methods to dispatch bus messages */
100 void            gst_video_overlay_got_window_handle     (GstVideoOverlay * overlay,
101                                                          guintptr          handle);
102
103 void            gst_video_overlay_prepare_window_handle (GstVideoOverlay * overlay);
104
105 gboolean        gst_is_video_overlay_prepare_window_handle_message (GstMessage * msg);
106
107 void gst_video_overlay_set_wl_window_wl_surface_id (GstVideoOverlay * overlay,
108     gint wl_surface_id);
109
110 gboolean gst_video_overlay_set_display_roi_area         (GstVideoOverlay * overlay,
111                                                          gint x, gint y,
112                                                          gint width, gint height);
113 gboolean gst_video_overlay_set_video_roi_area           (GstVideoOverlay * overlay,
114                                                          gdouble x_scale, gdouble y_scale,
115                                                          gdouble w_scale, gdouble h_scale);
116
117 G_END_DECLS
118
119 #endif /* __GST_VIDEO_OVERLAY_H__ */