Hi,
I have an GstElement instance and want to know how many time the element was in PLAYING state. As I understood gst_element_get_base_time() can help in the case the element is in the RUNNING state but is it possible to retrieve such info after the main pipeline was stopped (set in NULL state)? -- Best regards, Ivan ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi Ivan ,
U can insert a count in bus call handler and know how many times element was in PLAYING state .
On Tue, Dec 29, 2009 at 4:30 PM, Ivan Murashko <[hidden email]> wrote: Hi, -- Regards, Sudarshan Bisht ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Ivan Murashko-2
On Tue, 2009-12-29 at 14:00 +0300, Ivan Murashko wrote:
> Hi, > > I have an GstElement instance and want to know how many time the > element was in PLAYING state. If you mean 'for how long the pipeline has been in the playing state' then you can use gst_element_get_start_time() on the pipeline, which gives you the running_time of when the pipeline was last paused. If you set a pipeline to NULL and then get the start_time, you will get the total amount of time spent in the playing state. Note however that this time resets to 0 after a flushing seek. Wim > As I understood gst_element_get_base_time() can help in the case the > element is in the RUNNING state but is it possible to retrieve such > info after the main pipeline was stopped (set in NULL state)? > > -- > Best regards, > Ivan > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Sudarshan Bisht
Hello Sudarshan,
This gives me a knowledge that there was (or not) any data flow in the pipeline. I can also recalculate time after each state change. But I want (if it's possible) to get this info via an element but not via the bus call handler. The reason is that the call handler is located at a separate module which I can not access. On Tue, Dec 29, 2009 at 2:15 PM, sudarshan bisht <[hidden email]> wrote:
-- Best regards, Ivan ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Wim Taymans
Hello Wim,
Thank you very much, seems that it works for me On Tue, Dec 29, 2009 at 2:41 PM, Wim Taymans <[hidden email]> wrote:
-- Best regards, Ivan ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi all,
This code retrieves correct info about how much time an element was in a playing state (since last pause) may be somebody will need it too GstClockTime getRunningTime(GstElement* branch) { if (branch) { GstClock *clock = gst_element_get_clock(branch); if (clock) { return gst_clock_get_time(clock) - gst_element_get_base_time(branch); } } return 0ULL; } On Tue, Dec 29, 2009 at 2:57 PM, Ivan Murashko <[hidden email]> wrote: Hello Wim, -- Best regards, Ivan ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |