Can't get appsink to emit new-sample?

Nicolas Dufresne nicolas at ndufresne.ca
Fri Aug 2 17:21:08 UTC 2019


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.

> 
> -aps
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190802/caf7d0f0/attachment.sig>


More information about the gstreamer-devel mailing list