<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 01/10/2015 04:52 PM, Charlie FG
      wrote:<br>
    </div>
    <blockquote cite="mid:54B14AB6.6000006@carrotsrc.org" type="cite">
      <pre wrap="">On 09/01/15 19:52, Stefan Sauer wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">On 01/09/2015 12:37 AM, Charlie FG wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">I place 'audioecho' element (already linked between two 'audioconvert'
elements) into the pipeline but 3500 milliseconds after it has switched
to PLAYING ... It does work but with a major drawback - there is silence
for ~3500ms (once the 'queue' has expended it's buffers). If I change
the time of the hot-linking event to, say, 12000ms it will be silent for
~12000ms; once it has seemingly caught up, it will play from the point
the 'audioecho' was linked in, with the echo active.
</pre>
        </blockquote>
        <pre wrap="">It's an filter element that does transform inplace - that is the output
buffers have the same metadata is the inputs. Is your code public,
seeing it might help, this sounds a bit like as if the new elements are
not properly setup in terms of the playback segment.

Stefan
</pre>
      </blockquote>
      <pre wrap="">
Stefan,

First, thank you very much for your time!

For quick reference - a PipeSegment is a collection of elements to be
put into a Pipeline. The Pipeline is acting as an abstraction of
GstPipeline. The PipeSegments share the common GstPipeline held in the
Pipeline object they added to.

Here is the main flow so you don't have to waste time hunting around in
the repo for the bits and bobs.

---

The setup of the initial pipeline is in loadplay.cpp, from line 32
After the event is triggered, it tells the Pipeline to insert a new
'effects' PipeSegment on 64
(The effects PipeSegment is defined on line 97

<a class="moz-txt-link-freetext" href="https://github.com/carrotsrc/rackoonIO/blob/master/gst/loadplay.cpp">https://github.com/carrotsrc/rackoonIO/blob/master/gst/loadplay.cpp</a>

----

The insertion jumps to Pipeline.cpp, Pipeline::insertSegment() on line
26. Here is where the blocking probe is added.

<a class="moz-txt-link-freetext" href="https://github.com/carrotsrc/rackoonIO/blob/master/gst/lib/Pipeline.cpp">https://github.com/carrotsrc/rackoonIO/blob/master/gst/lib/Pipeline.cpp</a>

---

Once the probe is added, it jumps to AudioEvents.cpp into the only
function in there. Here is where it
* sets the new elements' state to PLAYING (19)
* adding the new elements to the bin + linking them together (22)
* unlinking of the two surrounding elements (24)
* linking new elements into pipeline (26,29)
* removing pad

<a class="moz-txt-link-freetext" href="https://github.com/carrotsrc/rackoonIO/blob/master/gst/lib/AudioEvents.cpp">https://github.com/carrotsrc/rackoonIO/blob/master/gst/lib/AudioEvents.cpp</a></pre>
    </blockquote>
    A tiny suggestion - instead of<br>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <table class="highlight tab-size-8 js-file-line-container"
      style="box-sizing: border-box; border-collapse: collapse;
      border-spacing: 0px; tab-size: 8; color: rgb(51, 51, 51);
      font-family: Helvetica, arial, freesans, clean, sans-serif, 'Segoe
      UI Emoji', 'Segoe UI Symbol'; font-size: 13px; font-style: normal;
      font-variant: normal; font-weight: normal; letter-spacing: normal;
      line-height: 18.2000007629395px; orphans: auto; text-align: start;
      text-indent: 0px; text-transform: none; white-space: normal;
      widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(255, 255, 255);">
      <tbody style="box-sizing: border-box;">
        <tr style="box-sizing: border-box;">
          <td id="LC32" class="blob-code js-file-line"
            style="box-sizing: border-box; padding: 0px 10px; position:
            relative; font-family: Consolas, 'Liberation Mono', Menlo,
            Courier, monospace; font-size: 12px; color: rgb(51, 51, 51);
            vertical-align: top; white-space: pre; overflow: visible;"><span
              class="pl-s3" style="box-sizing: border-box; color: rgb(0,
              134, 179);">gst_pad_remove_probe</span> (pad, <span
              class="pl-s3" style="box-sizing: border-box; color: rgb(0,
              134, 179);">GST_PAD_PROBE_INFO_ID</span> (info));</td>
        </tr>
        <tr style="box-sizing: border-box;">
          <td id="L33" class="blob-num js-line-number"
            data-line-number="33" style="box-sizing: border-box;
            padding: 0px 10px; width: 50px; min-width: 50px;
            font-family: Consolas, 'Liberation Mono', Menlo, Courier,
            monospace; font-size: 12px; line-height: 18px; color:
            rgba(0, 0, 0, 0.298039); vertical-align: top; text-align:
            right; border-style: solid; border-color: rgb(238, 238,
            238); border-width: 0px 1px 0px 0px; cursor: pointer;
            -webkit-user-select: none;"><br>
          </td>
          <td id="LC33" class="blob-code js-file-line"
            style="box-sizing: border-box; padding: 0px 10px; position:
            relative; font-family: Consolas, 'Liberation Mono', Menlo,
            Courier, monospace; font-size: 12px; color: rgb(51, 51, 51);
            vertical-align: top; white-space: pre; overflow: visible;">
            <span class="pl-s3" style="box-sizing: border-box; color:
              rgb(0, 134, 179);">free</span>(data);</td>
        </tr>
        <tr style="box-sizing: border-box;">
          <td id="L34" class="blob-num js-line-number"
            data-line-number="34" style="box-sizing: border-box;
            padding: 0px 10px; width: 50px; min-width: 50px;
            font-family: Consolas, 'Liberation Mono', Menlo, Courier,
            monospace; font-size: 12px; line-height: 18px; color:
            rgba(0, 0, 0, 0.298039); vertical-align: top; text-align:
            right; border-style: solid; border-color: rgb(238, 238,
            238); border-width: 0px 1px 0px 0px; cursor: pointer;
            -webkit-user-select: none;"><br>
          </td>
          <td id="LC34" class="blob-code js-file-line"
            style="box-sizing: border-box; padding: 0px 10px; position:
            relative; font-family: Consolas, 'Liberation Mono', Menlo,
            Courier, monospace; font-size: 12px; color: rgb(51, 51, 51);
            vertical-align: top; white-space: pre; overflow: visible;">
          </td>
        </tr>
        <tr style="box-sizing: border-box;">
          <td id="L35" class="blob-num js-line-number"
            data-line-number="35" style="box-sizing: border-box;
            padding: 0px 10px; width: 50px; min-width: 50px;
            font-family: Consolas, 'Liberation Mono', Menlo, Courier,
            monospace; font-size: 12px; line-height: 18px; color:
            rgba(0, 0, 0, 0.298039); vertical-align: top; text-align:
            right; border-style: solid; border-color: rgb(238, 238,
            238); border-width: 0px 1px 0px 0px; cursor: pointer;
            -webkit-user-select: none;"><br>
          </td>
          <td id="LC35" class="blob-code js-file-line"
            style="box-sizing: border-box; padding: 0px 10px; position:
            relative; font-family: Consolas, 'Liberation Mono', Menlo,
            Courier, monospace; font-size: 12px; color: rgb(51, 51, 51);
            vertical-align: top; white-space: pre; overflow: visible;">
            cout << <span class="pl-s1" style="box-sizing:
              border-box; color: rgb(223, 80, 0);"><span class="pl-pds"
                style="box-sizing: border-box; color: rgb(223, 80, 0);">"</span>~~~Hotlinking<span
                class="pl-pds" style="box-sizing: border-box; color:
                rgb(223, 80, 0);">"</span></span> << endl;</td>
        </tr>
        <tr style="box-sizing: border-box;">
          <td id="L36" class="blob-num js-line-number"
            data-line-number="36" style="box-sizing: border-box;
            padding: 0px 10px; width: 50px; min-width: 50px;
            font-family: Consolas, 'Liberation Mono', Menlo, Courier,
            monospace; font-size: 12px; line-height: 18px; color:
            rgba(0, 0, 0, 0.298039); vertical-align: top; text-align:
            right; border-style: solid; border-color: rgb(238, 238,
            238); border-width: 0px 1px 0px 0px; cursor: pointer;
            -webkit-user-select: none;"><br>
          </td>
          <td id="LC36" class="blob-code js-file-line"
            style="box-sizing: border-box; padding: 0px 10px; position:
            relative; font-family: Consolas, 'Liberation Mono', Menlo,
            Courier, monospace; font-size: 12px; color: rgb(51, 51, 51);
            vertical-align: top; white-space: pre; overflow: visible;">
            <span class="pl-s3" style="box-sizing: border-box; color:
              rgb(0, 134, 179);">GST_INFO</span>(<span class="pl-s1"
              style="box-sizing: border-box; color: rgb(223, 80, 0);"><span
                class="pl-pds" style="box-sizing: border-box; color:
                rgb(223, 80, 0);">"</span>RackoonIO Event: ~Hotlinking<span
                class="pl-pds" style="box-sizing: border-box; color:
                rgb(223, 80, 0);">"</span></span>);</td>
        </tr>
        <tr style="box-sizing: border-box;">
          <td id="L37" class="blob-num js-line-number"
            data-line-number="37" style="box-sizing: border-box;
            padding: 0px 10px; width: 50px; min-width: 50px;
            font-family: Consolas, 'Liberation Mono', Menlo, Courier,
            monospace; font-size: 12px; line-height: 18px; color:
            rgba(0, 0, 0, 0.298039); vertical-align: top; text-align:
            right; border-style: solid; border-color: rgb(238, 238,
            238); border-width: 0px 1px 0px 0px; cursor: pointer;
            -webkit-user-select: none;"><br>
          </td>
          <td id="LC37" class="blob-code js-file-line"
            style="box-sizing: border-box; padding: 0px 10px; position:
            relative; font-family: Consolas, 'Liberation Mono', Menlo,
            Courier, monospace; font-size: 12px; color: rgb(51, 51, 51);
            vertical-align: top; white-space: pre; overflow: visible;">
            <span class="pl-k" style="box-sizing: border-box; color:
              rgb(167, 29, 93);">return</span> GST_PAD_PROBE_OK;</td>
        </tr>
      </tbody>
    </table>
    just return GST_PAD_PROBE_REMOVE;<br>
    In my app, I first link and then set the new elements to PLAYING.
    But for effects this should not make much of a difference. Also as
    one tricky part - I query the current upstream playback position and
    also send a seek to sync the new elements, I think that this is not
    needed anymore though.<br>
    <br>
    Stefan<br>
    <br>
    <blockquote cite="mid:54B14AB6.6000006@carrotsrc.org" type="cite">
      <pre wrap="">

---

The issue may be compounded by my making it semi-oop without
properly understanding Gstreamer ;)

Charlie
_______________________________________________
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>
  </body>
</html>