<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 02/28/2012 09:17 PM, Alex K wrote:
    <blockquote
      cite="mid:1330460226.13386.YahooMailNeo@web161006.mail.bf1.yahoo.com"
      type="cite">
      <div style="color: rgb(0, 0, 0); background-color: rgb(255, 255,
        255); font-family: times new roman,new york,times,serif;
        font-size: 12pt;">
        <div id="yiv1242648611">
          <div>
            <div style="color: rgb(0, 0, 0); background-color: rgb(255,
              255, 255); font-family: 'times new roman','new
              york',times,serif;">
              <div id="yiv1242648611yui_3_2_0_16_133045835500148"
                style="font-size: 12pt;">Thank you for the response
                Stefan!&nbsp;</div>
              <div id="yiv1242648611yui_3_2_0_16_133045835500148"
                style="font-size: 12pt;"><br>
              </div>
              <div style="font-family: 'times new roman','new
                york',times,serif;"
                id="yiv1242648611yui_3_2_0_16_133045835500156"
                class="yiv1242648611yui_3_2_0_16_133045835500154">
                <div style="font-family: 'times new roman','new
                  york',times,serif;"
                  class="yiv1242648611yui_3_2_0_16_133045835500161"
                  id="yiv1242648611yui_3_2_0_16_1330458355001313">
                  <div id="yiv1242648611">
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;">&gt;&gt;&gt; What
                      extactly are you doing in the vader-start/stop
                      signal handlers? <br>
                      In the vader start callback I am not doing
                      anything right now.&nbsp;</div>
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;">In the vader stop
                      callback I write the buffered result to a file.
                      Like I said before I have a callback for the
                      fakesink 'handoff' signal, where I append the
                      result to my buffer.&nbsp;</div>
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;">It looks something like
                      this</div>
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;"><br>
                    </div>
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;">def vader_start(self,
                      arg, data):</div>
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;">&nbsp; &nbsp; print "Vader start"</div>
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;"><br>
                    </div>
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;">def sink_new_buffer(self,
                      pad, buffer, data):</div>
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;">&nbsp; &nbsp;print "New Buffer!"</div>
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;">&nbsp; &nbsp;self.sinkbuffer +=
                      buffer.data</div>
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;"><br>
                    </div>
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;">def vader_stop(self, arg,
                      data):</div>
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;">&nbsp; &nbsp; print "Vader stop"</div>
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;">&nbsp; &nbsp; FILE =
                      open("out.flac", "wb")</div>
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;">&nbsp; &nbsp;
                      FILE.write(self.sinkbuffer)</div>
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;">&nbsp; &nbsp; FILE.close()</div>
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;">&nbsp; &nbsp; self.sinkbuffer = ""</div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    This is not good, as the buffer you are looking at won't yet have
    made it to the sink.<br>
    <blockquote
      cite="mid:1330460226.13386.YahooMailNeo@web161006.mail.bf1.yahoo.com"
      type="cite">
      <div style="color: rgb(0, 0, 0); background-color: rgb(255, 255,
        255); font-family: times new roman,new york,times,serif;
        font-size: 12pt;">
        <div id="yiv1242648611">
          <div>
            <div style="color: rgb(0, 0, 0); background-color: rgb(255,
              255, 255); font-family: 'times new roman','new
              york',times,serif;">
              <div style="font-family: 'times new roman','new
                york',times,serif;"
                id="yiv1242648611yui_3_2_0_16_133045835500156"
                class="yiv1242648611yui_3_2_0_16_133045835500154">
                <div style="font-family: 'times new roman','new
                  york',times,serif;"
                  class="yiv1242648611yui_3_2_0_16_133045835500161"
                  id="yiv1242648611yui_3_2_0_16_1330458355001313">
                  <div id="yiv1242648611">
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"
                      style="font-size: 12pt;"><br>
                      &gt;&gt;&gt; You might need to mark the first
                      buffer of each new utterance with a discont flag.</div>
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"><font
                        size="3">The vader plugin emits VADER_START and
                        VADER_STOP signals. How do I mark it with a
                        discount flag? Also will that flag make the
                        AudioEncoderClass to reset the element? </font><br>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    something like this:<br>
    buffer.flags |= BufferFlags.DISCONT<br>
    <blockquote
      cite="mid:1330460226.13386.YahooMailNeo@web161006.mail.bf1.yahoo.com"
      type="cite">
      <div style="color: rgb(0, 0, 0); background-color: rgb(255, 255,
        255); font-family: times new roman,new york,times,serif;
        font-size: 12pt;">
        <div id="yiv1242648611">
          <div>
            <div style="color: rgb(0, 0, 0); background-color: rgb(255,
              255, 255); font-family: 'times new roman','new
              york',times,serif;">
              <div style="font-family: 'times new roman','new
                york',times,serif;"
                id="yiv1242648611yui_3_2_0_16_133045835500156"
                class="yiv1242648611yui_3_2_0_16_133045835500154">
                <div style="font-family: 'times new roman','new
                  york',times,serif;"
                  class="yiv1242648611yui_3_2_0_16_133045835500161"
                  id="yiv1242648611yui_3_2_0_16_1330458355001313">
                  <div id="yiv1242648611">
                    <div id="yiv1242648611yui_3_2_0_16_1330458355001166"><br>
                      <br>
                      <font size="3">&gt;&gt;&gt; Use a smaller
                        buffersize on the capture size or write your own
                        chunking element. There is also a
                        "removesilence" element and a "cutter" element
                        which you might want to check</font><br>
                    </div>
                  </div>
                  I looked at flac encoder's implementation and it seems
                  that I can achieve my goal if I can invoke the
                  GStAudioEncoderClass-&gt;stop and GstAudioEncoderClass
                  start methods. This will basically reset the state of
                  the flacencoder element.&nbsp;</div>
                <div style="font-family: 'times new roman','new
                  york',times,serif;"
                  class="yiv1242648611yui_3_2_0_16_133045835500161
                  yui_3_2_0_14_133045976945956"
                  id="yiv1242648611yui_3_2_0_16_1330458355001313">These
                  methods are invoked by AudioEncoder
                  element's&nbsp;gst_audio_encoder_activate method. <br>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    These are tied to the state-changes. There is no regular way to call
    them.<br>
    <br>
    Stefan<br>
    <br>
    <blockquote
      cite="mid:1330460226.13386.YahooMailNeo@web161006.mail.bf1.yahoo.com"
      type="cite">
      <div style="color: rgb(0, 0, 0); background-color: rgb(255, 255,
        255); font-family: times new roman,new york,times,serif;
        font-size: 12pt;">
        <div id="yiv1242648611">
          <div>
            <div style="color: rgb(0, 0, 0); background-color: rgb(255,
              255, 255); font-family: 'times new roman','new
              york',times,serif;">
              <div style="font-family: 'times new roman','new
                york',times,serif;"
                id="yiv1242648611yui_3_2_0_16_133045835500156"
                class="yiv1242648611yui_3_2_0_16_133045835500154">
                <div style="font-family: 'times new roman','new
                  york',times,serif;"
                  class="yiv1242648611yui_3_2_0_16_133045835500161
                  yui_3_2_0_14_133045976945956"
                  id="yiv1242648611yui_3_2_0_16_1330458355001313">However
                  it seems like this method is invoked only when the
                  pipeline is first started.&nbsp;</div>
                <div style=""
                  class="yiv1242648611yui_3_2_0_16_133045835500161
                  yui_3_2_0_14_133045976945956"
                  id="yiv1242648611yui_3_2_0_16_1330458355001313">Does
                  anyone know if there is any other way I can trigger
                  the method?</div>
                <div style="font-family: 'times new roman','new
                  york',times,serif;"
                  class="yiv1242648611yui_3_2_0_16_133045835500161
                  yui_3_2_0_14_133045976945956"
                  id="yiv1242648611yui_3_2_0_16_1330458355001313"><br>
                </div>
                <div style="font-family: 'times new roman','new
                  york',times,serif;"
                  class="yiv1242648611yui_3_2_0_16_133045835500161
                  yui_3_2_0_14_133045976945956"
                  id="yiv1242648611yui_3_2_0_16_1330458355001313">Thank
                  you in advance,</div>
                <div style="font-family: 'times new roman','new
                  york',times,serif;"
                  class="yiv1242648611yui_3_2_0_16_133045835500161
                  yui_3_2_0_14_133045976945956"
                  id="yiv1242648611yui_3_2_0_16_1330458355001313">Alex.&nbsp;<br>
                  <br>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
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>