<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hi, </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
"<span style="font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important">So the fact that you're
 getting both, means that you're mixing them</span><br style="font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255)">
<span style="font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important">and that's a no-no."</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
sorry, I should have clarified it a bit more:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I'm getting VAMemory when increasing the rank of the "va" plugins ( same as I'm getting DMABuf when using msdk and D3D11Memory when using the d3d11 plugins on Windows )</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
the error in my previous post only occurs when forcing <span style="font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important">VASurface
 on the "vaapi" plugins</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I did this to check if my <span style="background-color:rgb(255, 255, 255);display:inline !important">GST_QUERY_CAPS handling was actually correct</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="background-color:rgb(255, 255, 255);display:inline !important"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="background-color:rgb(255, 255, 255);display:inline !important">Cheers</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="background-color:rgb(255, 255, 255);display:inline !important">Winand</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> gstreamer-devel <gstreamer-devel-bounces@lists.freedesktop.org> im Auftrag von Victor Jaquez via gstreamer-devel <gstreamer-devel@lists.freedesktop.org><br>
<b>Gesendet:</b> Donnerstag, 14. Juli 2022 18:29<br>
<b>An:</b> Discussion of the development of and with GStreamer <gstreamer-devel@lists.freedesktop.org><br>
<b>Cc:</b> Victor Jaquez <vjaquez@igalia.com><br>
<b>Betreff:</b> Re: VASurface in appsink using decodebin using Gstreamer 1.20.1</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Thu, 14 Jul 2022 at 12:17, Winand Appelhoff via gstreamer-devel wrote:<br>
> Hello,<br>
> <br>
> small followup<br>
> <br>
> been toying around with this<br>
> requesting memory:D3D11Memory, memory:VAMemory, memory:DMABuf in gst_query_set_caps_result() all work as expected<br>
> <br>
> only memory:VASurface refuses to do so<br>
> <br>
> basetransform: second attempt to fixate caps returned invalid (NULL) caps on pad vaapipostproc1:sink<br>
> basetransform gstbasetransform.c:1370:gst_base_transform_setcaps:<vaapipostproc1> transform could not transform video/x-raw(memory:VASurface), format=(string)NV12, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, multiview-mode=(string)mono,
 multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, views=(int)2, framerate=(fraction)50/1 in anything
 we support<br>
