<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックProblem in flushing buffer in waylandsink wldisplay</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Problem-in-flushing-buffer-in-waylandsink-wldisplay/m-p/705238#M109560</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using waylandsink to play h264 file. My decoder gives output in NV12 format, But my wayland accepts only&amp;nbsp;BGRA, BGRx, RGB16. So I am using a video convertor. I cannot use a software video convert as its very slow. I want to use hardware video convert.&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pipeline using software video convert : &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;gst-launch-1.0 filesrc location=/home/root/VSS/video_with_display.h264 ! h264parse ! vpudec ! videoconvert ! waylandsink -v&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pipeline using hardware video convert :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;gst-launch-1.0 filesrc location=/home/root/VSS/video_with_display.h264 ! h264parse ! vpudec ! imxvideoconvert_ipu ! waylandsink -v&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp;&lt;STRONG&gt;gstreamer1.0-plugins-bad, version : 1.6.0&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You &amp;nbsp;could get it from here : &lt;A _jive_internal="true" class="" href="https://community.nxp.com/https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.6.0.tar.xz"&gt;https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.6.0.tar.xz&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I use hardware video convert, the &lt;STRONG&gt;buffer release function&lt;/STRONG&gt;, which is a call back, is &lt;STRONG&gt;not getting called.&lt;/STRONG&gt; There fore, I am not able to pick next buffers in pipeline.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code flow as I understood.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In&amp;nbsp;gst_wayland_sink_render (in gstwaylandsink.c ) function, we will get the buffer from pipeline.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For the first time, we have to create the wlbuffer and add register with &amp;nbsp;sink display. This is done using&amp;nbsp;gst_buffer_add_wl_buffer (in wlbuffer.c ) function. Here we will add a listener&amp;nbsp;buffer_listener for this buffer, which in turn calls&amp;nbsp;buffer_release (void *data, struct wl_buffer *wl_buffer) and releases the buffer and unref it.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Then we will replace sink's last buffer with this buffer to be rendered and call render_last_buffer. At end we calls gst_wl_window_render (in wlwindow.c), here we will attach our buffer to window video surface using gst_wl_buffer_attach. Then we will call&amp;nbsp;wl_display_flush (window-&amp;gt;display-&amp;gt;display);&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;When I use hardware video convert, I am able to see that &lt;STRONG&gt;data is coming upto&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;gst_wl_buffer_attach&lt;/STRONG&gt;, but &lt;STRONG&gt;buffer releasing is not done.&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;What can be the reason ?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am attaching the logs taken for both software videoconvert and hardware videoconvert, And our&amp;nbsp;gst-plugins-bad-1.6.0 code with my own debug logs added. I have added the logs containing ** VSS ** .&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Aug 2017 05:47:07 GMT</pubDate>
    <dc:creator>saseendranathvs</dc:creator>
    <dc:date>2017-08-23T05:47:07Z</dc:date>
    <item>
      <title>Problem in flushing buffer in waylandsink wldisplay</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Problem-in-flushing-buffer-in-waylandsink-wldisplay/m-p/705238#M109560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using waylandsink to play h264 file. My decoder gives output in NV12 format, But my wayland accepts only&amp;nbsp;BGRA, BGRx, RGB16. So I am using a video convertor. I cannot use a software video convert as its very slow. I want to use hardware video convert.&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pipeline using software video convert : &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;gst-launch-1.0 filesrc location=/home/root/VSS/video_with_display.h264 ! h264parse ! vpudec ! videoconvert ! waylandsink -v&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pipeline using hardware video convert :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;gst-launch-1.0 filesrc location=/home/root/VSS/video_with_display.h264 ! h264parse ! vpudec ! imxvideoconvert_ipu ! waylandsink -v&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp;&lt;STRONG&gt;gstreamer1.0-plugins-bad, version : 1.6.0&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You &amp;nbsp;could get it from here : &lt;A _jive_internal="true" class="" href="https://community.nxp.com/https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.6.0.tar.xz"&gt;https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.6.0.tar.xz&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I use hardware video convert, the &lt;STRONG&gt;buffer release function&lt;/STRONG&gt;, which is a call back, is &lt;STRONG&gt;not getting called.&lt;/STRONG&gt; There fore, I am not able to pick next buffers in pipeline.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code flow as I understood.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In&amp;nbsp;gst_wayland_sink_render (in gstwaylandsink.c ) function, we will get the buffer from pipeline.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For the first time, we have to create the wlbuffer and add register with &amp;nbsp;sink display. This is done using&amp;nbsp;gst_buffer_add_wl_buffer (in wlbuffer.c ) function. Here we will add a listener&amp;nbsp;buffer_listener for this buffer, which in turn calls&amp;nbsp;buffer_release (void *data, struct wl_buffer *wl_buffer) and releases the buffer and unref it.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Then we will replace sink's last buffer with this buffer to be rendered and call render_last_buffer. At end we calls gst_wl_window_render (in wlwindow.c), here we will attach our buffer to window video surface using gst_wl_buffer_attach. Then we will call&amp;nbsp;wl_display_flush (window-&amp;gt;display-&amp;gt;display);&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;When I use hardware video convert, I am able to see that &lt;STRONG&gt;data is coming upto&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;gst_wl_buffer_attach&lt;/STRONG&gt;, but &lt;STRONG&gt;buffer releasing is not done.&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;What can be the reason ?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am attaching the logs taken for both software videoconvert and hardware videoconvert, And our&amp;nbsp;gst-plugins-bad-1.6.0 code with my own debug logs added. I have added the logs containing ** VSS ** .&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2017 05:47:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Problem-in-flushing-buffer-in-waylandsink-wldisplay/m-p/705238#M109560</guid>
      <dc:creator>saseendranathvs</dc:creator>
      <dc:date>2017-08-23T05:47:07Z</dc:date>
    </item>
  </channel>
</rss>

