how to deal with the last video frame buffer (wl_buffer)?

Zhao, Halley halley.zhao at intel.com
Mon Sep 2 17:26:38 PDT 2013


More questions:

1.       I searched inside mesa code, there is wl_display_create_queue(), but no wl_event_queue_destroy(), is it a bug?

2.       I searched inside Weston code, there is no wl_buffer_send_release(), is there other way to send the event of WL_BUFFER_RELEASE?

3.       What's the design philosophy of wl_buffer_send_release?

a)         I had thought the event is sent when server doesn't use wl_buffer any longer

                         i.              when a new wl_buffer is committed (release previous committed buffer)

                       ii.              When the corresponding wl_surface is destroying (release the committed buffer)

                      iii.              When a second wl_buffer is attached before commit (release the previous attached one)

b)         However, the above assumption doesn't work well with mesa. With nested server in webkit.

Seems mesa requires wayland server send wl_buffer_send_release upon attach.





From: wayland-devel-bounces+halley.zhao=intel.com at lists.freedesktop.org [mailto:wayland-devel-bounces+halley.zhao=intel.com at lists.freedesktop.org] On Behalf Of Zhao, Halley
Sent: Monday, September 02, 2013 10:12 AM
To: wayland-devel at lists.freedesktop.org
Subject: how to deal with the last video frame buffer (wl_buffer)?

When a wl_buffer (of video frame) is committed to wayland server, this buffer keeps being used by server until a second buffer is committed.
It means a wl_buffer isn't ready to destroy in frame callback, but wl_buffer_send_release(). And the buffer (in media pipeline) should also be retained for some time after it is committed to server side.

This expose additional questions for the last video buffer.

1.       Should we commit empty wl_buffer upon stopping of video playback?

a)         Does Weston support it ? (use empty buffer to replace previous committed buffer)

b)         If yes, is there any example to use it?

2.       When to destroy the event queue if it is used?

Usually media creates an event queue, wl_buffer is also set to this queue. It comes a question that when to destroy this event queue, since wl_buffer_send_release() (on this event queue) happens after media stop.

a)         Should we have an event like wl_surface_send_release() to give the chance to destroy this event queue?

b)         If not, then we have to destroy this event queue upon wl_buffer_send_release of the last buffer.

                         i.              Is it ok to destroy the event queue in the callback function of the event in this queue?

                       ii.              It creates complexity to sycn on the last buffer release event in media.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130903/2761f2f8/attachment.html>


More information about the wayland-devel mailing list