<div dir="ltr">thank, the explanation is clear.<div>I'd simply add nv12 to my weston shm_formats.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Nicolas Dufresne <<a href="mailto:nicolas@ndufresne.ca">nicolas@ndufresne.ca</a>> 于2019年5月9日周四 下午7:40写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Le jeudi 09 mai 2019 à 11:04 +0800, Halley Zhao a écrit :<br>
> Hi experts:<br>
> v4l2h264dec claims it supports "video/x-raw" format only, but it may use dmabuf format (its capture-io-mode supports rw/mmap/userptr/dmabuf/dmabuf-import). should it add "video/x-raw(memory:DMABuf)" as well.<br>
> on nxp imx8 bsp, I found caps negotiation goes with "video/x-raw" (diskplay->shm_formats), but buffer flows with dmabuf(display->dmabuf_formats), because there is gst_wl_linux_dmabuf_construct_wl_buffer() in log.<br>
<br>
v4l2h264dec always output DMABuf. DMABuf is user mappable memory, there<br>
is no need to have a caps feature in general. The DMABuf caps feature<br>
was added for specific use cases, to support implicit tiling (Intel<br>
GFX, and that was actually a bad idea), to support protected FDs (non-<br>
readable DMABuf, use to carry DRM content) and is open for future<br>
support for proprietary formats (like the one exposed through DRM<br>
modifiers). The caps feature implement is quite partial overall.<br>
<br>
> <br>
> I met issue that caps negotiation fails between v4l2h264dec and waylandsink, <br>
> because on my platform (imx8 + customized weston), v4l2h264dec claims it support video/x-raw with NV12 format, waylandsink claims it support video/x-raw without NV12 format, plus video/x-raw(memory:DMABuf) with NV12 format.<br>
<br>
Compositors cannot guaranty availability of HW planes. Thus, it is<br>
important to provide a fallback mechanism (usually through the GL<br>
renderer) and then offer the same formats for both DMABuf and SHM.<br>
waylandsink will send DMABuf if the format is supported through the<br>
extension even without the caps feature.<br>
<br>
Of course, if you prefer hard failure if DMABuf isn't used, you may<br>
want to implement DMABuf caps feature support in v4l2 plugin. Patches<br>
are welcome, though be aware that negotiation of that feature should be<br>
last resort (chosen last).<br>
<br>
Nicolas<br>
<br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></blockquote></div>