Sebastian Dröge | 1491e03 | 2014-06-22 19:09:53 +0200 | [diff] [blame] | 1 | /* |
| 2 | * GStreamer Wayland Library |
| 3 | * Copyright (C) 2014 Collabora Ltd. |
| 4 | * |
| 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Library General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This library is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Library General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU Library General Public |
| 16 | * License along with this library; if not, write to the |
| 17 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, |
| 18 | * Boston, MA 02110-1301, USA. |
| 19 | */ |
| 20 | |
| 21 | #ifndef __GST_WAYLAND_H__ |
| 22 | #define __GST_WAYLAND_H__ |
| 23 | |
| 24 | #ifndef GST_USE_UNSTABLE_API |
| 25 | #warning "The GStreamer wayland library is unstable API and may change in future." |
| 26 | #warning "You can define GST_USE_UNSTABLE_API to avoid this warning." |
| 27 | #endif |
| 28 | |
| 29 | #include <gst/gst.h> |
| 30 | #include <wayland-client.h> |
| 31 | |
| 32 | G_BEGIN_DECLS |
| 33 | |
| 34 | /* The type of GstContext used to pass the wl_display pointer |
| 35 | * from the application to the sink */ |
| 36 | #define GST_WAYLAND_DISPLAY_HANDLE_CONTEXT_TYPE "GstWaylandDisplayHandleContextType" |
| 37 | |
| 38 | gboolean gst_is_wayland_display_handle_need_context_message (GstMessage * msg); |
| 39 | GstContext * |
| 40 | gst_wayland_display_handle_context_new (struct wl_display * display); |
| 41 | struct wl_display * |
| 42 | gst_wayland_display_handle_context_get_handle (GstContext * context); |
| 43 | |
| 44 | |
| 45 | #define GST_TYPE_WAYLAND_VIDEO \ |
| 46 | (gst_wayland_video_get_type ()) |
| 47 | #define GST_WAYLAND_VIDEO(obj) \ |
| 48 | (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WAYLAND_VIDEO, GstWaylandVideo)) |
| 49 | #define GST_IS_WAYLAND_VIDEO(obj) \ |
| 50 | (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WAYLAND_VIDEO)) |
| 51 | #define GST_WAYLAND_VIDEO_GET_INTERFACE(inst) \ |
| 52 | (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_WAYLAND_VIDEO, GstWaylandVideoInterface)) |
| 53 | |
| 54 | /** |
| 55 | * GstWaylandVideo: |
| 56 | * |
| 57 | * Opaque #GstWaylandVideo interface structure |
| 58 | */ |
| 59 | typedef struct _GstWaylandVideo GstWaylandVideo; |
| 60 | typedef struct _GstWaylandVideoInterface GstWaylandVideoInterface; |
| 61 | |
| 62 | |
| 63 | /** |
| 64 | * GstWaylandVideoInterface: |
| 65 | * @iface: parent interface type. |
| 66 | * |
| 67 | * #GstWaylandVideo interface |
| 68 | */ |
| 69 | struct _GstWaylandVideoInterface { |
| 70 | GTypeInterface iface; |
| 71 | |
| 72 | /* virtual functions */ |
| 73 | void (*begin_geometry_change) (GstWaylandVideo *video); |
| 74 | void (*end_geometry_change) (GstWaylandVideo *video); |
| 75 | }; |
| 76 | |
| 77 | GType gst_wayland_video_get_type (void); |
| 78 | |
| 79 | /* virtual function wrappers */ |
| 80 | void gst_wayland_video_begin_geometry_change (GstWaylandVideo * video); |
| 81 | void gst_wayland_video_end_geometry_change (GstWaylandVideo * video); |
| 82 | |
| 83 | G_END_DECLS |
| 84 | |
| 85 | #endif /* __GST_WAYLAND_H__ */ |