FUNCTION;
g_return_if_fail (sink != NULL);
g_return_if_fail (sink->last_buffer != NULL);
-
- GST_DEBUG ("gstbuffer ref count is %d",
- GST_OBJECT_REFCOUNT_VALUE (sink->last_buffer));
wlbuffer = gst_buffer_get_wl_buffer (sink->last_buffer);
g_return_if_fail (wlbuffer != NULL);
wlbuffer->used_by_compositor = FALSE;
- /*need to render last buffer, reuse current GstWlBuffer */
- render_last_buffer (sink);
- /* ref count is incresed in gst_wl_buffer_attach() of render_last_buffer(),
- to call gst_wl_buffer_finalize(), we need to decrease buffer ref count.
- wayland can not release buffer if we attach same buffer,
- if we use no visible, we need to attach null buffer and wayland can release buffer,
- so we don't need to below if() code. */
- if (!sink->visible)
+
+ GST_LOG ("gstbuffer(%p) ref count(%d)", sink->last_buffer,
+ GST_OBJECT_REFCOUNT_VALUE (sink->last_buffer));
+
+ if (sink->visible) {
+ /*need to render last buffer, reuse current GstWlBuffer */
+ render_last_buffer (sink);
+ /* ref count is incresed in gst_wl_buffer_attach() of render_last_buffer(),
+ to call gst_wl_buffer_finalize(), we need to decrease buffer ref count.
+ wayland can not release buffer if we attach same buffer,
+ if we use no visible, we need to attach null buffer and wayland can release buffer,
+ so we don't need to below if() code. */
gst_buffer_unref (wlbuffer->gstbuffer);
+ } else {
+ GST_LOG ("skip rendering");
+ }
+
+ GST_LOG ("gstbuffer(%p) ref count(%d)", sink->last_buffer,
+ GST_OBJECT_REFCOUNT_VALUE (sink->last_buffer));
+
}
#ifdef USE_WL_FLUSH_BUFFER
if (G_UNLIKELY (sink->video_info_changed)) {
#ifdef GST_WLSINK_ENHANCEMENT
- gst_wl_window_set_video_info_change (sink->window, TRUE);
+ gst_wl_window_set_video_info_change (sink->window, TRUE);
#endif
info = &sink->video_info;
sink->video_info_changed = FALSE;
g_mutex_lock (&sink->render_lock);
- GST_LOG_OBJECT (sink, "render buffer %p", buffer);
+ GST_LOG_OBJECT (sink, "render gstbuffer %p, ref_count(%d)", buffer,
+ GST_OBJECT_REFCOUNT_VALUE (buffer));
if (G_UNLIKELY (!sink->window)) {
/* ask for window handle. Unlock render_lock while doing that because
}
gst_buffer_replace (&sink->last_buffer, buffer);
- if (sink->visible)
+ if (sink->visible) {
render_last_buffer (sink);
+ } else {
+ GST_LOG ("skip rendering");
+ }
goto done;
{
GstWlBuffer *self = GST_WL_BUFFER (gobject);
FUNCTION;
- GST_INFO ("%p", self);
+ GST_INFO ("GstWlBuffer:%p", self);
GST_TRACE_OBJECT (self, "dispose");
/* if the display is shutting down and we are trying to dipose
GST_TRACE_OBJECT (self, "finalize");
#ifdef GST_WLSINK_ENHANCEMENT
- if (self->tsurface)
+ if (self->tsurface) {
+ GST_INFO ("self->tsurface:%p", self->tsurface);
tbm_surface_destroy (self->tsurface);
+ }
#endif
- GST_INFO ("%p", self->wlbuffer);
- if (self->wlbuffer)
+ if (self->wlbuffer) {
+ GST_INFO ("self->wl_buffer:%p", self->wlbuffer);
wl_buffer_destroy (self->wlbuffer);
-
+ }
#ifdef USE_WL_FLUSH_BUFFER
if (self->display) {
if (self->is_flush_request) {
{
GstWlBuffer *self = data;
FUNCTION;
- GST_LOG_OBJECT (self, "wl_buffer(%p)::release (GstBuffer: %p)", wl_buffer,
- self->gstbuffer);
+ g_return_if_fail (self != NULL);
+
+ GST_LOG_OBJECT (self,
+ "get event : wl_buffer(%p)::release (GstBuffer: %p):: tsurface(%p)",
+ wl_buffer, self->gstbuffer, self->tsurface);
self->used_by_compositor = FALSE;
/* unref should be last, because it may end up destroying the GstWlBuffer */
if (!self->is_flush_request) {
/*in case of is_flush_request, gstbuffer ref-count has already decreased. */
+ GST_LOG_OBJECT (self, "gstbuffer(%p), ref_count(%d)", self->gstbuffer,
+ GST_OBJECT_REFCOUNT_VALUE (self->gstbuffer));
gst_buffer_unref (self->gstbuffer);
+ if (self->gstbuffer) {
+ GST_ERROR_OBJECT (self, "gstbuffer(%p), ref_count(%d)", self->gstbuffer,
+ GST_OBJECT_REFCOUNT_VALUE (self->gstbuffer));
+ }
} else {
/*we blocked below code at gstbuffer_disposed() */
/* unref(GstWlBuffer), now gst_wl_buffer_dispose() will be called by below code */
{
FUNCTION;
g_assert (!self->used_by_compositor);
- GST_INFO ("%p", self->gstbuffer);
+ GST_INFO ("GstBuffer: %p", self->gstbuffer);
self->gstbuffer = NULL;
GST_TRACE_OBJECT (self, "owning GstBuffer was finalized");
if (!self->is_flush_request)
#endif
gst_buffer_ref (self->gstbuffer);
-
+ GST_LOG_OBJECT (self, "gstbuffer(%p), ref_count(%d)", self->gstbuffer,
+ GST_OBJECT_REFCOUNT_VALUE (self->gstbuffer));
self->used_by_compositor = TRUE;
}