<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 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1619918886;
        mso-list-type:hybrid;
        mso-list-template-ids:727208404 67698713 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></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="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">As I can see glcolorconvert expect sink and src as video/x-raw(memory:GLMemory), which is not same in my case as input for me is x-raw and o/p is x-raw(memory:GBM)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In my case I am trying to access usb camera using /dev/video3 so input to customized videoconvert/or any other plugin would be
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)15/2, format=(string)YUY2<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">and the aim is to convert using customized videoconvert/other element.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">video/x-raw(memory:GBM), width=(int)1280, height=(int)720, framerate=(fraction)15/2, format=(string)NV12<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">the videoconvert customized is aimed to perform<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<ol style="margin-top:0in" start="1" type="a">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">format conversion from YUY2 to NV12<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">frame buffers from video/x-raw(system memory) to video/x-raw(memory:GBM)(gpu backed memory)<o:p></o:p></li></ol>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Here GBM buffers are gpu backed memory which I am setting up in transform_frame of videoconvert.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards<o:p></o:p></p>
<p class="MsoNormal">Gaurav<o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Matthew Waters <ystreet00@gmail.com> <br>
<b>Sent:</b> Wednesday, August 18, 2021 1:33 PM<br>
<b>To:</b> Discussion of the development of and with GStreamer <gstreamer-devel@lists.freedesktop.org><br>
<b>Cc:</b> Gaurav Vohra <Gaurav.Vohra@einfochips.com><br>
<b>Subject:</b> [External] Re: gstreamer videoconvert support gpu memory buffer<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">videoconvert most likely isn't going to work with GPU buffers at all.  You will probably want your own element that deals with your data correctly (or use an existing element like glcolorconvert or maybe a v4l2
 converter element).<br>
<br>
Cheers<br>
-Matt<o:p></o:p></p>
<div>
<p class="MsoNormal">On 18/8/21 4:18 pm, Gaurav Vohra via gstreamer-devel wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I am working to customize gstreamer plugin to support <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-bottom-alt:auto;background:white;vertical-align:baseline">
<span style="color:black">working to modify gstreamer plugin - videoconvert get obtain output data allocated as gpu memory allocated buffers.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-bottom-alt:auto;background:white;vertical-align:baseline">
<span style="color:black">As part of first step have modified the plugin to update the src template to include the gpu memory caps.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-bottom-alt:auto;background:white;vertical-align:baseline">
<span style="color:black">Allocation for gpu memory is done is transform_frame, but before that being called stream error and negotition is failing</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-bottom-alt:auto;background:white;vertical-align:baseline">
<span style="color:black">Commented part</span><o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline">// #define CSP_VIDEO_CAPS GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL) ";" \<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline">GST_VIDEO_CAPS_MAKE_WITH_FEATURES ("ANY", GST_VIDEO_FORMATS_ALL)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-bottom-alt:auto;background:white;vertical-align:baseline">
<span style="color:black">Modified part</span><o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline">#define CSP_VIDEO_CAPS_SRC GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL) ";" \<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline">GST_VIDEO_CAPS_MAKE_WITH_FEATURES ("memory:GBM", GST_VIDEO_FORMATS_ALL)<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline"> <o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline">//#define CSP_VIDEO_CAPS_SRC GST_VIDEO_CAPS_MAKE_WITH_FEATURES ("memory:GBM", GST_VIDEO_FORMATS_ALL)<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline">static GstStaticPadTemplate gst_video_convert_src_template =<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline">GST_STATIC_PAD_TEMPLATE ("src",<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline">    GST_PAD_SRC,<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline">    GST_PAD_ALWAYS,<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline">    GST_STATIC_CAPS (CSP_VIDEO_CAPS_SRC)<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline">    );<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-bottom-alt:auto;background:white;vertical-align:baseline">
<span style="color:black">While trying to run the playback pipeline getting errors related to negotitation and stream error like below</span><o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline">ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline">Additional debug info:<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline">../../../../gstreamer-1.14.4/libs/gst/base/gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:<o:p></o:p></p>
<p class="MsoNormal" style="vertical-align:baseline">streaming stopped, reason not-negotiated (-4)<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Further debugging from logs suggest intersect of capsfilter input and the caps filter is coming as EMPTY
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">0:00:06.974521920  4320  0x10cde60 DEBUG             capsfilter gstcapsfilter.c:296:gst_capsfilter_transform_caps:<capsfilter0> input:     video/x-raw(memory:GBM), format=(string)NV12, width=(int)[ 1, 32767 ], height=(int)[ 1, 32767 ],
 framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:GBM), width=(int)[ 1, 32767 ], height=(int)[ 1, 32767 ], framerate=(fraction)[ 0/1, 2147483647/1 ], format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR,
 RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE,
 GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE,
 Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32 }<o:p></o:p></p>
<p class="MsoNormal">0:00:06.974569108  4320  0x10cde60 DEBUG             capsfilter gstcapsfilter.c:297:gst_capsfilter_transform_caps:<capsfilter0> filter:    (NULL)<o:p></o:p></p>
<p class="MsoNormal">0:00:06.974616661  4320  0x10cde60 DEBUG             capsfilter gstcapsfilter.c:299:gst_capsfilter_transform_caps:<capsfilter0> caps filter:    video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)15/2, format=(string)YUY2<o:p></o:p></p>
<p class="MsoNormal">0:00:06.974651037  4320  0x10cde60 DEBUG             capsfilter gstcapsfilter.c:300:gst_capsfilter_transform_caps:<capsfilter0> intersect: EMPTY<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Regards<o:p></o:p></p>
<p class="MsoNormal">Gaurav<o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>