Hi,
The RTP C examples in plugins-good show how to extract statistics. To do so, it uses functions like: g_signal_emit_by_name g_object_get g_value_array_get_nth g_value_get_object I would like to do the same in Python, but I cannot find these functions anywhere ... Would it be possible at all? Thanks in advance! Best, Dirk ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi
> The RTP C examples in plugins-good show how to extract statistics. > I would like to do the same in Python, but I cannot find these functions > anywhere ... The following should work: import gst host="127.0.0.1" port=1234 p = "videotestsrc ! rtpvrawpay ! udpsink host=%s port=%s" %(host, port) pipeline = gst.parse_launch(p) udpsink = pipeline.get_by_name("udpsink0") def print_stats(): data = udpsink.emit("get_stats", host, port) stats = "bytes_sent: %s, packets_sent: %s, connect_time: %s" %(data[0], data[1], data[2]) print stats return True import gobject gobject.timeout_add_seconds(1, print_stats) pipeline.set_state(gst.STATE_PLAYING) import gtk gtk.main() ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi Florent,
Thanks a lot for the example! It works fine. One small question, I tried to find the documentation - but could not locate it: in python for example the signal is 'get_stats', but the C example has 'stats'. Where could I find this described/explained? For instance for other interesting statistics (like jitter, latency ...). That would be another great piece of help! Regards, Dirk HiThe RTP C examples in plugins-good show how to extract statistics. I would like to do the same in Python, but I cannot find these functions anywhere ...The following should work: import gst host="127.0.0.1" port=1234 p = "videotestsrc ! rtpvrawpay ! udpsink host=%s port=%s" %(host, port) pipeline = gst.parse_launch(p) udpsink = pipeline.get_by_name("udpsink0") def print_stats(): data = udpsink.emit("get_stats", host, port) stats = "bytes_sent: %s, packets_sent: %s, connect_time: %s" %(data[0], data[1], data[2]) print stats return True import gobject gobject.timeout_add_seconds(1, print_stats) pipeline.set_state(gst.STATE_PLAYING) import gtk gtk.main() ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |