<div dir="ltr">In addition, you should set the 'emit-signals' property to TRUE value for appsink element.</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/8/27 Wonchul Lee <span dir="ltr"><<a href="mailto:chul0812@gmail.com" target="_blank">chul0812@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">At the cb_new_buffer, you can get the buffer.<div>Like as blow code.</div><div><pre style="white-space:pre-wrap;word-wrap:break-word">
static GstFlowReturn
cb_new_buffer(GstElement * sink)
{
  GstSample *sample;
  GstCaps *caps;
  GstBuffer *buf;</pre><pre style="white-space:pre-wrap;word-wrap:break-word">  g_signal_emit_by_name (sink, "pull-sample", &sample);</pre><pre style="white-space:pre-wrap;word-wrap:break-word"><pre style="word-wrap:break-word;white-space:pre-wrap">
  caps = gst_sample_get_caps (sample);
  buf = gst_sample_get_buffer (sample);
</pre><div><br></div>  if (sample) {
    gst_sample_unref (sample);
  }

  return GST_FLOW_OK;
}</pre><pre style="white-space:pre-wrap;word-wrap:break-word"><br></pre><pre style="white-space:pre-wrap;word-wrap:break-word">GstSample contains the reference of buffer and caps data.</pre>
<pre style="white-space:pre-wrap;word-wrap:break-word">You should unref after use the sample data.</pre><pre style="white-space:pre-wrap;word-wrap:break-word">It is the reason why blocked after got the first data.</pre>
</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">2013/8/27 Brendan Long <span dir="ltr"><<a href="mailto:self@brendanlong.com" target="_blank">self@brendanlong.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>How are you getting the sample? Is it
      possible that you're accidentally blocking the pipeline?I think
      you're supposed to use "pull-sample" to get the new sample, but if
      you call "pull-sample" where there is no sample, it will block,
      and depending on how you're running your pipeline, that could
      block everything. That's just a guess though, since you're not
      showing very much of your code.<div><div><br>
      <br>
      On 08/24/2013 05:18 AM, jojo wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div>
      <div> Hi, </div>
      <div><span style="white-space:pre-wrap"> </span>i
        use the simplest pipe line again as bellow:</div>
      <div><br>
      </div>
      <div><span style="white-space:pre-wrap"> </span>pipe
        = gst_parse_launch("appsrc is-live=1 do-timestamp=1
        caps=\"image/jpeg, width=1920, height=1080\" name=\"appsrc\" !
        appsink name=\"appsink\"");</div>
      <div><br>
      </div>
      <div><span style="white-space:pre-wrap"> </span>it
        can get the first 1 "sample" just only.</div>
      <div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div><br>
        </div>
        <div>- Jojo</div>
        <div><br>
        </div>
      </div>
      <p style="color:#a0a0a8">在 2013年8月24日星期六,下午5:17,jojo 写道:</p>
      <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px">
        <span>
          <div>
            <div>
              <div>Hi, </div>
              <div><span style="white-space:pre-wrap"> </span>My pipeline is
                :</div>
              <div><br>
              </div>
              <div><span style="white-space:pre-wrap"> </span>pipe
                = gst_parse_launch("appsrc is-live=1 do-timestamp=1
                caps=image/jpeg, width=1920, height=1080 name=\"appsrc\"
                ! decodebin ! queue !  videoconvert ! appsink
                caps=\"%s\" name=\"appsink\",
                GST_VIDEO_CAPS_MAKE("BGRx")).</div>
              <div><br>
              </div>
              <div><span style="white-space:pre-wrap"> </span>g_signal_connect
                (appsink, "new-sample", G_CALLBACK (cb_new_buffer),
                data);</div>
              <div><br>
              </div>
              <div><span style="white-space:pre-wrap"> </span>in the
                gstreamer v0.10, the callback is triggered if there are
                new buffer, but i can not get new data from this
                callback in the version 1.0.9,</div>
              <div><br>
              </div>
              <div><span style="white-space:pre-wrap"> </span>some of my
                parameters of "gst_parse_launch" are wrong ?</div>
              <div><br>
              </div>
              <div><span style="white-space:pre-wrap"> </span>Any hins will
                be helpful.</div>
              <div>
                <div><br>
                </div>
                <div>Thanks,</div>
                <div><br>
                </div>
                <div>- Jojo</div>
                <div><br>
                </div>
              </div>
            </div>
          </div>
        </span> </blockquote>
      <div> <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
gstreamer-devel mailing list
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>