<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I seem to be getting *somewhere* but I’m having an issue with creating a new GstBuffer <div class=""><br class=""></div><div class="">This seems strange, I’ve tried both </div><div class=""><div class=""><br class=""></div><div class="">    buffer = gst_buffer_new_and_alloc(data_len);</div></div><div class=""><br class=""></div><div class="">and</div><div class=""><br class=""></div><div class=""><div class="">    buffer = gst_buffer_new ();</div><div class="">    memory = gst_allocator_alloc (NULL, data_len, NULL);</div><div class="">    gst_buffer_insert_memory (buffer, -1, memory);</div><div class=""><br class=""></div><div class="">both methods cause a segfault… Not sure why, I mean, I’m only requesting a memory allocation so this should be OK right? </div><div class=""><br class=""></div><div class="">backtrace isn’t entirely revealing </div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(57, 192, 38);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">#0  </span><span style="font-variant-ligatures: no-common-ligatures; color: #5620f4" class="">0x00007ffff7e6c07d</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> in </span><span style="font-variant-ligatures: no-common-ligatures; color: #aaab25" class="">gst_allocator_alloc</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> () at </span><span style="font-variant-ligatures: no-common-ligatures" class="">/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0</span></div></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(57, 192, 38);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(57, 192, 38);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Regards,</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(57, 192, 38);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> K</span></div><div class=""><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On 3 Feb 2020, at 08:00, Matthew Waters <<a href="mailto:ystreet00@gmail.com" class="">ystreet00@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
  
  <div class="">
    <div class="moz-cite-prefix">On 3/2/20 6:24 pm, Karl Lattimer wrote:<br class="">
    </div>
    <blockquote type="cite" cite="mid:4129BC07-716F-4393-8A31-1890C51A1BC1@qdh.org.uk" class="">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
      <div style="word-wrap: break-word; -webkit-nbsp-mode: space;
        line-break: after-white-space;" class="">
        <div class=""><br class="">
          <blockquote type="cite" class="">
            <div class="">
              <blockquote type="cite" style="font-family: Helvetica;
                font-size: 12px; font-style: normal; font-variant-caps:
                normal; font-weight: normal; letter-spacing: normal;
                orphans: auto; text-align: start; text-indent: 0px;
                text-transform: none; white-space: normal; widows: auto;
                word-spacing: 0px; -webkit-text-size-adjust: auto;
                -webkit-text-stroke-width: 0px; text-decoration: none;" class="">and push that data into a gstreamer pipeline.
                As far as I understand<br class="">
                the raop_ntp_t struct contains information regarding
                time<br class="">
                synchronisation and pts provides an accurate timestamp.
                In my tests<br class="">
                with gstreamer so far I’ve taken the buffer, dumped it
                to disk as an<br class="">
                MP4 file, then used a simple playbin pipeline to open
                the file and<br class="">
                play it.<span class="Apple-converted-space"> </span><br class="">
              </blockquote>
              <br style="caret-color: rgb(0, 0, 0); font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none;" class="">
              <span style="caret-color: rgb(0, 0, 0); font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none; float: none; display: inline
                !important;" class="">Have you looked at the appsrc
                element ? Note that GStreamer processing</span><br style="caret-color: rgb(0, 0, 0); font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none;" class="">
              <span style="caret-color: rgb(0, 0, 0); font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none; float: none; display: inline
                !important;" class="">is asynchronous, so you may have
                to copy the pointer, or make sure that</span><br style="caret-color: rgb(0, 0, 0); font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none;" class="">
              <span style="caret-color: rgb(0, 0, 0); font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none; float: none; display: inline
                !important;" class="">your wrapped buffer is consumed
                before returning.</span></div>
          </blockquote>
          <blockquote type="cite" class="">
            <div class=""><br style="caret-color: rgb(0, 0, 0);
                font-family: Helvetica; font-size: 12px; font-style:
                normal; font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none;" class="">
              <a href="https://gstreamer.freedesktop.org/documentation/tutorials/basic/short-cutting-the-pipeline.html?gi-language=c" class="" moz-do-not-send="true">https://gstreamer.freedesktop.org/documentation/tutorials/basic/short-cutting-the-pipeline.html?gi-language=c</a><br style="caret-color: rgb(0, 0, 0); font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none;" class="">
            </div>
          </blockquote>
          <div class=""><br class="">
          </div>
          <div class="">It’s my understanding that for that to work I’d
            need a gmainloop in order to callback the appropriate
            functions for need data and have enough data, as well as
            being able to emit the signal push-data which seems to be
            where the data is inserted into the pipeline. </div>
          <div class=""><br class="">
          </div>
          <div class="">Is this correct? I don’t think I can shove a
            gmainloop into RPiPlay it’s pretty much dependent on the
            data stream and has it’s own mainloop for that purpose. <br class="">
          </div>
        </div>
      </div>
    </blockquote>
    <br class="">
    You don't need a mainloop running to emit or retrieve those signals
    on appsrc.  Nothing in GStreamer requires there to be any kind of
    mainloop running except for platform or plugin specifics which are
    few and far between (e.g. MacOS video output).<br class="">
    <br class="">
    Cheers<br class="">
    -Matt<br class="">
    <br class="">
    <blockquote type="cite" cite="mid:4129BC07-716F-4393-8A31-1890C51A1BC1@qdh.org.uk" class="">
      <div style="word-wrap: break-word; -webkit-nbsp-mode: space;
        line-break: after-white-space;" class="">
        <div class="">
          <blockquote type="cite" class="">
            <div class=""><br style="caret-color: rgb(0, 0, 0);
                font-family: Helvetica; font-size: 12px; font-style:
                normal; font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none;" class="">
              <blockquote type="cite" style="font-family: Helvetica;
                font-size: 12px; font-style: normal; font-variant-caps:
                normal; font-weight: normal; letter-spacing: normal;
                orphans: auto; text-align: start; text-indent: 0px;
                text-transform: none; white-space: normal; widows: auto;
                word-spacing: 0px; -webkit-text-size-adjust: auto;
                -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class="">
                I’d also like to know if it’s possible to get a playbin
                to dump the<br class="">
                pipeline that it’s using out somehow, there’s quite a
                lot of<br class="">
                information in the verbose output, but I can’t seem to
                spot a<br class="">
                pipeline which I could use on the command line in place
                of playbin, I<br class="">
                think that would help me in the final goal.<span class="Apple-converted-space"> </span><br class="">
              </blockquote>
              <br style="caret-color: rgb(0, 0, 0); font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none;" class="">
              <span style="caret-color: rgb(0, 0, 0); font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none; float: none; display: inline
                !important;" class="">When you are using gst-launch-1.0
                you can dump the pipeline into DOT</span><br style="caret-color: rgb(0, 0, 0); font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none;" class="">
              <span style="caret-color: rgb(0, 0, 0); font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none; float: none; display: inline
                !important;" class="">files using the env
                GST_DEBUG_DUMP_DOT_DIR=</span><br style="caret-color:
                rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
              <br style="caret-color: rgb(0, 0, 0); font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none;" class="">
              <span style="caret-color: rgb(0, 0, 0); font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none; float: none; display: inline
                !important;" class="">To get the same thing in your
                application, you have to call:</span><br style="caret-color: rgb(0, 0, 0); font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none;" class="">
              <br style="caret-color: rgb(0, 0, 0); font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none;" class="">
              <span style="caret-color: rgb(0, 0, 0); font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none; float: none; display: inline
                !important;" class=""> GST_DEBUG_BIN_TO_DOT_FILE(bin,
                GST_DEBUG_GRAPH_SHOW_ALL, file_name);</span><br style="caret-color: rgb(0, 0, 0); font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none;" class="">
            </div>
          </blockquote>
        </div>
        <br class="">
        <div class="">perfect thanks! </div>
        <div class=""><br class="">
        </div>
        <div class="">K,</div>
      </div>
      <br class="">
      <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><p class=""><br class="">
    </p>
  </div>

_______________________________________________<br class="">gstreamer-devel mailing list<br class=""><a href="mailto:gstreamer-devel@lists.freedesktop.org" class="">gstreamer-devel@lists.freedesktop.org</a><br class="">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel<br class=""></div></blockquote></div><br class=""></div></body></html>