From: Hyunil Park Date: Fri, 10 Apr 2015 07:44:37 +0000 (+0900) Subject: [Waylandsink] 1. Add exception code for resetting wl_surface and wl_display X-Git-Tag: accepted/tizen/unified/20220217.153506~2^2~10^2~9^2~12^2~2^2~248 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e4dd4dbd33358d760c219c0e1c4d7f8083c3a20;p=platform%2Fupstream%2Fgstreamer.git [Waylandsink] 1. Add exception code for resetting wl_surface and wl_display 2. Modify pkgconfig, spec and Makefile for Wayland pc file Change-Id: Id600cd70011286714979315cf79b7244beab18a0 Signed-off-by: Hyunil Park --- diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c old mode 100644 new mode 100755 index 365df7c..a572eca --- a/ext/wayland/gstwaylandsink.c +++ b/ext/wayland/gstwaylandsink.c @@ -120,6 +120,7 @@ G_DEFINE_TYPE_WITH_CODE (GstWaylandSink, gst_wayland_sink, GST_TYPE_VIDEO_SINK, static void gst_wayland_sink_class_init (GstWaylandSinkClass * klass) { + FUNCTION_ENTER (); GObjectClass *gobject_class; GstElementClass *gstelement_class; GstBaseSinkClass *gstbasesink_class; @@ -162,6 +163,7 @@ gst_wayland_sink_class_init (GstWaylandSinkClass * klass) static void gst_wayland_sink_init (GstWaylandSink * sink) { + FUNCTION_ENTER (); g_mutex_init (&sink->display_lock); g_mutex_init (&sink->render_lock); } @@ -170,8 +172,9 @@ static void gst_wayland_sink_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { - GstWaylandSink *sink = GST_WAYLAND_SINK (object); + FUNCTION_ENTER (); + GstWaylandSink *sink = GST_WAYLAND_SINK (object); switch (prop_id) { case PROP_DISPLAY: GST_OBJECT_LOCK (sink); @@ -188,8 +191,9 @@ static void gst_wayland_sink_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { - GstWaylandSink *sink = GST_WAYLAND_SINK (object); + FUNCTION_ENTER (); + GstWaylandSink *sink = GST_WAYLAND_SINK (object); switch (prop_id) { case PROP_DISPLAY: GST_OBJECT_LOCK (sink); @@ -205,8 +209,9 @@ gst_wayland_sink_set_property (GObject * object, static void gst_wayland_sink_finalize (GObject * object) { - GstWaylandSink *sink = GST_WAYLAND_SINK (object); + FUNCTION_ENTER (); + GstWaylandSink *sink = GST_WAYLAND_SINK (object); GST_DEBUG_OBJECT (sink, "Finalizing the sink.."); if (sink->last_buffer) @@ -238,6 +243,8 @@ static void gst_wayland_sink_set_display_from_context (GstWaylandSink * sink, GstContext * context) { + FUNCTION_ENTER (); + struct wl_display *display; GError *error = NULL; @@ -255,6 +262,8 @@ gst_wayland_sink_set_display_from_context (GstWaylandSink * sink, static gboolean gst_wayland_sink_find_display (GstWaylandSink * sink) { + FUNCTION_ENTER (); + GstQuery *query; GstMessage *msg; GstContext *context = NULL; @@ -314,6 +323,8 @@ gst_wayland_sink_find_display (GstWaylandSink * sink) static GstStateChangeReturn gst_wayland_sink_change_state (GstElement * element, GstStateChange transition) { + FUNCTION_ENTER (); + GstWaylandSink *sink = GST_WAYLAND_SINK (element); GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; @@ -391,18 +402,23 @@ gst_wayland_sink_change_state (GstElement * element, GstStateChange transition) static void gst_wayland_sink_set_context (GstElement * element, GstContext * context) { - GstWaylandSink *sink = GST_WAYLAND_SINK (element); + FUNCTION_ENTER (); + GstWaylandSink *sink = GST_WAYLAND_SINK (element); if (gst_context_has_context_type (context, GST_WAYLAND_DISPLAY_HANDLE_CONTEXT_TYPE)) { g_mutex_lock (&sink->display_lock); - if (G_LIKELY (!sink->display)) + if (G_LIKELY (!sink->display)) { gst_wayland_sink_set_display_from_context (sink, context); - else + } else { GST_WARNING_OBJECT (element, "changing display handle is not supported"); + g_mutex_unlock (&sink->display_lock); + return; + } g_mutex_unlock (&sink->display_lock); } + GST_INFO ("element %p context %p", element, context); if (GST_ELEMENT_CLASS (parent_class)->set_context) GST_ELEMENT_CLASS (parent_class)->set_context (element, context); } @@ -410,9 +426,10 @@ gst_wayland_sink_set_context (GstElement * element, GstContext * context) static GstCaps * gst_wayland_sink_get_caps (GstBaseSink * bsink, GstCaps * filter) { + FUNCTION_ENTER (); + GstWaylandSink *sink; GstCaps *caps; - sink = GST_WAYLAND_SINK (bsink); caps = gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD (sink)); @@ -459,6 +476,8 @@ gst_wayland_sink_get_caps (GstBaseSink * bsink, GstCaps * filter) static gboolean gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) { + FUNCTION_ENTER (); + GstWaylandSink *sink; GstBufferPool *newpool; GstVideoInfo info; @@ -467,7 +486,6 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) gint i; GstStructure *structure; static GstAllocationParams params = { 0, 0, 0, 15, }; - sink = GST_WAYLAND_SINK (bsink); GST_DEBUG_OBJECT (sink, "set caps %" GST_PTR_FORMAT, caps); @@ -530,6 +548,7 @@ pool_failed: config_failed: { GST_DEBUG_OBJECT (bsink, "failed setting config"); + gst_object_unref (newpool); return FALSE; } } @@ -537,6 +556,8 @@ config_failed: static gboolean gst_wayland_sink_propose_allocation (GstBaseSink * bsink, GstQuery * query) { + FUNCTION_ENTER (); + GstWaylandSink *sink = GST_WAYLAND_SINK (bsink); GstBufferPool *pool = NULL; GstStructure *config; @@ -613,6 +634,8 @@ config_failed: static GstFlowReturn gst_wayland_sink_preroll (GstBaseSink * bsink, GstBuffer * buffer) { + FUNCTION_ENTER (); + GST_DEBUG_OBJECT (bsink, "preroll buffer %p", buffer); return gst_wayland_sink_render (bsink, buffer); } @@ -620,6 +643,8 @@ gst_wayland_sink_preroll (GstBaseSink * bsink, GstBuffer * buffer) static void frame_redraw_callback (void *data, struct wl_callback *callback, uint32_t time) { + FUNCTION_ENTER (); + GstWaylandSink *sink = data; GST_LOG ("frame_redraw_cb"); @@ -636,6 +661,8 @@ static const struct wl_callback_listener frame_callback_listener = { static void render_last_buffer (GstWaylandSink * sink) { + FUNCTION_ENTER (); + GstWlMeta *meta; struct wl_surface *surface; struct wl_callback *callback; @@ -664,6 +691,8 @@ render_last_buffer (GstWaylandSink * sink) static GstFlowReturn gst_wayland_sink_render (GstBaseSink * bsink, GstBuffer * buffer) { + FUNCTION_ENTER (); + GstWaylandSink *sink = GST_WAYLAND_SINK (bsink); GstBuffer *to_render; GstWlMeta *meta; @@ -698,7 +727,14 @@ gst_wayland_sink_render (GstBaseSink * bsink, GstBuffer * buffer) if (G_UNLIKELY (sink->video_info_changed)) { gst_wl_window_set_video_info (sink->window, &sink->video_info); sink->video_info_changed = FALSE; + } + GST_INFO ("window->render_rectangle(%d,%d %d x %d)", + sink->window->render_rectangle.x, + sink->window->render_rectangle.y, + sink->window->render_rectangle.w, sink->window->render_rectangle.h); + GST_INFO ("window->surface_width(%d),window->surface_height(%d)", + sink->window->surface_width, sink->window->surface_height); /* now that we have for sure set the video info on the window, it must have * a valid size, otherwise this means that the application has called @@ -777,6 +813,8 @@ done: static void gst_wayland_sink_videooverlay_init (GstVideoOverlayInterface * iface) { + FUNCTION_ENTER (); + iface->set_window_handle = gst_wayland_sink_set_window_handle; iface->set_render_rectangle = gst_wayland_sink_set_render_rectangle; iface->expose = gst_wayland_sink_expose; @@ -785,11 +823,18 @@ gst_wayland_sink_videooverlay_init (GstVideoOverlayInterface * iface) static void gst_wayland_sink_set_window_handle (GstVideoOverlay * overlay, guintptr handle) { + FUNCTION_ENTER (); + GstWaylandSink *sink = GST_WAYLAND_SINK (overlay); struct wl_surface *surface = (struct wl_surface *) handle; g_return_if_fail (sink != NULL); + if (sink->window != NULL) { + GST_WARNING_OBJECT (sink, "changing window handle is not supported"); + return; + } + g_mutex_lock (&sink->render_lock); GST_DEBUG_OBJECT (sink, "Setting window handle %" GST_PTR_FORMAT, @@ -808,6 +853,7 @@ gst_wayland_sink_set_window_handle (GstVideoOverlay * overlay, guintptr handle) "display handle from your application with GstContext")); } else { sink->window = gst_wl_window_new_in_surface (sink->display, surface); + GST_ERROR ("sink->window %p", sink->window); } } else { GST_ERROR_OBJECT (sink, "Failed to find display handle, " @@ -822,6 +868,8 @@ static void gst_wayland_sink_set_render_rectangle (GstVideoOverlay * overlay, gint x, gint y, gint w, gint h) { + FUNCTION_ENTER (); + GstWaylandSink *sink = GST_WAYLAND_SINK (overlay); g_return_if_fail (sink != NULL); @@ -844,6 +892,8 @@ gst_wayland_sink_set_render_rectangle (GstVideoOverlay * overlay, static void gst_wayland_sink_expose (GstVideoOverlay * overlay) { + FUNCTION_ENTER (); + GstWaylandSink *sink = GST_WAYLAND_SINK (overlay); g_return_if_fail (sink != NULL); @@ -861,6 +911,8 @@ gst_wayland_sink_expose (GstVideoOverlay * overlay) static void gst_wayland_sink_waylandvideo_init (GstWaylandVideoInterface * iface) { + FUNCTION_ENTER (); + iface->begin_geometry_change = gst_wayland_sink_begin_geometry_change; iface->end_geometry_change = gst_wayland_sink_end_geometry_change; } @@ -868,6 +920,8 @@ gst_wayland_sink_waylandvideo_init (GstWaylandVideoInterface * iface) static void gst_wayland_sink_begin_geometry_change (GstWaylandVideo * video) { + FUNCTION_ENTER (); + GstWaylandSink *sink = GST_WAYLAND_SINK (video); g_return_if_fail (sink != NULL); @@ -886,6 +940,8 @@ gst_wayland_sink_begin_geometry_change (GstWaylandVideo * video) static void gst_wayland_sink_end_geometry_change (GstWaylandVideo * video) { + FUNCTION_ENTER (); + GstWaylandSink *sink = GST_WAYLAND_SINK (video); g_return_if_fail (sink != NULL); @@ -904,6 +960,8 @@ gst_wayland_sink_end_geometry_change (GstWaylandVideo * video) static gboolean plugin_init (GstPlugin * plugin) { + FUNCTION_ENTER (); + GST_DEBUG_CATEGORY_INIT (gstwayland_debug, "waylandsink", 0, " wayland video sink"); diff --git a/ext/wayland/gstwaylandsink.h b/ext/wayland/gstwaylandsink.h old mode 100644 new mode 100755 index afbed40..5eb56e9 --- a/ext/wayland/gstwaylandsink.h +++ b/ext/wayland/gstwaylandsink.h @@ -31,7 +31,6 @@ #include "wlwindow.h" G_BEGIN_DECLS - #define GST_TYPE_WAYLAND_SINK \ (gst_wayland_sink_get_type()) #define GST_WAYLAND_SINK(obj) \ @@ -44,7 +43,11 @@ G_BEGIN_DECLS (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WAYLAND_SINK)) #define GST_WAYLAND_SINK_GET_CLASS(inst) \ (G_TYPE_INSTANCE_GET_CLASS ((inst), GST_TYPE_WAYLAND_SINK, GstWaylandSinkClass)) - +#if 0 +#define FUNCTION_ENTER() GST_INFO("") +#else +#define FUNCTION_ENTER() +#endif typedef struct _GstWaylandSink GstWaylandSink; typedef struct _GstWaylandSinkClass GstWaylandSinkClass; @@ -72,8 +75,9 @@ struct _GstWaylandSinkClass GstVideoSinkClass parent; }; -GType gst_wayland_sink_get_type (void) G_GNUC_CONST; +GType +gst_wayland_sink_get_type (void) + G_GNUC_CONST; G_END_DECLS - #endif /* __GST_WAYLAND_VIDEO_SINK_H__ */ diff --git a/ext/wayland/wldisplay.c b/ext/wayland/wldisplay.c old mode 100644 new mode 100755 index 46efab9..515951d --- a/ext/wayland/wldisplay.c +++ b/ext/wayland/wldisplay.c @@ -36,6 +36,7 @@ static void gst_wl_display_finalize (GObject * gobject); static void gst_wl_display_class_init (GstWlDisplayClass * klass) { + FUNCTION_ENTER (); GObjectClass *gobject_class = G_OBJECT_CLASS (klass); gobject_class->finalize = gst_wl_display_finalize; } @@ -43,6 +44,8 @@ gst_wl_display_class_init (GstWlDisplayClass * klass) static void gst_wl_display_init (GstWlDisplay * self) { + FUNCTION_ENTER (); + self->formats = g_array_new (FALSE, FALSE, sizeof (uint32_t)); self->wl_fd_poll = gst_poll_new (TRUE); } @@ -50,6 +53,8 @@ gst_wl_display_init (GstWlDisplay * self) static void gst_wl_display_finalize (GObject * gobject) { + FUNCTION_ENTER (); + GstWlDisplay *self = GST_WL_DISPLAY (gobject); gst_poll_set_flushing (self->wl_fd_poll, TRUE); @@ -89,6 +94,8 @@ gst_wl_display_finalize (GObject * gobject) static void sync_callback (void *data, struct wl_callback *callback, uint32_t serial) { + FUNCTION_ENTER (); + gboolean *done = data; *done = TRUE; } @@ -100,6 +107,8 @@ static const struct wl_callback_listener sync_listener = { static gint gst_wl_display_roundtrip (GstWlDisplay * self) { + FUNCTION_ENTER (); + struct wl_callback *callback; gint ret = 0; gboolean done = FALSE; @@ -120,6 +129,8 @@ gst_wl_display_roundtrip (GstWlDisplay * self) static void shm_format (void *data, struct wl_shm *wl_shm, uint32_t format) { + FUNCTION_ENTER (); + GstWlDisplay *self = data; g_array_append_val (self->formats, format); @@ -133,6 +144,8 @@ static void registry_handle_global (void *data, struct wl_registry *registry, uint32_t id, const char *interface, uint32_t version) { + + FUNCTION_ENTER (); GstWlDisplay *self = data; if (g_strcmp0 (interface, "wl_compositor") == 0) { @@ -158,6 +171,8 @@ static const struct wl_registry_listener registry_listener = { static gpointer gst_wl_display_thread_run (gpointer data) { + FUNCTION_ENTER (); + GstWlDisplay *self = data; GstPollFD pollfd = GST_POLL_FD_INIT; @@ -194,6 +209,8 @@ error: GstWlDisplay * gst_wl_display_new (const gchar * name, GError ** error) { + FUNCTION_ENTER (); + struct wl_display *display; display = wl_display_connect (name); @@ -212,6 +229,8 @@ GstWlDisplay * gst_wl_display_new_existing (struct wl_display * display, gboolean take_ownership, GError ** error) { + FUNCTION_ENTER (); + GstWlDisplay *self; GError *err = NULL; gint i; diff --git a/ext/wayland/wldisplay.h b/ext/wayland/wldisplay.h old mode 100644 new mode 100755 index 0224406..83b64c1 --- a/ext/wayland/wldisplay.h +++ b/ext/wayland/wldisplay.h @@ -26,14 +26,17 @@ #include "scaler-client-protocol.h" G_BEGIN_DECLS - #define GST_TYPE_WL_DISPLAY (gst_wl_display_get_type ()) #define GST_WL_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WL_DISPLAY, GstWlDisplay)) #define GST_IS_WL_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WL_DISPLAY)) #define GST_WL_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_WL_DISPLAY, GstWlDisplayClass)) #define GST_IS_WL_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_WL_DISPLAY)) #define GST_WL_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_WL_DISPLAY, GstWlDisplayClass)) - +#if 0 +#define FUNCTION_ENTER() GST_INFO("") +#else +#define FUNCTION_ENTER() +#endif typedef struct _GstWlDisplay GstWlDisplay; typedef struct _GstWlDisplayClass GstWlDisplayClass; @@ -68,9 +71,8 @@ struct _GstWlDisplayClass GType gst_wl_display_get_type (void); GstWlDisplay *gst_wl_display_new (const gchar * name, GError ** error); -GstWlDisplay *gst_wl_display_new_existing (struct wl_display * display, +GstWlDisplay *gst_wl_display_new_existing (struct wl_display *display, gboolean take_ownership, GError ** error); G_END_DECLS - #endif /* __GST_WL_DISPLAY_H__ */ diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c old mode 100644 new mode 100755 index f58df09..cb92409 --- a/ext/wayland/wlwindow.c +++ b/ext/wayland/wlwindow.c @@ -37,6 +37,8 @@ static void handle_ping (void *data, struct wl_shell_surface *shell_surface, uint32_t serial) { + FUNCTION_ENTER (); + wl_shell_surface_pong (shell_surface, serial); } @@ -44,11 +46,15 @@ static void handle_configure (void *data, struct wl_shell_surface *shell_surface, uint32_t edges, int32_t width, int32_t height) { + FUNCTION_ENTER (); + } static void handle_popup_done (void *data, struct wl_shell_surface *shell_surface) { + FUNCTION_ENTER (); + } static const struct wl_shell_surface_listener shell_surface_listener = { @@ -60,6 +66,8 @@ static const struct wl_shell_surface_listener shell_surface_listener = { static void gst_wl_window_class_init (GstWlWindowClass * klass) { + FUNCTION_ENTER (); + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); gobject_class->finalize = gst_wl_window_finalize; } @@ -67,11 +75,15 @@ gst_wl_window_class_init (GstWlWindowClass * klass) static void gst_wl_window_init (GstWlWindow * self) { + FUNCTION_ENTER (); + } static void gst_wl_window_finalize (GObject * gobject) { + FUNCTION_ENTER (); + GstWlWindow *self = GST_WL_WINDOW (gobject); if (self->shell_surface) { @@ -93,6 +105,8 @@ gst_wl_window_finalize (GObject * gobject) static GstWlWindow * gst_wl_window_new_internal (GstWlDisplay * display, struct wl_surface *surface) { + FUNCTION_ENTER (); + GstWlWindow *window; struct wl_region *region; @@ -118,6 +132,8 @@ gst_wl_window_new_internal (GstWlDisplay * display, struct wl_surface *surface) GstWlWindow * gst_wl_window_new_toplevel (GstWlDisplay * display, GstVideoInfo * video_info) { + FUNCTION_ENTER (); + GstWlWindow *window; window = gst_wl_window_new_internal (display, @@ -148,6 +164,8 @@ GstWlWindow * gst_wl_window_new_in_surface (GstWlDisplay * display, struct wl_surface * parent) { + FUNCTION_ENTER (); + GstWlWindow *window; window = gst_wl_window_new_internal (display, @@ -163,6 +181,8 @@ gst_wl_window_new_in_surface (GstWlDisplay * display, GstWlDisplay * gst_wl_window_get_display (GstWlWindow * window) { + FUNCTION_ENTER (); + g_return_val_if_fail (window != NULL, NULL); return g_object_ref (window->display); @@ -171,6 +191,8 @@ gst_wl_window_get_display (GstWlWindow * window) struct wl_surface * gst_wl_window_get_wl_surface (GstWlWindow * window) { + FUNCTION_ENTER (); + g_return_val_if_fail (window != NULL, NULL); return window->surface; @@ -179,6 +201,8 @@ gst_wl_window_get_wl_surface (GstWlWindow * window) gboolean gst_wl_window_is_toplevel (GstWlWindow * window) { + FUNCTION_ENTER (); + g_return_val_if_fail (window != NULL, FALSE); return (window->shell_surface != NULL); @@ -187,7 +211,10 @@ gst_wl_window_is_toplevel (GstWlWindow * window) static void gst_wl_window_resize_internal (GstWlWindow * window, gboolean commit) { - GstVideoRectangle src, res; + FUNCTION_ENTER (); + + GstVideoRectangle src = { 0, }; + GstVideoRectangle res; src.w = window->video_width; src.h = window->video_height; @@ -211,6 +238,8 @@ gst_wl_window_resize_internal (GstWlWindow * window, gboolean commit) void gst_wl_window_set_video_info (GstWlWindow * window, GstVideoInfo * info) { + FUNCTION_ENTER (); + g_return_if_fail (window != NULL); window->video_width = @@ -225,6 +254,8 @@ void gst_wl_window_set_render_rectangle (GstWlWindow * window, gint x, gint y, gint w, gint h) { + FUNCTION_ENTER (); + g_return_if_fail (window != NULL); window->render_rectangle.x = x; diff --git a/ext/wayland/wlwindow.h b/ext/wayland/wlwindow.h old mode 100644 new mode 100755 index f4cb360..9ea99e3 --- a/ext/wayland/wlwindow.h +++ b/ext/wayland/wlwindow.h @@ -25,14 +25,17 @@ #include G_BEGIN_DECLS - #define GST_TYPE_WL_WINDOW (gst_wl_window_get_type ()) #define GST_WL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_WL_WINDOW, GstWlWindow)) #define GST_IS_WL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_WL_WINDOW)) #define GST_WL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_WL_WINDOW, GstWlWindowClass)) #define GST_IS_WL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_WL_WINDOW)) #define GST_WL_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_WL_WINDOW, GstWlWindowClass)) - +#if 0 +#define FUNCTION_ENTER() GST_INFO("") +#else +#define FUNCTION_ENTER() +#endif typedef struct _GstWlWindow GstWlWindow; typedef struct _GstWlWindowClass GstWlWindowClass; @@ -62,19 +65,18 @@ struct _GstWlWindowClass GType gst_wl_window_get_type (void); GstWlWindow *gst_wl_window_new_toplevel (GstWlDisplay * display, - GstVideoInfo * video_info); + GstVideoInfo * video_info); GstWlWindow *gst_wl_window_new_in_surface (GstWlDisplay * display, - struct wl_surface * parent); + struct wl_surface *parent); GstWlDisplay *gst_wl_window_get_display (GstWlWindow * window); struct wl_surface *gst_wl_window_get_wl_surface (GstWlWindow * window); -gboolean gst_wl_window_is_toplevel (GstWlWindow *window); +gboolean gst_wl_window_is_toplevel (GstWlWindow * window); /* functions to manipulate the size on non-toplevel windows */ void gst_wl_window_set_video_info (GstWlWindow * window, GstVideoInfo * info); void gst_wl_window_set_render_rectangle (GstWlWindow * window, gint x, gint y, - gint w, gint h); + gint w, gint h); G_END_DECLS - #endif /* __GST_WL_WINDOW_H__ */ diff --git a/gst-libs/gst/wayland/Makefile.am b/gst-libs/gst/wayland/Makefile.am index 0344598..088ed11 100644 --- a/gst-libs/gst/wayland/Makefile.am +++ b/gst-libs/gst/wayland/Makefile.am @@ -1,9 +1,10 @@ +libgstwaylandincludedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/wayland + lib_LTLIBRARIES = libgstwayland-@GST_API_VERSION@.la -libgstwayland_@GST_API_VERSION@_la_SOURCES = wayland.c +libgstwaylandinclude_HEADERS = wayland.h -libgstwayland_@GST_API_VERSION@includedir = \ - $(includedir)/gstreamer-@GST_API_VERSION@/gst/wayland +libgstwayland_@GST_API_VERSION@_la_SOURCES = wayland.c libgstwayland_@GST_API_VERSION@_la_CFLAGS = \ $(GST_PLUGINS_BAD_CFLAGS) \ @@ -20,7 +21,3 @@ libgstwayland_@GST_API_VERSION@_la_LDFLAGS = \ $(GST_LIB_LDFLAGS) \ $(GST_ALL_LDFLAGS) \ $(GST_LT_LDFLAGS) - -noinst_HEADERS = \ - wayland.h - diff --git a/packaging/gst-plugins-bad.spec b/packaging/gst-plugins-bad.spec index 998086f..054e3be 100644 --- a/packaging/gst-plugins-bad.spec +++ b/packaging/gst-plugins-bad.spec @@ -4,7 +4,7 @@ Name: gst-plugins-bad Version: 1.4.1 -Release: 1 +Release: 2 Summary: GStreamer Streaming-Media Framework Plug-Ins License: GPL-2.0+ and LGPL-2.1+ Group: Multimedia/Framework @@ -187,4 +187,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/gstreamer-plugins-bad-%{gst_branch}.pc %{_libdir}/pkgconfig/gstreamer-insertbin-%{gst_branch}.pc %{_libdir}/pkgconfig/gstreamer-mpegts-%{gst_branch}.pc - +%if %{with wayland} +%{_libdir}/pkgconfig/gstreamer-wayland-%{gst_branch}.pc +%{_includedir}/gstreamer-%{gst_branch}/gst/wayland/wayland.h +%endif diff --git a/pkgconfig/Makefile.am b/pkgconfig/Makefile.am index 3e53a6e..277abf7 100644 --- a/pkgconfig/Makefile.am +++ b/pkgconfig/Makefile.am @@ -1,4 +1,3 @@ - ### all of the standard pc files we need to generate pcverfiles = \ gstreamer-plugins-bad-@GST_API_VERSION@.pc \ @@ -17,6 +16,11 @@ pcverfiles += gstreamer-gl-@GST_API_VERSION@.pc pcverfiles_uninstalled += gstreamer-gl-@GST_API_VERSION@-uninstalled.pc endif +if USE_WAYLAND +pcverfiles += gstreamer-wayland-@GST_API_VERSION@.pc +pcverfiles_uninstalled += gstreamer-wayland-@GST_API_VERSION@-uninstalled.pc +endif + all-local: $(pcverfiles) $(pcverfiles_uninstalled) cp_verbose = $(cp_verbose_$(V)) @@ -33,12 +37,16 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = $(pcverfiles) CLEANFILES = $(pcverfiles) $(pcverfiles_uninstalled) + pcinfiles = \ gstreamer-plugins-bad.pc.in gstreamer-plugins-bad-uninstalled.pc.in \ gstreamer-codecparsers.pc.in gstreamer-codecparsers-uninstalled.pc.in \ gstreamer-gl.pc.in gstreamer-gl-uninstalled.pc.in \ gstreamer-insertbin.pc.in gstreamer-insertbin-uninstalled.pc.in \ gstreamer-mpegts.pc.in gstreamer-mpegts-uninstalled.pc.in +if USE_WAYLAND +pcinfiles += gstreamer-wayland.pc.in gstreamer-wayland-uninstalled.pc.in +endif DISTCLEANFILES = $(pcinfiles:.in=) EXTRA_DIST = $(pcinfiles)