> vaapipostproc gstvaapipostprocutil.c:756:_get_preferred_caps:<vaapipostproc1> No valid src caps found<br>
> <br>
> which doesn't make any sense at all<br>
> <br>
> anyone having any idea?<br>
<br>
It's odd indeed. Since memory:VAMemory is produced/consumed by<br>
gstva elements, in gst-plugins-bad, (and have no-rank by default, so<br>
they don't autoplug); while memory:VASurface is produced/consumed by<br>
gstreamer-vaapi elements, in, well, gstreamer-vaapi.<br>
<br>
GstVa appeared because of the design failures in gstreamer-vaapi and<br>
it's intended to replace, in most of cases,<br>
gstreamer-vaapi. Nonetheless, they are, so far, uncompatible: they<br>
cannot share VASurfacesID among them.<br>
<br>
So the fact that you're getting both, means that you're mixing them<br>
and that's a no-no.<br>
<br>
If you can share your pipeline's dot file[1] it could make easier to<br>
figure out what's going on.<br>
<br>
1. <a href="https://gstreamer.freedesktop.org/documentation/tutorials/basic/debugging-tools.html?gi-language=c#getting-pipeline-graphs">
https://gstreamer.freedesktop.org/documentation/tutorials/basic/debugging-tools.html?gi-language=c#getting-pipeline-graphs</a><br>
<br>
vmjl<br>
<br>
> <br>
> thanks a lot in advance<br>
> Winand<br>
> ________________________________<br>
> Von: gstreamer-devel <gstreamer-devel-bounces@lists.freedesktop.org> im Auftrag von Winand Appelhoff via gstreamer-devel <gstreamer-devel@lists.freedesktop.org><br>
> Gesendet: Dienstag, 5. Juli 2022 11:08<br>
> An: Discussion of the development of and with GStreamer <gstreamer-devel@lists.freedesktop.org><br>
> Cc: Winand Appelhoff <w.appelhoff@tv1.eu><br>
> Betreff: VASurface in appsink using decodebin using Gstreamer 1.20.1<br>
> <br>
> Hi,<br>
> <br>
> I'm having issues with the caps negotiaton trying to get VASurface buffers on an appsink since upgrading to 1.20.1 ( Ubuntu 22.04 default )<br>
> <br>
> pipeline: any input -> decodebin -> appsink<br>
> <br>
> requesting "memory:VASurface" in the GST_QUERY_CAPS result throws this:<br>
> <br>
> <br>
> basetransform: second attempt to fixate caps returned invalid (NULL) caps on pad vaapipostproc0:sink<br>
> <br>
> setting GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY works fine as expected<br>
> <br>
> did I miss any changes since 1.18.x maybe?<br>
> <br>
> <br>
> thanks a lot in advance<br>
> Winand<br>
> <br>
> <br>
> PS.:<br>
> <br>
> vainfo output for completeness<br>
> <br>
> vainfo: VA-API version: 1.14 (libva 2.12.0)<br>
> vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.3.1 ()<br>
> vainfo: Supported profile and entrypoints<br>
>       VAProfileNone                   : VAEntrypointVideoProc<br>
>       VAProfileNone                   : VAEntrypointStats<br>
>       VAProfileMPEG2Simple            : VAEntrypointVLD<br>
>       VAProfileMPEG2Simple            : VAEntrypointEncSlice<br>
>       VAProfileMPEG2Main              : VAEntrypointVLD<br>
>       VAProfileMPEG2Main              : VAEntrypointEncSlice<br>
>       VAProfileH264Main               : VAEntrypointVLD<br>
>       VAProfileH264Main               : VAEntrypointEncSlice<br>
>       VAProfileH264Main               : VAEntrypointFEI<br>
>       VAProfileH264Main               : VAEntrypointEncSliceLP<br>
>       VAProfileH264High               : VAEntrypointVLD<br>
>       VAProfileH264High               : VAEntrypointEncSlice<br>
>       VAProfileH264High               : VAEntrypointFEI<br>
>       VAProfileH264High               : VAEntrypointEncSliceLP<br>
>       VAProfileVC1Simple              : VAEntrypointVLD<br>
>       VAProfileVC1Main                : VAEntrypointVLD<br>
>       VAProfileVC1Advanced            : VAEntrypointVLD<br>
>       VAProfileJPEGBaseline           : VAEntrypointVLD<br>
>       VAProfileJPEGBaseline           : VAEntrypointEncPicture<br>
>       VAProfileH264ConstrainedBaseline: VAEntrypointVLD<br>
>       VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice<br>
>       VAProfileH264ConstrainedBaseline: VAEntrypointFEI<br>
>       VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP<br>
>       VAProfileVP8Version0_3          : VAEntrypointVLD<br>
>       VAProfileVP8Version0_3          : VAEntrypointEncSlice<br>
>       VAProfileHEVCMain               : VAEntrypointVLD<br>
>       VAProfileHEVCMain               : VAEntrypointEncSlice<br>
>       VAProfileHEVCMain               : VAEntrypointFEI<br>
>       VAProfileHEVCMain10             : VAEntrypointVLD<br>
>       VAProfileHEVCMain10             : VAEntrypointEncSlice<br>
>       VAProfileVP9Profile0            : VAEntrypointVLD<br>
>       VAProfileVP9Profile2            : VAEntrypointVLD<br>
> <br>
> <br>
> <br>
</div>
</span></font></div>
</body>
</html>