I’ve developed a plugin based on GstPushSrc. My pipeline has this source plugin, a transform plugin and a sink plugin. The pipe is running in a loop but I want to control when the create method is called. How do I set that up? Reena Dass | Staff Software Engineer | ISR & Space Solutions COLLINS AEROSPACE SYSTEMS 7 Technology Park Drive, Westford, MA 01886 U.S.A.
Tel:
+1 978 490 2614 [hidden email] |
collinsaerospace.com CONFIDENTIALITY WARNING: This message may contain proprietary and/or privileged information of Collins Aerospace and its affiliated companies. If you are not the intended recipient,
please 1) Do not disclose, copy, distribute or use this message or its contents. 2) Advise the sender by return email. 3) Delete all copies (including all attachments) from your computer. Your cooperation is greatly appreciated. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Thu, 2020-05-07 at 16:49 +0000, Dass, Reena A Collins wrote:
Hi Reena, > I’ve developed a plugin based on GstPushSrc. My pipeline has this > source plugin, a transform plugin and a sink plugin. The pipe is > running in a loop but I want to control when the create method is > called. How do I set that up? Why do you want to or need to control that? Could you provide some more context about what you're trying to achieve exactly? (big picture) What kind of source element is it? (audio, video, something else) Is it a live source? Where does your data come from? Can it be produced on demand or do you have to wait for it or is it produced in regular intervals (e.g. at X fps)? The create method will typically be called whenever a new buffer is needed, which is typically when downstream (transform ! sink) are done with the previous buffer and give control back to the source. Assuming there are no queues in between. Cheers Tim -- Tim Müller, Centricular Ltd - http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Thanks for your response Tim.
See my answers below Hi Reena, > I’ve developed a plugin based on GstPushSrc. My pipeline has this > source plugin, a transform plugin and a sink plugin. The pipe is > running in a loop but I want to control when the create method is > called. How do I set that up? Why do you want to or need to control that? +++++++I need to process data on demand after having created and loading the pipeline once. Now I have no control on the create. I want the create to be called when I need to process a buffer of data. Could you provide some more context about what you're trying to achieve exactly? (big picture) What kind of source element is it? (audio, video, something else) +++++++It’s a custom source element that I have written, inheriting from GstPushSrc. Is it a live source? Where does your data come from? Can it be produced on demand or do you have to wait for it or is it produced in regular intervals (e.g. at X fps)? +++++++Yes it is a live source. My pipeline is loaded in a DLL, where each object is created using the factory. I set properties on the Source object when a specific function is called. The create method currently is blocking on that property being set. The create method will typically be called whenever a new buffer is needed, which is typically when downstream (transform ! sink) are done with the previous buffer and give control back to the source. Assuming there are no queues in between. +++++++ I can see the create being called when the Sink is done but I now I had to add a wait (using sleep) in the create. Cheers Tim -- Tim Müller, Centricular Ltd - https://urldefense.proofpoint.com/v2/url?u=http-3A__www.centricular.com&d=DwIGaQ&c=ilBQI1lupc9Y65XwNblLtw&r=HQWJANUP83Z9FphYCG_LvTtNzX_hmziQ8C-qpehNFEA&m=MgxNTYAwKAuF03xEtmBRd4OFHQQ4F7DLdoQLt0RXzQI&s=yJ0j_1zgTpL-bsdUf5V8zKkH6OXTdgh1Rzy9KivJs8Q&e= _______________________________________________ gstreamer-devel mailing list [hidden email] https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_gstreamer-2Ddevel&d=DwIGaQ&c=ilBQI1lupc9Y65XwNblLtw&r=HQWJANUP83Z9FphYCG_LvTtNzX_hmziQ8C-qpehNFEA&m=MgxNTYAwKAuF03xEtmBRd4OFHQQ4F7DLdoQLt0RXzQI&s=H6ReELTGmdvph-8Lz6dQD75KTEe59gL7E2JQ7N57jFc&e= _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Fri, 2020-05-08 at 12:01 +0000, Dass, Reena A Collins wrote:
Hi, > Yes it is a live source. My pipeline is loaded in a DLL, where each > object is created using the factory. I set properties on the Source > object when a specific function is called. The create method > currently is blocking on that property being set. > > (...) > I can see the create being called when the Sink is done but I now I > had to add a wait (using sleep) in the create. That's normal and expected in this case, that ::create() is blocking/waiting on something for data to be available. Usually that would be blocked on a file descriptor / socket / handle or a GCond though. It sounds like you might want something like appsrc, where you just call gst_app_src_push_buffer() whenever you have a new buffer available. (Appsrc will add this to an internal queue and then signal on a GCond to wake up the ::create() function thread if it's waiting for a new buffer). Cheers Tim -- Tim Müller, Centricular Ltd - http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |