<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
text-indent:21.0pt;
font-size:10.5pt;
font-family:"Calibri","sans-serif";}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:692152090;
mso-list-type:hybrid;
mso-list-template-ids:1193725460 2086276780 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:18.0pt;
text-indent:-18.0pt;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-text:"%2\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:42.0pt;
text-indent:-21.0pt;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:63.0pt;
text-indent:-21.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:84.0pt;
text-indent:-21.0pt;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-text:"%5\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:105.0pt;
text-indent:-21.0pt;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:126.0pt;
text-indent:-21.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:147.0pt;
text-indent:-21.0pt;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-text:"%8\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:168.0pt;
text-indent:-21.0pt;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:189.0pt;
text-indent:-21.0pt;}
@list l1
{mso-list-id:1643268970;
mso-list-type:hybrid;
mso-list-template-ids:41190214 490525566 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l1:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:18.0pt;
text-indent:-18.0pt;}
@list l1:level2
{mso-level-number-format:alpha-lower;
mso-level-text:"%2\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:42.0pt;
text-indent:-21.0pt;}
@list l1:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:63.0pt;
text-indent:-21.0pt;}
@list l1:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:84.0pt;
text-indent:-21.0pt;}
@list l1:level5
{mso-level-number-format:alpha-lower;
mso-level-text:"%5\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:105.0pt;
text-indent:-21.0pt;}
@list l1:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:126.0pt;
text-indent:-21.0pt;}
@list l1:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:147.0pt;
text-indent:-21.0pt;}
@list l1:level8
{mso-level-number-format:alpha-lower;
mso-level-text:"%8\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:168.0pt;
text-indent:-21.0pt;}
@list l1:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:189.0pt;
text-indent:-21.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="ZH-CN" link="blue" vlink="purple" style="text-justify-trim:punctuation">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">More questions:<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l1 level1 lfo3">
<![if !supportLists]><span lang="EN-US" style="color:#1F497D"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US" style="color:#1F497D">I searched inside mesa code, there is wl_display_create_queue(), but no wl_event_queue_destroy(), is it a bug?<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l1 level1 lfo3">
<![if !supportLists]><span lang="EN-US" style="color:#1F497D"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US" style="color:#1F497D">I searched inside Weston code, there is no wl_buffer_send_release(), is there other way to send the event of WL_BUFFER_RELEASE?<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l1 level1 lfo3">
<![if !supportLists]><span lang="EN-US" style="color:#1F497D"><span style="mso-list:Ignore">3.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US" style="color:#1F497D">What’s the design philosophy of wl_buffer_send_release?<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:42.0pt;text-indent:-21.0pt;mso-list:l1 level2 lfo3">
<![if !supportLists]><span lang="EN-US" style="color:#1F497D"><span style="mso-list:Ignore">a)<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US" style="color:#1F497D">I had thought the event is sent when server doesn’t use wl_buffer any longer<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:63.0pt;text-indent:-63.0pt;mso-text-indent-alt:-21.0pt;mso-list:l1 level3 lfo3">
<![if !supportLists]><span lang="EN-US" style="color:#1F497D"><span style="mso-list:Ignore"><span style="font:7.0pt "Times New Roman"">
</span>i.<span style="font:7.0pt "Times New Roman""> </span></span></span><![endif]><span lang="EN-US" style="color:#1F497D">when a new wl_buffer is committed (release previous committed buffer)<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:63.0pt;text-indent:-63.0pt;mso-text-indent-alt:-21.0pt;mso-list:l1 level3 lfo3">
<![if !supportLists]><span lang="EN-US" style="color:#1F497D"><span style="mso-list:Ignore"><span style="font:7.0pt "Times New Roman"">
</span>ii.<span style="font:7.0pt "Times New Roman""> </span></span></span><![endif]><span lang="EN-US" style="color:#1F497D">When the corresponding wl_surface is destroying (release the committed buffer)<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:63.0pt;text-indent:-63.0pt;mso-text-indent-alt:-21.0pt;mso-list:l1 level3 lfo3">
<![if !supportLists]><span lang="EN-US" style="color:#1F497D"><span style="mso-list:Ignore"><span style="font:7.0pt "Times New Roman"">
</span>iii.<span style="font:7.0pt "Times New Roman""> </span></span></span><![endif]><span lang="EN-US" style="color:#1F497D">When a second wl_buffer is attached before commit (release the previous attached one)<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:42.0pt;text-indent:-21.0pt;mso-list:l1 level2 lfo3">
<![if !supportLists]><span lang="EN-US" style="color:#1F497D"><span style="mso-list:Ignore">b)<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US" style="color:#1F497D">However, the above assumption doesn’t work well with mesa. With nested server in webkit.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:42.0pt;text-indent:0cm"><span lang="EN-US" style="color:#1F497D">Seems mesa requires wayland server send wl_buffer_send_release upon attach.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:42.0pt;text-indent:0cm"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="margin-left:42.0pt;text-indent:0cm"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> wayland-devel-bounces+halley.zhao=intel.com@lists.freedesktop.org
[mailto:wayland-devel-bounces+halley.zhao=intel.com@lists.freedesktop.org] <b>On Behalf Of
</b>Zhao, Halley<br>
<b>Sent:</b> Monday, September 02, 2013 10:12 AM<br>
<b>To:</b> wayland-devel@lists.freedesktop.org<br>
<b>Subject:</b> how to deal with the last video frame buffer (wl_buffer)?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">This expose additional questions for the last video buffer.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo2">
<![if !supportLists]><span lang="EN-US"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US">Should we commit empty wl_buffer upon stopping of video playback?<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:42.0pt;text-indent:-21.0pt;mso-list:l0 level2 lfo2">
<![if !supportLists]><span lang="EN-US"><span style="mso-list:Ignore">a)<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US">Does Weston support it ? (use empty buffer to replace previous committed buffer)<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:42.0pt;text-indent:-21.0pt;mso-list:l0 level2 lfo2">
<![if !supportLists]><span lang="EN-US"><span style="mso-list:Ignore">b)<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US">If yes, is there any example to use it?<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo2">
<![if !supportLists]><span lang="EN-US"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US">When to destroy the event queue if it is used?<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:18.0pt;text-indent:0cm"><span lang="EN-US">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. <o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:42.0pt;text-indent:-21.0pt;mso-list:l0 level2 lfo2">
<![if !supportLists]><span lang="EN-US"><span style="mso-list:Ignore">a)<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US">Should we have an event like wl_surface_send_release() to give the chance to destroy this event queue?<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:42.0pt;text-indent:-21.0pt;mso-list:l0 level2 lfo2">
<![if !supportLists]><span lang="EN-US"><span style="mso-list:Ignore">b)<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US">If not, then we have to destroy this event queue upon wl_buffer_send_release of the last buffer.
<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:63.0pt;text-indent:-63.0pt;mso-text-indent-alt:-21.0pt;mso-list:l0 level3 lfo2">
<![if !supportLists]><span lang="EN-US"><span style="mso-list:Ignore"><span style="font:7.0pt "Times New Roman"">
</span>i.<span style="font:7.0pt "Times New Roman""> </span></span></span><![endif]><span lang="EN-US">Is it ok to destroy the event queue in the callback function of the event in this queue?<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:63.0pt;text-indent:-63.0pt;mso-text-indent-alt:-21.0pt;mso-list:l0 level3 lfo2">
<![if !supportLists]><span lang="EN-US"><span style="mso-list:Ignore"><span style="font:7.0pt "Times New Roman"">
</span>ii.<span style="font:7.0pt "Times New Roman""> </span></span></span><![endif]><span lang="EN-US">It creates complexity to sycn on the last buffer release event in media.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:42.0pt"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="margin-left:18.0pt;text-indent:0cm"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>