<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">What version of GStreamer?  Previous
      versions of nvdec could only output to GLTextures and could not
      output to system memory.  Add a gldownload if you want the output
      in system memory.<br>
      <br>
      Delayed linking generally means a caps negotiation failure.<br>
      <br>
      On 16/6/20 4:10 am, Борис wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAGjmWh53rijs-15iJtn0h3-r97e9RP=xe4MVYRtC_juDMrwXUg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div><br>
        </div>
        <div> system: win10 x64, compiler msvc 2015 x64, gstreamer
          version 1.16.2  <br>
        </div>
        <div><br>
        </div>
        Hi. I rebuilt gst-plugins-bad to enable support of nvidia
        accelerated decoding (nvdec). It works when i run it from
        gst-launch-1.0:
        <div>gst-launch-1.0 filesrc location=D:/test_nvdec/jumanji.mp4 !
          qtdemux ! h264parse ! nvdec ! glimagesink sync=false<br>
        </div>
        <div><br>
        </div>
        <div>but when i run same pipeline in my project:</div>
        <div><br>
        </div>
        <div>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,103,124)">qputenv</span>(<span style="color:rgb(0,128,0)">"GST_DEBUG"</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"2"</span>);</pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">QString</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">pipeLine</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">QString</span>(<span style="color:rgb(0,128,0)">"filesrc</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">location=D:/test_nvdec/jumanji.mp4</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">!</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">qtdemux</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">!</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">h264parse</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">!</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">nvdec</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">!</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">videoconvert</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">!</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">appsink</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">sync</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">false"</span>);</pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">cv</span>::<span style="color:rgb(128,0,128)">VideoCapture</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">cap</span>(<span style="color:rgb(9,46,100)">pipeLine</span>.<span style="color:rgb(0,103,124)">toStdString</span>(),<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">cv</span>::<span style="color:rgb(128,0,128)">CAP_GSTREAMER</span>);</pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,128,0)">if</span><span style="color:rgb(192,192,192)"> </span>(<span style="color:rgb(9,46,100)">cap</span>.<span style="font-style:italic;color:rgb(0,103,124)">isOpened</span>())</pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>{</pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(128,0,128)">Mat</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">frame</span>;</pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(9,46,100)">cap</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,103,124)">>></span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">frame</span>;</pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(0,103,124)">imwrite</span>(<span style="color:rgb(0,128,0)">"D:/test.png"</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">frame</span>);</pre>
          <pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>}</pre>
          <pre style="margin-top:0px;margin-bottom:0px">it gives me errors:</pre>
          <pre style="margin-top:0px;margin-bottom:0px">
</pre>
          <pre style="margin-top:0px;margin-bottom:0px"><p style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)">0:00:00.165703000 26304 000001FFC4CF5E70 WARN                 basesrc gstbasesrc.c:3600:gst_base_src_start_complete:<filesrc0> pad not activated yet</span></p>
<p style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)">0:00:00.166446000 26304 000001FFC4CD29C0 WARN                 qtdemux qtdemux_types.c:240:qtdemux_type_get: unknown QuickTime node type gsst</span></p>
<p style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)">0:00:00.166577000 26304 000001FFC4CD29C0 WARN                 qtdemux qtdemux_types.c:240:qtdemux_type_get: unknown QuickTime node type gstd</span></p>
<p style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)">0:00:00.166747000 26304 000001FFC4CD29C0 WARN                 qtdemux qtdemux.c:3238:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 1</span></p>
<p style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)">0:00:00.166981000 26304 000001FFC4CD29C0 WARN                 qtdemux qtdemux.c:3238:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 2</span></p>
<p style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)">0:00:00.168948000 26304 000001FFC4CD29C0 WARN                 default grammar.y:510:gst_parse_no_more_pads:<qtdemux0> warning: Delayed linking failed.</span></p>
<p style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)">0:00:00.169078000 26304 000001FFC4CD29C0 WARN                 default grammar.y:510:gst_parse_no_more_pads:<qtdemux0> warning: failed delayed linking some pad of GstQTDemux named qtdemux0 to some pad of GstH264Parse named h264parse0</span></p>
<p style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)">0:00:00.169337000 26304 000001FFC4CD29C0 WARN                 qtdemux qtdemux.c:6605:gst_qtdemux_loop:<qtdemux0> error: Internal data stream error.</span></p>
<p style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)">0:00:00.169460000 26304 000001FFC4CD29C0 WARN                 qtdemux qtdemux.c:6605:gst_qtdemux_loop:<qtdemux0> error: streaming stopped, reason not-linked (-1)</span></p>
<p style="margin:0px;color:rgb(170,0,0);white-space:pre-wrap">
</p>
<p style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)">(gametrack_modules.exe:26304): GStreamer-CRITICAL **: 21:05:08.530: gst_element_get_bus: assertion 'GST_IS_ELEMENT (element)' failed</span></p>
<p style="margin:0px;color:rgb(170,0,0);white-space:pre-wrap">
</p>
<p style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)">(gametrack_modules.exe:26304): GStreamer-CRITICAL **: 21:05:08.530: gst_bus_have_pending: assertion 'GST_IS_BUS (bus)' failed</span></p>
<p style="margin:0px;color:rgb(170,0,0);white-space:pre-wrap">
</p>
<p style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)">(gametrack_modules.exe:26304): GStreamer-CRITICAL **: 21:05:08.530: gst_object_unref: assertion 'object != NULL' failed</span></p>
<p style="margin:0px;color:rgb(170,0,0);white-space:pre-wrap">
</p>
<p style="margin:0px;white-space:pre-wrap"><span style="color:rgb(170,0,0)">(gametrack_modules.exe:26304): GStreamer-CRITICAL **: 21:05:08.531: gst_element_send_event: assertion 'GST_IS_ELEMENT (element)' failed</span></p><p style="margin:0px;white-space:pre-wrap">
</p><p style="margin:0px;white-space:pre-wrap">but if i replace nvdec with avdec_h264 everything works as expected:</p><p style="margin:0px;white-space:pre-wrap">
</p><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,0,128)">QString</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">pipeLine</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">QString</span>(<span style="color:rgb(0,128,0)">"filesrc</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">location=D:/test_nvdec/jumanji.mp4</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">!</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">qtdemux</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">!</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">h264parse</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">!</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">avdec_h264</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">!</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">videoconvert</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">!</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">appsink</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">sync</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">false"</span>);</pre><pre style="margin-top:0px;margin-bottom:0px">
</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:Arial,Helvetica,sans-serif">so, what is wrong here?</span>
</pre></pre>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>