<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 2, 2019 at 1:21 PM Nicolas Dufresne <<a href="mailto:nicolas@ndufresne.ca">nicolas@ndufresne.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Le vendredi 02 août 2019 à 12:59 -0400, pisymbol . a écrit :<br>
> Pipeline snippet:<br>
> <br>
> ... ! omxh264enc control-rate=2 bitrate=30000000 ! video/x-h264, stream-format=(string)byte-stream ! h264parse ! appsink name=appsink0 emit-signals=true<br>
> <br>
> I am then using:<br>
> <br>
> appsink0 = recorder_bin.get_by_name("appsink0")<br>
> appsink0.connect("new-sample", on_new_sample, 0)<br>
> <br>
> def on_new_sample(sensor_id):<br>
>    """ Why is this so hard? """<br>
>    print(sensor_id)<br>
>    return Gst.FlowReturn.OK<br>
> <br>
> 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.<br>
<br>
In python, you are better to use polling to get the buffers, as the<br>
signal will slow down everything due to Python interpreter lock.<br>
</blockquote><div><br></div><div>Ah! Bit again by the GIL. Thanks!<br></div><div><br></div><div>-aps<br></div></div></div>