diff options
author | Sreerenj Balachandran <sreerenj.balachandran@intel.com> | 2012-08-08 17:10:28 +0300 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2012-08-21 10:24:45 +0100 |
commit | c803ca4af55520e8eb7c69911491ae118c3a4fd8 (patch) | |
tree | 15259e2cbc174dbd126692e0fdbf8f5b8c00c120 /ext/wayland/gstwaylandsink.h | |
parent | 38c749ca2fee21d66ff6bae848146007fbd0e52e (diff) | |
download | gstreamer-plugins-bad-c803ca4af55520e8eb7c69911491ae118c3a4fd8.tar.gz |
wayland: More fixes based on wayland-0.95.0 and gstreamer-1.0 apis
- bump wayland version to 0.95.0 which will lead to stable 1.0 release
- avoid memcopy and use propose_allocation for GstBufferPool allocation
- using WaylandBufferPool
- shm: Allocate shm buffers through new wl_shm_pool interface
(the shm buffer allocation is a two step process now: first
allocate a wl_shm_pool, then allocate a buffer from the pool)
https://bugzilla.gnome.org/show_bug.cgi?id=681453
Diffstat (limited to 'ext/wayland/gstwaylandsink.h')
-rw-r--r-- | ext/wayland/gstwaylandsink.h | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/ext/wayland/gstwaylandsink.h b/ext/wayland/gstwaylandsink.h index abef5e6f0..1a278e91c 100644 --- a/ext/wayland/gstwaylandsink.h +++ b/ext/wayland/gstwaylandsink.h @@ -38,6 +38,7 @@ #include <gst/gst.h> #include <gst/video/video.h> #include <gst/video/gstvideosink.h> +#include <gst/video/gstvideometa.h> #include <wayland-client.h> @@ -70,29 +71,23 @@ struct window int width, height; struct wl_surface *surface; struct wl_shell_surface *shell_surface; + struct wl_buffer *buffer; + struct wl_callback *callback; + guint redraw_pending :1; + +}; + +struct shm_pool { + struct wl_shm_pool *pool; + size_t size; + size_t used; + void *data; }; typedef struct _GstWaylandSink GstWaylandSink; typedef struct _GstWaylandSinkClass GstWaylandSinkClass; -typedef struct _GstWlMeta GstWlMeta; - -GType gst_wl_meta_api_get_type (void); -#define GST_WL_META_API_TYPE (gst_wl_meta_api_get_type()) -const GstMetaInfo * gst_wl_meta_get_info (void); -#define GST_WL_META_INFO (gst_wl_meta_get_info()) - -#define gst_buffer_get_wl_meta(b) ((GstWlMeta*)gst_buffer_get_meta((b),GST_WL_META_API_TYPE)) - -struct _GstWlMeta { - GstMeta meta; - - GstWaylandSink *sink; - - struct wl_buffer *wbuffer; - void *data; - size_t size; -}; +#include "waylandpool.h" struct _GstWaylandSink { @@ -100,15 +95,14 @@ struct _GstWaylandSink struct display *display; struct window *window; - struct wl_callback *callback; + struct shm_pool *shm_pool; + + GstBufferPool *pool; GMutex wayland_lock; gint video_width; gint video_height; - guint bpp; - - gboolean render_busy; }; struct _GstWaylandSinkClass |