<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 08/19/2015 02:42 PM, James Felix
      Black wrote:<br>
    </div>
    <blockquote
cite="mid:1440006164.2756501.360488729.41C9CF17@webmail.messagingengine.com"
      type="cite">
      <title></title>
      <div>Linux ARM (nVidia Jetson TK1), gstreamer-1.5.2, Qt 5.5,
        qt-streamer 1.2.0<br>
      </div>
      <div> </div>
      <div>I have a simple X11 application that I'm working, based for
        now on the qt-gstreamer demo code [1] that plays a video to the
        screen, and snapshots "interesting" frames to disk. I'm using Qt
        and the qt-gstreamer package, and I am able to access sample
        data directly off the pipeline (using the "sample" property at a
        given time), and write the raw video to disk as such:<br>
      </div>
      <div> </div>
      <div>
        <div>  QGlib::Value val = pipeline->property("sample");<br>
        </div>
        <div>  GstSample * v = (GstSample *)g_value_get_boxed(val);<br>
        </div>
        <div> </div>
        <div>  // write the contents of v's memory buffer to disk ....<br>
        </div>
        <div> </div>
        <div>What I get is a raw file of 4bytes * 1920 * 1080. That's
          cool! But what I want to do is:<br>
        </div>
        <div> </div>
        <div>  GstCaps * jpegCaps = gst_caps_new_simple("image/jpeg",
          "width", G_TYPE_INT, 640, NULL);</div>
        <div>  GError * err;<br>
        </div>
        <div>  GstSample * jpeg = gst_video_convert_sample(v, jpegCaps,
          100, &err);<br>
        </div>
        <div> </div>
        <div>... and then write the contents of *that* sample to disk,
          instead. However, if I do that conversion, jpeg is null and
          the error is:<br>
        </div>
        <div> </div>
        <div>"Cannot find any image encoder for caps image/jpeg"<br>
        </div>
        <div> </div>
        <div>OK, that seems fair. But my pipeline (again see the example
          code at [1]) is constructed as such:<br>
        </div>
        <div> </div>
        <div>        m_pipeline =
QGst::ElementFactory::make("playbin").dynamicCast<QGst::Pipeline>();<br>
        </div>
        <div> </div>
        <div>My question then becomes: how should I approach this
          problem? Should I modify the pipeline? I see that there's a
          "convert-sample" signal on playbin;  is that what I should be
          using?<br>
        </div>
        <div> </div>
        <div>Any light anyone can shed would be most welcome.<br>
        </div>
      </div>
    </blockquote>
    <br>
    Do you have jpegenc (or any other jpeg encoder) in your system?
    gst-inspect-1.0 jpegenc should show it. Or gst-inspect-1.0 |grep
    jpeg.<br>
    <br>
    <br>
    <br>
    <blockquote
cite="mid:1440006164.2756501.360488729.41C9CF17@webmail.messagingengine.com"
      type="cite">
      <div>
        <div> </div>
        <div>Cheers!</div>
        <div> </div>
        <div>[1] <a class="moz-txt-link-freetext" href="https://github.com/detrout/qt-gstreamer/tree/master/examples/player">https://github.com/detrout/qt-gstreamer/tree/master/examples/player</a><br>
        </div>
      </div>
      <div> </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <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="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Thiago Sousa Santos
Senior Multimedia Engineer, Open Source Group
Samsung Research America - Silicon Valley</pre>
  </body>
</html>