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. -aps _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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. signal will slow down everything due to Python interpreter lock. > > -aps > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (201 bytes) Download Attachment |
On Fri, Aug 2, 2019 at 1:21 PM Nicolas Dufresne <[hidden email]> wrote: Le vendredi 02 août 2019 à 12:59 -0400, pisymbol . a écrit : Ah! Bit again by the GIL. Thanks! -aps _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by pisymbol .
One possibility is that you don’t have a main loop iterating. Signals only get emitted if you iterate contexts.
Michael > On Aug 2, 2019, at 10:59 AM, pisymbol . <[hidden email]> wrote: > > 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. > > -aps > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Fri, Aug 2, 2019 at 11:19 PM Michael Gruner <[hidden email]> wrote: One possibility is that you don’t have a main loop iterating. Signals only get emitted if you iterate contexts. Why would say identity callbacks work as well as mfsink messages work in my app but not appsink though? -aps _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Yep, that was an out of context answer, didn’t notice the on-going discussion.
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by pisymbol .
Le vendredi 02 août 2019 à 23:48 -0400, pisymbol . a écrit :
> > > On Fri, Aug 2, 2019 at 11:19 PM Michael Gruner <[hidden email]> wrote: > > One possibility is that you don’t have a main loop iterating. Signals only get emitted if you iterate contexts. > > > > Why would say identity callbacks work as well as mfsink messages work in my app but not appsink though? Identity handoff is as bad on performance as the appsink callback. I don't know what mfsink is. > > -aps > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Sat, Aug 3, 2019, 8:59 AM Nicolas Dufresne <[hidden email]> wrote: Le vendredi 02 août 2019 à 23:48 -0400, pisymbol . a écrit : Multifilesink's bus message when a file rollover event occurs. -aps _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Michael Gruner
On Fri, 2019-08-02 at 21:18 -0600, Michael Gruner wrote:
> One possibility is that you don’t have a main loop iterating. > Signals only get emitted if you iterate contexts. That's wrong. Signal handlers are called from whatever thread is emitting them, and appsink does not require any GLib main context. -- Sebastian Dröge, Centricular Ltd · https://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (981 bytes) Download Attachment |
Free forum by Nabble | Edit this page |