Can't get appsink to emit new-sample?

pisymbol . pisymbol at gmail.com
Fri Aug 2 18:41:19 UTC 2019


On Fri, Aug 2, 2019 at 1:21 PM Nicolas Dufresne <nicolas at ndufresne.ca>
wrote:

> Le vendredi 02 août 2019 à 12:59 -0400, pisymbol . a écrit :
> > Pipeline snippet:
> >
> > ... ! omxh264enc control-rate=2 bitrate=30000000 ! video/x-h264,
> stream-format=(string)byte-stream ! h264parse ! appsink name=appsink0
> emit-signals=true
> >
> > I am then using:
> >
> > appsink0 = recorder_bin.get_by_name("appsink0")
> > appsink0.connect("new-sample", on_new_sample, 0)
> >
> > def on_new_sample(sensor_id):
> >    """ Why is this so hard? """
> >    print(sensor_id)
> >    return Gst.FlowReturn.OK
> >
> > Is there something else I should be doing to get appsink to emit the
> 'new-sample' callback? I do have an appsrc0 somewhere else I plan to send
> buffers I catch in appsink0 to but I'm not sure that is relevant here.
>
> In python, you are better to use polling to get the buffers, as the
> signal will slow down everything due to Python interpreter lock.
>

Ah! Bit again by the GIL. Thanks!

-aps
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190802/c6ee1ae4/attachment.html>


More information about the gstreamer-devel mailing list