=?utf-8?Q?=E5=9B=9E=E5=A4=8D=EF=BC=9A_?=can not get decoded data from appsink in GStreamer v1.0.9
jojo
rjiejie at gmail.com
Wed Aug 28 09:57:08 PDT 2013
Hi,
Brendan & Wonchul
Thanks for your replay,
i use the the callback "GstAppSinkCallbacks.new_buffer" to pull the the buffer data of appsink's
because of some performance issue du to comment of gstappsink's source code :)
about this issue, i fixed that if cast the element pointer to appsink,
before (can not get more sample but just one):
cb_new_buffer (GstElement *elt, gpointer user_data)
fix the issue: cb_new_buffer (GstAppSink *elt, gpointer user_data)
i use the "GstElement" pointer as the sink element in version 0.10.x, it works well except in version v 1.0.9 :(
i do not know really why…..maybe some flag(or data) is lost if i do not cast to real type...
Thanks,
- Jojo
在 2013年8月27日星期二,上午7:02,Wonchul Lee 写道:
> In addition, you should set the 'emit-signals' property to TRUE value for appsink element.
>
>
> 2013/8/27 Wonchul Lee <chul0812 at gmail.com (mailto:chul0812 at gmail.com)>
> > At the cb_new_buffer, you can get the buffer.
> > Like as blow code.
> > static GstFlowReturn cb_new_buffer(GstElement * sink) { GstSample *sample; GstCaps *caps; GstBuffer *buf;
> > g_signal_emit_by_name (sink, "pull-sample", &sample);
> > caps = gst_sample_get_caps (sample); buf = gst_sample_get_buffer (sample);
> >
> > if (sample) { gst_sample_unref (sample); } return GST_FLOW_OK; }
> >
> > GstSample contains the reference of buffer and caps data.
> > You should unref after use the sample data.
> > It is the reason why blocked after got the first data.
> >
> >
> >
> >
> > 2013/8/27 Brendan Long <self at brendanlong.com (mailto:self at brendanlong.com)>
> > > 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.
> > >
> > >
> > > On 08/24/2013 05:18 AM, jojo wrote:
> > > > Hi,
> > > > i use the simplest pipe line again as bellow:
> > > >
> > > > pipe = gst_parse_launch("appsrc is-live=1 do-timestamp=1 caps=\"image/jpeg, width=1920, height=1080\" name=\"appsrc\" ! appsink name=\"appsink\"");
> > > >
> > > > it can get the first 1 "sample" just only.
> > > >
> > > > Thanks,
> > > >
> > > > - Jojo
> > > >
> > > >
> > > > 在 2013年8月24日星期六,下午5:17,jojo 写道:
> > > >
> > > > > Hi,
> > > > > My pipeline is :
> > > > >
> > > > > 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")).
> > > > >
> > > > > g_signal_connect (appsink, "new-sample", G_CALLBACK (cb_new_buffer), data);
> > > > >
> > > > > 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,
> > > > >
> > > > > some of my parameters of "gst_parse_launch" are wrong ?
> > > > >
> > > > > Any hins will be helpful.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > - Jojo
> > > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________ gstreamer-devel mailing list gstreamer-devel at lists.freedesktop.org (mailto:gstreamer-devel at lists.freedesktop.org) http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> > >
> > > _______________________________________________
> > > gstreamer-devel mailing list
> > > gstreamer-devel at lists.freedesktop.org (mailto:gstreamer-devel at lists.freedesktop.org)
> > > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> > >
> >
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org (mailto:gstreamer-devel at lists.freedesktop.org)
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130829/7438e3f1/attachment-0001.html>
More information about the gstreamer-devel
mailing list