GNOME Bugzilla – Bug 758981
waylandsink: need to set wl_proxy_set_queue() to get wl_signal about wl_buffer destory from wayland-server which is not based on SHM
Last modified: 2016-09-21 19:28:31 UTC
We don't need to set wl_proxy_set_queue() for wl_buffer_add_listener() if we use wl_registry from wl_display base on SHM(Shared memory) as below. self->registry = wl_display_get_registry (self->display); wl_proxy_set_queue ((struct wl_proxy *) self->registry, self->queue); wl_registry_add_listener (self->registry, ®istry_listener, self); but, if we use other wayland libray such as wayland-tbm(DRM) for TIZEN, We need to set set wl_proxy_set_queue() for wl_buffer as below. wl_buffer_add_listener (self->wlbuffer, &buffer_listener, self); wl_proxy_set_queue ((struct wl_proxy *) self->wlbuffer, self->display->queue); I think that above code can satisfied all wayland library
Created attachment 316687 [details] [review] [PATCH] waylandsink : Add wl_proxy_set_queue for receiving wl_signal from all wayland-compositor which is modified by open source project waylandsink need to set wl_proxy_set_queue for receiving wl_signal about buffer release. If set clearly, waylandsink can wl_signal event from all wayland-compositor Which is modified by open source project.
How about you? thank you!!
Sounds good to me.
Hmm, this sounds strange to me. Why is your wl_buffer not inherited from the registry? In this case probably there are other wl_proxy objects in waylandsink that also explicitly need to be set to use the local queue? Also, the queue definitely should be set when the wl_buffer is created, not when the listener is added.
My guess is that it's a TBM (Tizen's fork of GBM ... :\) buffer, but you could also have others which aren't created by the sink. Though, hmm, you're right that it doesn't seem particularly plausible as there isn't a way to get wl_buffers pre-created from upstream ... Hyunil, how are these buffers created, and how are you getting them to waylandsink?
TBM buffer is created by CODEC. so it is not wayland buffer pool. TBM buffer can be got by below function, buffer pointer too. gst_wayland_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
To access the wl_buffer you upstream you need to extract the QData. This QData is in a structure that is private to the waylandsink plugin. So until the day this private structure is exposed, there is no point merging this. I'm not saying it's a bad idea though.